09 November 2006

Code Jenga

Imagine a game of Jenga except every fourth piece is booby-trapped.

Anyone who has worked on a suitably mature commercial codebase knows exactly what I am on about. You are severely restricted in what you can change and you are always having to look for unforeseen consequences.

That is why it is like a game of Jenga, you remove one piece or replace it but you run the risk of it all toppling down. I guess that is why clean slates are probably so appealing to programmers, as you reach a state of coding entropy where it is collapsing under its own weight.

How many times have you tried to rewrite and replace something that was badly engineered and found that there were numerous side-effects. Regression and unit testing are great things, but marketing and sales don't care about that, and it all costs money after all.

So next time you are banging your head up against a brick wall with what you are working on, it is just Code Jenga.