Legacy Code — messy code lacking sufficient automated tests — is endemic in most organisations that develop their own software, especially those that treat software as a handmaiden to other business areas. It’s a slow disease that kills productivity and morale.
Instead of resorting to a blame game and inadequate workarounds I can help you to get to the root cultural and technical causes, so that we can co-create a contextually appropriate cure.
The sound reason for allowing some Legacy Code
We get Legacy Code in the first place because early on the disciplines that prevent it are (with some justification) regarded as a luxury and not normally taken as a priority: with a small codebase the emphasis is usually on uncovering customer and stakeholder needs and there is a legitimate reason to sacrifice short-term internal quality — early code is often treated as a prototype that may never see the light of day. Developers who focus on internal quality at this stage may be accused of over-engineering.
The problem is that few organisations have the discipline to increase the quality of successful software products in the sweet spot after the time when the software has established its usefulness and before it grows to a size where the standard techniques can no longer be safely applied. Mostly, it’s a case of “release the prototype” and the pain and costs of ignoring the problem only become apparent some time later.
Putting the Legacy Genie back in the bottle
Having faced this problem many times I have developed a suite of approaches to help organisations prevent or heal the blight of Legacy Code:
- Avoid the problem in the first place through excellent technical leadership and well-trained and disciplined developers.
- Put the legacy genie back in the bottle with less well-known yet highly effective approaches, with the support of excellent technical leadership and more highly trained and disciplined developers.
I arranged for Dan to come in and conduct a 2-day TDD, Pairing and property-based testing workshop. It was an awesome learning experience and really helped transform the mentality of the participants.
The subsequent step-change in pairing, test coverage, and team productivity has been incredible to see.
Richard Harrison, CTO, Bueno Systems

How I can help
I offer a range of training and coaching solutions to help technical leaders and teams understand how to prevent and fix Legacy Code, through leadership, collaboration, discipline, and smart technical practices.
