Category: Development

From Blue To Cool: We’ve given the MIDAS UI a makeover

For v4.36 of our booking software, we’ve made a whole host of updates and improvements to the user interface (UI) and the included visual themes.

For many years now, MIDAS has come bundled with a number of visual theme packs.

A range of visual themes for the MIDAS interface are included
A range of visual themes for the MIDAS interface are included

Administrators can select one of these themes to change the appearance of their MIDAS system. Additionally, administrators may optionally allow users to select their preferred theme upon login.

One of the included themes is the imaginatively titled “Default” theme. Unsurprisingly, it’s the visual theme that each MIDAS system uses initially by default.

As the “Default” theme is exactly that, many system administrators simply leave their MIDAS software set to use this theme.

In fact, from a random sample of our cloud-hosted customers, 72% of MIDAS systems are currently set to use the “Default” theme.

It’s black and white!

Interestingly though, the next most popular theme in our random sample of customer’s MIDAS systems is the “HiContrast” theme. Nearly 13% of our customers currently have this set as their default theme.

Hi Contrast theme for MIDAS
Hi Contrast theme for MIDAS

Now the primary goal when we designed the “HiContrast” theme was accessibility. In other words, we wanted to better cater to users who may have visual impairments.

The “HiContrast” theme is less colorful than our other themes. It primarily utilizes a simple “black on white” concept throughout, ensuring maximum contrast on screen.

Whilst a surprising number of our customers choose this theme, we don’t believe the vast majority opt for this particular theme primarily because of accessibility needs.

It’s all too Blue-tiful(!)

Rather, we believe that many who opt for the “HiContrast” theme do so because they feel that the “Default” theme is a bit “too blue” for their liking.

The previous Default theme for MIDAS
The previous Default theme for MIDAS

We get it! That’s one of the reasons why over the years, we’ve introduced additional visual themes where blue isn’t the main color.

We also allow self-hosted customers to create their own custom bespoke themes for our software too!

But going forward, we wanted to see if we develop a new default theme that was “less blue” than the existing default theme, while also at the same time being less “bland” than the basic black and white “HiContrast” theme.

Introducing the new default theme…

The most significant UI update for MIDAS v4.36 comes with a brand new “Default” visual theme:

The Booking Grid under the new default visual theme for MIDAS
The Booking Grid under the new default visual theme

If you prefer the previous default theme, don’t worry – it’s still available, but is now called “MIDAS (Blue)”.

We’ve also made a number of other improvements to the user interface, as well as minor tweaks to other included themes. Some text and headings are now larger than before, dialogs are clearer, there’s increased spacing between certain elements, and some interactive buttons are now larger and more prominent.

The new default theme for MIDAS
The new default theme for MIDAS

You can try the brand new “Default” theme, or any other included theme, right now by heading over to our online demo.


How we’re Optimizing Source Code with AI

Optimizing Software Code using AI

Often in the release notes for our MIDAS room scheduling software, you may see the entry “Code Optimization”.

What is “Code Optimization”?

Code optimization is the process of refining our software’s source code to make it execute more efficiently, consume fewer resources, or improve its overall performance. It involves strategically modifying source code whilst at the same time ensuring the new code still produces the correct results.

Key goals of source code optimization:

  • Enhanced speed: Executing tasks more quickly
  • Reduced resource consumption: Using less memory, CPU cycles, or power
  • Improved scalability: Handling larger workloads effectively
  • Maintainability: Making code easier to understand and modify

Some common source code optimization techniques involve:

  • Algorithm optimization: Choosing more efficient algorithms
  • Loop optimization: Reducing loop iterations or overhead
  • Memory optimization: Minimizing memory usage and allocations
  • Input/output optimization: Streamlining data reading and writing
  • Caching: Storing frequently used data for faster access
  • Compiler optimization: Leveraging compiler features for automatic optimization
  • Profiling: Identifying performance bottlenecks to focus optimization efforts

Code Optimization in MIDAS

Over the years we’ve been developing MIDAS, all our code optimization work has been done manually.

This work has involved attempting to simplify and rewrite parts of the source code to be more efficient.

AI Code Optimizing

In our latest release, MIDAS v4.35, for the very first time, a small section of source code has been optimized with the assistance of AI (or Artificial Intelligence).

We performed this AI code optimization as an experiment to see whether AI could potentially be used to aid our development processes in the future.

We chose a small “subroutine” from our software and asked an AI if it could optimize it for us.

A “subroutine” is essentially a small block of code which can be re-used and “called” repeatedly during a program’s execution.

The subroutine within the MIDAS software code that we asked an AI if it could optimize for us was basically a function which converts dates to “epoch” time.

Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).

How did the AI optimized code perform?

Our original subroutine was 15 lines of code long. Using AI to optimize code, reduced this subroutine down to just 9 lines of code.

However, the initial source code that the AI generated for us did not just work “out of the box”. In fact, it didn’t work at all!

But using this AI generated code as a “template”, our team was able to modify the generated code so that it worked and produced the correct results.

Our team then extensively tested the new subroutine to ensure that it consistently produced the same expected output as the original subroutine.

Once we had a working subroutine that we were confident in, the next step was to “benchmark” the new routine against the old one. After all, there would be no point in using the new routine if there were no performance gains to be had, or indeed if the new code performed worse than the original.

To test this, we ran each subroutine 10,000,000 (10 million times), and analyzed the results:

Our Original Subroutine:
30 wallclock secs (30.28 usr + 0.00 sys = 30.28 CPU) @ 330229.18/s (n=10000000)

AI Optimized Subroutine:
27 wallclock secs (27.09 usr + 0.00 sys = 27.09 CPU) @ 369085.41/s (n=10000000)

To explain the above results, over 10 million iterations of each subroutine, the new AI optimized subroutine was more efficient. It ran (executed) quicker, and consumed less processing (CPU) power to achieve the same results as the original subroutine.

On our test server, the optimized subroutine was able to run 369,085 times in the space of one second, compared with 330,229 times in the space of a second for the original subroutine.

Ok, so the original subroutine was pretty quick and efficient to begin with – but with the assistance of AI, we were able to improve its efficiency by almost 12%.

The future of AI code optimization

Firstly, don’t worry, Artificial Intelligence is not about to take over the development of our MIDAS software!

MIDAS has been – and will remain – coded, developed, and maintained by human programmers.

But our experiment – on a very small part of our code – has demonstrated that AI tools may be able to assist our human developers to write ever more efficient source code.

The result of such carefully applied optimizations is that our software can potentially run faster, use resources more efficiently, and provide a better overall user experience.


How To Generate Quotations For Prospective Bookings

MIDAS v4.35 introduces support for generating “Quotations” for prospective bookings.

Generate quotations when making tentative bookings
Generate quotations when making tentative bookings

Used in conjunction with the “Tentative Bookings” feature, you can generate quotations for clients when making tentative bookings for them.

Should the client accept and pay the quotation online, their “tentative” booking(s) automatically convert to regular “confirmed” bookings.

A number of configurable options are available with the new Quotations feature, including:

Automatically Update Booking Type

When a quotation is accepted and paid online, MIDAS can automatically update the corresponding booking’s “type” to be any confirmed booking type you’ve already defined.

Should bookings become confirmed if their quotations are partially or fully paid?

You can control when a “tentative” booking automatically converts to a “confirmed” booking based on how its associated quotation is paid.

Automatically change a booking's type when a quotation payments are received
Automatically change a booking’s type when a quotation payments are received

MIDAS can either “confirm” a tentative booking on just a partially paid quotation, or only confirm the booking once its quotation has been paid in full.

New Quotation Template

Templates” in MIDAS allow an administrator to customize a range emails, invoices, and more.

There’s already separate templates available for regular, deposit, and cancellation invoices, as well as receipts and credit notes.

v4.35 adds a further template now for your Quotations.

New customizable Quotation template
New customizable Quotation template

The default quotation template is very similar to the default regular invoice template, but introduces some new “placeholder” template variables too.

An example of a new placeholder variable available for the quotation template is “%QUOTEEXPIRES%”.

This special variable is substituted (at time the quotation is printed or emailed) with the date and time that the quotation expires.

By default, a quotation expires when its corresponding tentative booking(s) would expire in MIDAS.

However, there’s a further option available….

Can I set flexible quotation terms?

As mentioned above, quotations by default are only valid up until the expiration time of their corresponding tentative booking(s).

So as an example, let’s say a tentative booking is made to commence at 9am on a Monday. The tentative booking settings are set to expire the booking if it’s not confirmed at least 2 hours before it is due to commence.

If the tentative booking hasn’t been confirmed by 7am on the Monday, the booking will automatically expire and be removed from the system.

In essence, a quotation generated for the above booking would remain valid until 7am on the day of the booking.

After this time, the quotation (and tentative booking) will have expired.

Now one of the new quotation options allows MIDAS to convert a tentative booking to a confirmed booking is only a partial payment has been made against the quotation.

In such instances, we’ve included an option to allow you to update the quotation’s terms to be the same as your standard invoice terms (i.e. for example 30 days).

Change a quotation's terms upon partial payment
Change a quotation’s terms upon partial payment

This means that as long as a client pays something towards the quotation, they will then have longer to pay the remaining balance, just as if they were paying a regular invoice.


Custom Validation For Required Fields

MIDAS ships with a set of standard booking and client input fields. These input fields allow you to capture specific details about a client and their bookings.

Standard Input Fields In MIDAS
Standard Input Fields In MIDAS

Now some of these fields will always be required. For bookings, a minimum of a date and a venue (room/bookable space) is required. All other booking fields can be set to be optional. Likewise, for clients, a minimum of the client’s name is required. All other client fields can be set to be optional.

Here’s a list of the standard fields which are included in MIDAS by default:

Default Booking FieldsDefault Client Fields
DateClient
Times (Booking)Organization
Times (Setup / Breakdown)E-mail Address
VenueMailing Address
Client / OrganizationTelephone Number
AttendeesFax Number (until MIDAS v4.35)
Booking TypeCell/Mobile Number
Booking NotesClient Notes
Resources

MIDAS also allows you to “turn off” fields that you don’t need. So if you don’t need to capture a client’s mailing address, you can disable that field.

But that’s not all – in addition to the standard “default” fields, you can create additional custom booking or client fields in MIDAS.

Adding Custom Fields

A range of different types of custom fields can be created, including:

  • Checkbox – A “tick box” field.
  • File – Allows uploading/attaching of files and documents to bookings or client records (self-hosted systems only)
  • List (Single Select) – A drop-down list of pre-defined items from which a single item may be selected.
  • List (Multi Select) – A drop-down list of pre-defined items from which multiple items may be selected.
  • Number – A field that will only accept numerical input.
  • Range – A “slider” control allowing selection of a numeric value within a defined range.
  • Text – A single-line text field.
  • Text Area – A multi-line text field.
  • URL – A navigable web link to an external resource.

As with standard fields, custom fields can also be set to be “required”. This means that an input is required in the custom field each time it’s shown.

New Validation Feature

For MIDAS v4.34, we’re extending the capabilities of marking custom number, text, text area, and URL fields “required”.

Let’s take the example of a custom single-line text field. Marking this as a required field would ensure that a user would enter something into the field. However, MIDAS wouldn’t check what they’d actually entered. Just entering a single character, or gibberish would be enough to allow you to proceed.

From v4.34 onwards, when setting a custom number, text, text area, and URL field as “required”, you can instruct MIDAS what values are considered “valid” for the field. A user would then need to enter a “valid” value in order to proceed.

Custom Field Validation Using Regular Expressions
Custom Field Validation Using Regular Expressions

A Simple Example

As an example, you could make it so that a user has to enter the word “YES” into a custom text field in order to proceed. If the custom field doesn’t contain the word “YES”, the user will be prompted to correct their entry:

Require Valid Entries In Custom Fields
Require Valid Entries In Custom Fields

The Power Of REGEX

Regular Expressions (REGEX) can be used to create more complex validations for your custom fields too. We’ll cover REGEX in more depth in a future article. In the meantime, as a brief introduction, here are a few simple yet useful REGEX’s for validating entries into your custom fields:

DescriptionREGEX
Value must start with the letters “BOOK”^BOOK
Value must end with the letters “ING”ING$
Value must contain “BOOKING”BOOKING
Value must be exactly “BOOKING”^BOOKING$
Value must contain a number (digit)\d
Value must not contain a number (digit)\D
Value must be exactly “BOOK”, followed by two single digit numbers^BOOK\d\d$

You’ll find further examples together with detailed explanations in our KB article: How to use Regular Expressions for custom input validation.

How To Use

Custom field validation can be setup via MIDAS Admin Options → Manage MIDAS → Fields.

On any custom number, text, text area, or URL fields, right-click (or long press on touch screens) on the field’s “Required” box.

You’ll then be able to set or modify the Regular Expression that should be used to validate entries to the field.