Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Mikado Method: How to deal with complex code changes

Jakob
October 06, 2016

The Mikado Method: How to deal with complex code changes

Jakob

October 06, 2016
Tweet

More Decks by Jakob

Other Decks in Technology

Transcript

  1. How people build software ! " The Mikado Method How

    to deal with complex code changes
  2. How people build software ! ! Repairing the dashboard lights

    of a 69’ Pontiac 4 EASY, JUST REPLACE THE BROKEN LIGHT BULBS! … RIGHT?
  3. How people build software ! ! How we play Mikado

    7 • Take a look at the whole cluster • Remove the sticks one by one • Goal: Remove the emperor stick • Don’t touch any other sticks
  4. How people build software ! • Change components one by

    one ! How we play refactoring 8 • Goal: Change this component • Don’t touch any other parts • Take a look at the whole system
  5. How people build software ! • Change components one by

    one ! How we play refactoring 9 • Goal: Change this component • Don’t touch any other parts • Take a look at the whole system
  6. How people build software ! ! What to touch first?

    10 The Mikado Method
 Ola Ellnestam and Daniel Brolund https://www.manning.com/books/the-mikado-method
  7. How people build software ! ! What to touch first?

    11 1. Set a goal 2. Experiment • Naively implement the goal 3. Visualize what broke • Write down sub-goals 4. Revert experiment 5. Pick a sub-goal and repeat 2.
  8. How people build software ! ! 2016: Timeline for user

    profiles 12 • Go back in time • New activity events • Joined GitHub • First repository • First Issue • First pull request
  9. How people build software ! ! The history of contributions

    13 250 500 2012 2013 2014 2015 Lines of code Lines of test code Comlexity
  10. How people build software ! ! Step 1: Set a

    goal 14 DEFINE A STARTING POINT AND AN ENDPOINT. Profiles only show the activity of the last month. 
 % Viewer should be able to browse the whole history.
  11. How people build software ! ! Step 2: Experiment 15

    MAKE A SIMPLE CHANGE AND SEE WHAT BREAKS.
  12. How people build software ! ! Step 3: Visualize 16

    CREATE A DEPENDENCY GRAPH OF STEPS REQUIRED TO REACH THE GOAL. Add timeline to profile Add :to parameter to calendar class Pass :to parameter in XYZ …
  13. How people build software ! ! Step 4: Revert 17

    RESTORE THE WORKING STATE AFTER EVERY EXPERIMENT. > git checkout master
  14. How people build software ! ! How to reach the

    goal? 18 • Repeat the steps for every “failed” experiment • Append requirements to the dependency graph • Revert changes • Commit changes once experiment does not break anything • Work all the way through the dependency graph
  15. How people build software ! ! Benefits 20 • System

    is always in a stable state Goal Requirement … … & & • Graph documents progress • Enables collaboration • Light weight process
  16. How people build software ! ! Challenges 21 • So-close

    syndrome • Revert changes, don’t get trapped! • Ruby is dynamically typed • Rely on tests • Bad test coverage • Add missing tests • Manual testing