How do you retrofit code quality?

Modern best practises dictate that you should have automated testing with linting, full test coverage with real data and continuous integration. Development should have been done through peer reviewed pull requests.

But what if a system or some part of the system already exists without all of this in place? Even today it can still be hard enough to convince people of the benefits of following best practises during development. Now imagine trying to convince them of slowing or pausing work on new features so you can get the house in order. Never an easy conversation.

Even if your team has a “chore budget” (and you should!), turning the ship around to focus on code quality might require a massive amount of effort, especially for large established projects.

There is always the temptation to throw it all out and rewrite. True refactors can also be really hard. Can you get there incrementally? Whichever approach the team decides on it will require full buy-in at the highest levels.

But code quality and a codebase you can trust is always worth it in the end.

Le Roux Bodenstein @lerouxb