Saturday, 19 November 2011

Keep it simple stupid

In my experience it is very easy to add complexity. This usually arrives under the banner of "quick win" where shortcuts are taken and never resolved.
It is a lot harder to remove complexity but that is exactly what needs to be done. An example of this came my way a few months ago, the code I was reviewing was fairly good, well commented, well structured, however there as an awful lot of it.
It looked a lot like a code generator ( or copy and paste ) had been used a lot, but the sheer volume of the code was causing a problem.
When it came to wanting to enhance the code, there were some performance enhancements that needed to be made, the amount of code duplication made the task larger than it needed to be and more risk prone to 'fat fingers' syndrome when alterations were made, but there was a reluctance by management to spend the time refactoring, so this problem would occur again and again.

0 comments:

Post a Comment