One of the most painful activities in software development is maintaining extremely poor legacy code. Teams transitioning to Agile suffer from challenges like moving towards shorter iterations with limited time for regression testing, trying to cover poor code with automated tests, prioritizing which refactorings to apply on which code, and convincing managers with the value of refactoring.
In this session, I will present a simple, sustainable, and stepwise approach. This approach divides the effort to refactor legacy code into three stages:
1. Quick-wins; simple and least risky enhancements
2. Divide-and-conquer the code into functional, utility, and architectural components, with identified and clear component interfaces
3. Inject-quality-in the code by wrapping components with automated tests
I will also give an overview of several experiments and case studies applying this approach and will present some interesting observations and insights about refactoring legacy applications. Finally, if time allows, I will drive you through some of the key roadmap activities to refactor (or tame) a large cluttered code base.
The video shown is from Agile2014.