The ultimate sophistication

Simplicity is the ultimate sophistication” said Leonardo Da Vinci recognising how difficult it is to keep things simple. Simplicity is hard work and is not, as some might want to believe, an easy way out.

In Chapter 4 of their book Implementing Lean Software Development, Mary and Tom Poppendieck identify complexity as the root cause of all waste in software development.

If we were to look for the root cause of waste in software development, a really good candidate would be complexity. Complexity calcifies our code and causes it to turn brittle and break.

Implementing Lean Software Development

Complexity is the result of passive developers that allow the code to deteriorate over time. To achieve simplicity developers have to actively and consciously seek to improve the code. They have to be on their toes to identify the trouble spots and tackle them relentlessly through continuous incremental refactoring.

In Lean, work is divided into Minimum Useful Feature Sets (MUFS) and these sets are deployed one at a time. Each set would include a number of refactorings that keep the design clean and simple.

… the code is refactored and simplified with each new feature set. This helps minimize the complexity of the code base, thus minimizing its lifecycle cost.

Implementing Lean Software Development

The importance of refactoring can not be over-emphasised. It is an integral part of any agile development effort and needs to be recognised as such. It is too easy to fall in the ‘ain’t broke don’t fixt it’ trap and let the code rot to a slow and painful death. The only way to keep a lid on complexity is though the aggregation of small, frequent refactorings.

This in turn requires a good suite of tests to be able to refactor with confidence, CI builds to detect when tests are broken, frequent release of MUFS into production and, perhaps even harder to get, a general understanding that refactoring is an ongoing process that continues for the life of the product or project.