Mikado
Method
A tool for large-scale refactorings
REFACTOR ?
PRODUCT OWNER
DEVELOPERS
GARDENING
APP
REFACTOR
Refactoring the old way is like
removing an old stump…
you will also leave some roots…
REFACTOR WITH BRANCHES
Refactoring using branches is like
grafting fruit trees…
you never know that what you can get.
MIKADO METHOD
Refactoring using the Mikado Method
is like pruning ornamental trees…
• You can work in an incremental process.
• You can always change the shape.
• You always see what you get.
REFACTORING

THE OLD WAY
RIGOROUS ANALYSIS
GUESS
PROBLEMS
APP

My change
APP

My change
APP

My change
APP

My change
APP

My change
APP

My change
REVERT
REFACTORING

USING BRANCHES
WHEN THE BRANCH IS CREATED
MERGING BRANCHES
AFTER MERGING BRANCHES
PROBLEMS
REFACTORING

MIKADO METHOD
Do you know
how to play
mikado game?
INCREMENTAL
LIGHTWEIGHT
VISIBILITY
STABILITY
CONTINUOS DEPLOYMENT
COMMUNICATION
LEARNING
WORK DONE
COLLABORATION
WORKLOAD
EASY
HOW IT WORKS ?
COMPILED
&
INTERPRETED
STEP 1

Naive implementation
STEP 1.1

Is something new failing ?

YES - STEP 2
NO - STEP 8
STEP 2

What is failing?
STEP 3

Document the
pre-requisites
to fix that is failing
STEP 4

Document the graph
STEP 5

Revert your changes.
STEP 5.1

There are more pre-requisites
in this level?

YES - STEP 6
NO - STEP 7
STEP 6
Get the next pre-requisite
GOTO STEP 1
repeat the process
STEP 7
Down one level
GOTO STEP 5.1
STEP 8

Pre-requisite has been
FIXED
STEP 9

Document the graph
APP

A change

STEP 1
APP

A change

STEP 2
STEP 3-4

APP
Pre-req

Pre-req

A change

Pre-req
STEP 5

APP
Pre-req

Pre-req

A change

Pre-req
STEP 5

APP
Pre-req

Pre-req

A change

Pre-req
STEP 6-1

APP
Pre-req

Pre-req

A change

Pre-req
STEP 2

APP
Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 3-4

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 5

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 1

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 1

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 1

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 1

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 1

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
Pre-req

STEP 1

APP

Pre-req

Pre-req

Pre-req

A change

Pre-req
WRITE DOWN YOUR GOAL

SEEK THINGS TO TRY

BACK OUT BROKEN CODE
FIX THE PRE-REQUISITES
RECURSIVELY
ALWAYS DELIVERABLE FROM THE MAIN BRANCH
No more broken environments
No more merging issues
GOAL FOCUS
Do only the necessary
VISUALIZATION OF GRAPH
Best documentation
Improve communication
Improve cooperation
HAPPY TEAM
Mikado method

Mikado method