You are currently viewing Software 911: A Shift Scheduling System That Can’t Schedule

Software 911: A Shift Scheduling System That Can’t Schedule

  • Post published:April 28, 2015

We’re relatively used to being tossed code that has been inordinately bruised, battered and shaken only to detangle its strangled mess, creating the software our client had desired from the very beginning.

The idea behind one recent project that fit this description to a “t” was to have a functional shift scheduling system where employees would be assigned work shifts on both a weekly and monthly basis, assigned various tasks corresponding to those shifts. The project had been initially developed in Yii-framework, and a Gii auto-code generator tool was used to expedite the process.

We immediately jumped on saving the code base, salvaging it from damaging loop holes that had been created initially by exploiting the framework. MVC pattern had not been adhered to, there was a multitude of copy/pasted code, and the Yii-framework relationship management was missing within that code. In short, it was a mess.

The major issue is that copy/pasting generic code means multiple database queries during the request life cycle. We refactored this code into the correct functions at the appropriate places to avoid repetitive data transactions and cached so that we could optimize both the application load and processing time – highly functional behaviors that copy/pasted code would never allow for.

In vehicular terms, this code was the Kia Rio of the software world.

We also set up missing database relationships within Yii so that each model would be connected to its match as per the database, and eradicated all unnecessary Java inclusions that would only have served to slow the program down.

Breaking it all down, we started out with a traditional website upon which visitors filled out forms. It was not interactive and was fundamentally broken. Once we were through with it, there were dynamic drag-and-drop shift blocks, a copy/paste function (ironic, huh?), and easy shift changes – no refreshes or delays.

Our user would now be able to see employee hours, costs and other shift settings being updated upon his or her actions, real-time.

We remain tasked on this program and manage its progression on a continuous basis.