DEV Community


The Mikado Method

tinydevops profile image Jonathan Hall Originally published at on ・1 min read

I’ve been refactoring on some very brittle, poorly-written code lately. One method I like to use in a situation like this is the “Mikado Method”, as described in the book by the same name.

But the gist of it is that it’s a system of quick, iterative experimentation for rapid, but safe changes to code.

  1. Set a goal (e.g. add a new feature to the web service)
  2. Experiment and break things (e.g. try the first thing that comes to mind to move toward your goal)
  3. Visualise (e.g. write down the things that broke in a “Mikado diagram”)
  4. Undo (e.g. git reset HEAD)

A Mikado diagram

The breaking pieces in step 2 become new goals, then you repeat. Eventually, your experiments won’t break things, and they become final code that you commit, and mark off of the diagram.

This practice can apply to non-coding activities, as well. For example in a my (very low-production quality) video of a workshop I did, we apply this practice to increasing sex appeal!

If you enjoyed this message, subscribe to The Daily Commit to get future messages to your inbox.

Discussion (0)

Forem Open with the Forem app