Large-Scale Change with the Mikado Method

From time to time, you’ll need to make a large-scale change to the codebase. Perhaps the code passes a few discrete variables all over the place and you want to aggregate them into a struct. Or you want to restructure a large class used by many clients. Making these changes might require a few days or weeks of work. You could slog ahead with your changes, but life isn’t going to be easy for those few days or weeks.

As you begin to make a sweeping change, you typically uncover more places and things that need to change. You may find that the uncovered changes themselves lead to tangential goals that you must first accomplish. A few days grows into a few weeks or more.

You might even run out of time. The business might bump up the priority of another task, forcing you to abandon your trek toward an improved codebase for the time being. If you were working on the mainline (trunk), you’ve possibly left the code in a worse state by leaving around an incomplete solution. Worse, even with all the effort to date, you might still not have a firm grasp on how far you got and how much work is outstanding. Meanwhile, you’ve possibly confused and frustrated the rest of your team as your half-reared solution impinges on the code they’re changing. And even if you do eventually return to your refactoring initiative, chances are you’ll spend ample time coming up to speed on determining where you were and what work remains outstanding.

If you first make your broad changes on a branch, you find that the merge-hell span increases the longer you take to finish. Even incremental merges into your branch may start frustrating you as other developers (with no apparent concern for your health) change the very things you are altering. “Can you please just wait until I’m done?” No.

The Mikado Method, devised by Daniel Brolund and Ola Ellnestam, provides a disciplined approach. You can read extensively about the technique in The Mikado Method [EB14]. The remainder of this chapter will briefly overview the process and take you through a short exercise of applying the technique.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.186.167