Seeing the Big Picture

As programmers we often miss the big picture, we get lost in our little world of technical jargon. Always trying to one up our co-workers, clients, and managers with our dazing use of acromyns and buzzwords. Programmers should be just as concerned about the business of software as the design and development. How we design and development a solution will dramaticly affect the business we are creating it for.

Total Cost of Ownership (TOC), business people understand what this means. Unforturately, not many programmers understand what it means or why they should even care about it. After an applications is created, the business needs to support, enhance, and maintain it for hopefully years to come. This requires a signifcant amount of staff, equipment, and time. All of which cost money.

There are many ways a programmer can reduce the total cost of ownership for a business. One way is to reduce the amount of code the application uses. This is not an easy task, and it often involves a time investment up front. When writing code, we need to be more aware of patterns. If you keep you eyes open and your mind sharp you will see them emerging everywhere. When you see a code pattern starting, you should create a generic function to handle the different variation.

Now the question is, how do we reconize the patterns. Well its actually very simple, Copy and Paste! When we are given a programming task to do, many of us fall into this very bad programming habit. We think we are saving time by copying existing code from one source file and pasting it in another one, change a couple of line and we are all done.

We have all done it at some point or another, however, this one single action has a heavy impact on the bottom line of a business. Lets consider the following case, we create 10 similar source code units containing 200 lines of code each. Other programmers on the same project extent the functionality by 20 more units. Now our code base is 6000 lines of code, if 80% of the code is the same and we have to go back and update 50 line of duplicate code it each unit. Now we will have to update 30 files with the same 50 lines of code, the task isn't very complicated but its tedius, boring, prone to human error, and takes time(money). In addition, functionality preformed by each unit needs to be tested indepentantly, more resources and more money. Now add 3 year of enhancing the application thought unit duplication, and the 10 units you started with becomes 100 units.

Sometimes you won't be able to see an archectiture pattern appear until you have developed a significant amount of code. However, take the time to go back and redesign the common code into a reuseable unit. It will be well worth your time, applying future updates will be painless, and taking advantage of new technologies will be easy.

Tim O'Brien
Netlegger Systems Inc.