03.30.09

Please Wash Your Hands before Software Surgery

Posted in Design Styles, Programming, Technical Debt at 1:40 pm by Administrator

It was in the 19th century before surgeons learned that washing their hands and sterilizing their instruments would save lives. After thousands, if not millions, of years there was recognition of the unseen. The change was the result of technology. Technology in the form of the microscope revealed a hidden world of disease. Many did not believe it at first, but today it would be unthinkable for a surgeon to not wash before surgery.

So why do software surgeons need to wash their hands? There is no unseen disease. Everyone can see the software and everything about it. Can’t they see it? Software lives inside of the computers we run and everyone can … Well, maybe we cannot exactly see it, but what is this about washing our hands?

Before you perform an operation, think about where your hands have been. You live in a nasty world of design patterns for software. All software you touch leaves its residue. Any software you are called upon to do surgery was created in the past. How far in the past will determine the design pattern thinking of that time. But, you live in the current time and view what you see by what you know now.

The Aztec Indians were a strong society before Spain invaded them and brought all of their Eastern diseases and concepts of civilization. The Spanish took their gold and destroyed the documented evidence of the Aztec existence. They superimposed their ideas upon another nation with the eventual extinction of the Aztec society. Their surgery killed the patient.

Remember those times when you or a small team developed new software? The software was well organized. Everything was designed to fit together perfectly. The processes, the databases, and the flow of web pages all played together like a symphony. Think again. How far back was this? Would you do it the same way today? Probably not!

There has been much written about the concept of refactoring. The idea is that any software enhancements that would go outside of the original software’s design should prompt an effort to restructure the software. This is a good concept, but is often ignored due to the additional cost to do the restructuring and the additional testing required.

Sometimes, only a little restructuring is all that is needed. Apply today’s concepts where appropriate. This is usually done with intent and careful planning and can be successful. The changes to be concerned about are those that are made because the surgeon only applies newer methods when these methods may violate the original design of the software.

Next time, before you use data elements in new ways not originally conceived or you plan to litter conditional logic throughout the software to plug holes, consider the patient. Consider the design patterns used by the software designers. Avoid these “quick and dirty” solutions. They are duct tape solutions. Do not be a software surgeon that does not wash before surgery.

« Previous entries Next Page » Next Page »