Use the Mikado Method to do safe changes in a complex codebase
2 days ago
- #legacy-code
- #mikado-method
- #refactoring
- The Mikado Method is a structured approach to making safe changes in complex codebases.
- It involves setting a clear goal, working in short timeboxes, and reverting changes if the goal isn't met.
- Subgoals are identified and tackled one by one to make the main goal easier to achieve.
- Committing progress frequently ensures the code remains in a shippable state.
- The method is inspired by the Mikado pick-up sticks game, where you remove easy sticks first.
- Practical advice includes keeping timeboxes short (e.g., 10 minutes) and committing after each subgoal.
- The approach helps avoid the 'quicksand' effect where small changes lead to more problems.
- The Mikado Method is useful for ambitious refactorings and dependency upgrades.
- The method promotes incremental progress and maintains code stability.