Posts
58
Comments
103
Trackbacks
10
Maintainability and the Lobster

I would like to pose a rhetorical question to you.

When does a system become unmaintainable?

Regardless of the way the system is built (ie..techniques, tools, frameworks, languages, processes, etc) they are always maintainable at the beginning.  If the application is a total of 300 lines of code, no one cares how those 300 lines of code were written.  In a worst case scenario, I can rewrite the entire application without missing a deadline.  I'd say a 300 line procedural program is maintainable if nothing else than because of its small size.

So there we are with a 300 line program.  We add an additional 50 lines of code for the next feature that our project stakeholder is requesting.  The feature after that is a bit bigger and requires an additional 200 lines of code.  We continue to incrementally grow the system as requested.

Assuming that the code in the example above is written in an unmaintainable way, at what point do we stop and realize that our system has become unmaintainable?

Could it be that the developer on the project never realizes that the system is unmaintainable, much like a lobster in a slowly heating pot.  The lobster has no idea what's coming. 

Slowly over time, much like the lobster, the team slowly finds itself grinding its wheels.  Productivity has not decreased.  They are probably starting to work overtime even.  Costs are starting to very slowly spiral in terms of labor per feature.  Bugs might be incrementally getting worse.  The team, however, hasn't noticed any drastic change in the project or the way they work. 

In one scenario, management eventually cancels the project or a rewrite is undertaken.  This is the death of the lobster.

In another scenario, management decides that even though the project is quite expensive, team morale may be low, and team member turnover is great, the costs justify the end result.  This is equivalent to leaving the lobster at 5 degrees below the death mark.  He will still die eventually.  It's just going to be very slow and painful.  Companies, like development projects, go through cycles.  The project may just have to wait until the company enters a cost-cutting phase before ultimately meeting its untimely demise.

If you are a professional developer, you are the lobster, and you are in a pot of water.  How do you know what temperature the water is?  Is it getting warmer, cooler, or staying the same?  If the temperature is staying the same, how do you know you aren't simmering just below the death mark?

posted on Wednesday, August 15, 2007 6:23 PM Print