Friday, February 19, 2010

The "I discovered a new software architecture" syndrome

I've started to notice a trend in software architecture articles.

The article generally goes something like this: "I redesigned my software system using architecture X, and my software is sooooo much better, therefore architecture X is the way forward".

X is normally some variation on an object-orientated design pattern.

Now, I have nothing against this - X is generally a decent design pattern and I'm sure the engineer in question improved his/her software.

But something nags at me......

If you have a large crufty codebase, and you make small incremental changes, things may improve, but lots of cruft is left behind.

However, if you make a fairly large re-organisation to your codebase __and__ you understand your codebase very well, you will __inevitably__ improve your code.

This is because once you have achieved a deep understanding of your own code, once you start a re-organisation, all sorts of things tend to fall into place, and you generally manage to clean up lots and lots of dank, musty corners in the process.

This, I submit, accounts for a large chunk of the improvement in the code. Which is not a bad thing.

It just means that we need to be careful not ascribe too much of the benefit to the architecture and become zealots for that cause.