Harmony 4 Development Blog

Friday, June 23, 2006

Quality Control - Part 1

When implementing any large and complicated system, error management is crucial. Where do errors come from? For a plugin like Harmony4, here are just an example of possibilities:

User’s Computer: Runs out of memory, disk fills up or has an error, a conflicting or malice 3rd party software process, CPU runs out of gas, O/S error.

Software Bug: Error introduced during development or design.

User Error: User does something bad like deleting important files (you could argue that the O/S should prevent this). The user might try to save a preset with an invalid file name, or they may try to overwrite a read-only file.

There are many possibilities beyond these. The trick is knowing how to deal with each error that may arise, properly informing the user, and if required, offering a decipherable choice of action.

During development, we are imminently concerned with our own errors. Trapping errors properly at this stage can mean the difference between chasing bugs for a day, or a month. We generally use three methods which I’ll describe metaphorically. I’ll call these methods “excessive traffic lights”, “black box recorder”, and “driver training”.

Excessive traffic lights
If you wanted very safe streets, you’d throw up lots of traffic lights, stop and yield signs, and impose all sorts of traffic bylaws everywhere you thought an accident could happen. While this might work, you’ll likely infuriate people with extremely slow traffic. You may also create grid lock, and perhaps a violent coup would spell the end of your governing term.

Black box recorder
Another good way to determine what went wrong, is to install a black box recorder in all vehicles. After an accident, read the log of exactly what happened. Then, improve the intersection as required.

Driver training
Improve the quality of your drivers! At the beginning, force a driving instructor to sit in the car, asserting complaints and warnings whenever the new driver does something unexpected. Sure, the car may have to be pulled over, and you may have to drag the lousy driver back to the class room, but eventually they’ll learn, and fewer traffic accidents will hopefully be the result.

Part 2 of “Quality Control” will discuss how we decide when to use each of these three methods in development. (To be posted June 26th)

Stephen Evans
Developer