Chapter 2. Hello, Mikado Method!

 

This chapter covers

  • Two tiny Mikado Method examples
  • Baby steps and safe refactorings
  • How to soften a hard dependency

You probably picked up this book because you’re in a tricky situation. Maybe you’re facing a mess, a legacy system, or a big ball of mud. No matter what you call it, it’s time to put the Mikado Method to the test and see what it can do for your code. After you’ve finished this chapter, you’ll have a basic idea about how to improve code without breaking your system while doing so.

As a first example, we’ve chosen a small system so you won’t have to wade through pages of code while learning the method. Our goal is to keep the amount of code to a minimum throughout this book so you can focus on the method, not on reading code.

You’ll see two examples in this chapter. The first is a tiny example that will show you the mechanics of a change done the Mikado way. Then we’ll get into a slightly more complicated example where we’ll iterate and apply what you learned in the first example several times over, changing a bigger chunk of code, but still in a careful way.

2.1. Your first Mikado Graph

2.2. A slightly more complicated change

2.3. Making the code configurable

2.4. Summary

sitemap