Beheading the legacy       beastRefactorings & restructurings withThe Mikado Method   Daniel Brolund   @danielbrolund   #m...
Code     ch   ange                 horr                     or st                          ories                          ...
Once upon a time,we were to change  a codebase...
Lets say this was our system...
A changeWe were to make a change...
✘                        ✘        ✘✘             A change                  ✘✘✘                   ✘...but we got some error...
✘                         ✘         ✘✘              A change                   ✘✘✘                    ✘Patching led to mor...
✘          ✘ ✘✘✘ ✘                 ✘                         ✘  ✘      ✘✘              A change                   ✘✘✘     ...
✘                                   ✘         ✘                       ✘   ✘                                   ✘          ✘...
✘                                   ✘         ✘                       ✘   ✘                                   ✘          ✘...
✘                                          ✘                ✘                       ✘   ✘                                 ...
✘                   ✘                     ✘ ✘                    ✘ ✘                                      ✘          ✘    ...
✘                       ✘                     ✘ ✘                        ✘ ✘                                      ✘       ...
✘                  ✘                     ✘ ✘                   ✘ ✘                                      ✘         ✘       ...
We could only revert.
But we reallyneeded to do that change!
A changeThe samechange...
✘✘               ✘                     ✘      A change         ✘✘✘          ✘...the same  errors...
This time, we noted a         prerequisite for each            of the errors...✘✘              ✘                    ✘     ...
This time, we noted a               prerequisite for each                  of the errors...Prereq                ✘      ✘✘...
This time, we noted a               prerequisite for each                  of the errors...Prereq                ✘       P...
This time, we noted a                prerequisite for each                   of the errors...Prereq                 ✘     ...
...then we reverted the                  errors,           but we kept the notes!Prereq               Prereq          A ch...
Then we        Prereq               Prereq  implemented the              A changeprerequisites, one at a       time...    ...
Then we        Prereq               Prereq  implemented the              A changeprerequisites, one at a       time...    ...
...got new  errors...                              ✘ ✘                               ✘✘              ✘✘ ✘                ✘...
...noted the new  prerequisites...                                 ✘ ✘                                  ✘✘                ...
...noted the new  prerequisites...                                    ✘ ✘                                     ✘✘          ...
...noted the new  prerequisites...                            Prereq✘✘ ✘                                    ✘             ...
...andreverted  again                  Prereq✘✘ ✘                                 ✘           Prereq✘✘ ✘                  ...
...andreverted  again              Prereq           Prereq                    Prereq                Prereq                ...
Picked the next leaf  a.s.o...             Prereq             Prereq                      Prereq                Prereq    ...
...until we could do a   prerequisite w/o         errors                           Prereq             Prereq              ...
We continued         with all leaves...              Prereq                       ✔Prereq         ✔             Prereq    ...
Prereq                                     ✔              Prereq                       ✔                           Prereq ...
Prereq                       ✔Prereq         ✔             Prereq    ✔               ✔ ...fulfilling                       ...
Prereq                       ✔Prereq         ✔             Prereq    ✔               ✔                                    ...
Prereq                       ✔Prereq         ✔             Prereq    ✔                ✔                                   ...
Prereq                       ✔Prereq         ✔             Prereq    ✔                ✔                                   ...
Prereq                       ✔Prereq         ✔             Prereq    ✔                ✔                                   ...
Mikado Method    “rules”
Mikado Method         “rules”Write down yo ur goal
Mikado Method         “rules”Write down yo ur goal                        Seek things to try
Mikado Method             “rules”   Write down yo ur goal                           Seek things to tryBack out broken cod ...
Mikado Method             “rules”   Write down yo ur goal                               Seek things to tryBack out broken ...
Benefits
BenefitsAlways deliverable - from the main branch
BenefitsAlways deliverable - from the main branch     Goal focus - do only the necessary
BenefitsAlways deliverable - from the main branch     Goal focus - do only the necessary Visualization - memo and cooperation
The Mikado Method?!?
The Mikado Method?!?
?!?Now, where’s the code...?!?
Lets do an example!
Welcome to Pasta Inc.
Exercise: D.I.Y.Instructions:http://mikadomethod.wordpress.com/exercises/Code:https://github.com/mikadomethod/kata-javaGit...
The book                             Beheading the                                                Legacy Beast            ...
Questions?         ???...or catch me later!
Mikado Method - Beheading the Legacy Beast - Agile India 2012
Mikado Method - Beheading the Legacy Beast - Agile India 2012
Mikado Method - Beheading the Legacy Beast - Agile India 2012
Mikado Method - Beheading the Legacy Beast - Agile India 2012
Upcoming SlideShare
Loading in …5
×

Mikado Method - Beheading the Legacy Beast - Agile India 2012

1,324 views
1,174 views

Published on

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,324
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
40
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Mikado Method - Beheading the Legacy Beast - Agile India 2012

  1. 1. Beheading the legacy beastRefactorings & restructurings withThe Mikado Method Daniel Brolund @danielbrolund #mikadomethod @mikadomethod
  2. 2. Code ch ange horr or st ories !!
  3. 3. Once upon a time,we were to change a codebase...
  4. 4. Lets say this was our system...
  5. 5. A changeWe were to make a change...
  6. 6. ✘ ✘ ✘✘ A change ✘✘✘ ✘...but we got some errors...
  7. 7. ✘ ✘ ✘✘ A change ✘✘✘ ✘Patching led to more errors...
  8. 8. ✘ ✘ ✘✘✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘Patching led to more errors...
  9. 9. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘Patching led to more errors...
  10. 10. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘Patching led to more errors...
  11. 11. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘...and each patch led to even more errors...
  12. 12. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘...and each patch led to even more errors...
  13. 13. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘Like trying to stop the shockwave with our hands...
  14. 14. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ We could only revert.
  15. 15. We could only revert.
  16. 16. But we reallyneeded to do that change!
  17. 17. A changeThe samechange...
  18. 18. ✘✘ ✘ ✘ A change ✘✘✘ ✘...the same errors...
  19. 19. This time, we noted a prerequisite for each of the errors...✘✘ ✘ ✘ A change ✘✘✘ ✘
  20. 20. This time, we noted a prerequisite for each of the errors...Prereq ✘ ✘✘ ✘ A change ✘✘✘ ✘
  21. 21. This time, we noted a prerequisite for each of the errors...Prereq ✘ Prereq ✘✘ ✘ A change ✘✘✘ ✘
  22. 22. This time, we noted a prerequisite for each of the errors...Prereq ✘ Prereq ✘✘ ✘ A change ✘✘✘ Prereq ✘
  23. 23. ...then we reverted the errors, but we kept the notes!Prereq Prereq A change Prereq
  24. 24. Then we Prereq Prereq implemented the A changeprerequisites, one at a time... Prereq
  25. 25. Then we Prereq Prereq implemented the A changeprerequisites, one at a time... Prereq
  26. 26. ...got new errors... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change Prereq
  27. 27. ...noted the new prerequisites... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change Prereq
  28. 28. ...noted the new prerequisites... ✘ ✘ ✘✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change Prereq
  29. 29. ...noted the new prerequisites... Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change Prereq
  30. 30. ...andreverted again Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change Prereq
  31. 31. ...andreverted again Prereq Prereq Prereq Prereq A change Prereq
  32. 32. Picked the next leaf a.s.o... Prereq Prereq Prereq Prereq A change Prereq
  33. 33. ...until we could do a prerequisite w/o errors Prereq Prereq ✔ Prereq Prereq A change Prereq
  34. 34. We continued with all leaves... Prereq ✔Prereq ✔ Prereq Prereq A change Prereq
  35. 35. Prereq ✔ Prereq ✔ Prereq ✔ Prereq ...getting transient A changeprerequisites in place... Prereq
  36. 36. Prereq ✔Prereq ✔ Prereq ✔ ✔ ...fulfilling Prereq prerequisites... A change Prereq
  37. 37. Prereq ✔Prereq ✔ Prereq ✔ ✔ Prereq A change ...working the way Prereq ✔ back to the original change
  38. 38. Prereq ✔Prereq ✔ Prereq ✔ ✔ Prereq A change Prereq ✔ In time, all prerequisites for the original change were in place...
  39. 39. Prereq ✔Prereq ✔ Prereq ✔ ✔ Prereq A change ✔ Prereq ✔ The change was now easy to implement.
  40. 40. Prereq ✔Prereq ✔ Prereq ✔ ✔ Prereq A change ✔ Prereq ✔ We’re done!
  41. 41. Mikado Method “rules”
  42. 42. Mikado Method “rules”Write down yo ur goal
  43. 43. Mikado Method “rules”Write down yo ur goal Seek things to try
  44. 44. Mikado Method “rules” Write down yo ur goal Seek things to tryBack out broken cod e
  45. 45. Mikado Method “rules” Write down yo ur goal Seek things to tryBack out broken cod e es re cursively rere quisit Fix the p
  46. 46. Benefits
  47. 47. BenefitsAlways deliverable - from the main branch
  48. 48. BenefitsAlways deliverable - from the main branch Goal focus - do only the necessary
  49. 49. BenefitsAlways deliverable - from the main branch Goal focus - do only the necessary Visualization - memo and cooperation
  50. 50. The Mikado Method?!?
  51. 51. The Mikado Method?!?
  52. 52. ?!?Now, where’s the code...?!?
  53. 53. Lets do an example!
  54. 54. Welcome to Pasta Inc.
  55. 55. Exercise: D.I.Y.Instructions:http://mikadomethod.wordpress.com/exercises/Code:https://github.com/mikadomethod/kata-javaGit:git clone git://github.com/mikadomethod/kata-java.gitgit clone git://github.com/mikadomethod/kata-dotnet.git
  56. 56. The book Beheading the Legacy Beast Relentless restructurings withDaniel Brolund @danielbrolund The Mikado MethodOla Ellnestam @ellnestam#mikadomethod @mikadomethodhttp://mikadomethod.orghttp://mikadomethod.wordpress.com/bookhttp://groups.google.com/group/mikado-method Daniel Brolund Ola Ellnestam Foreword by Tom Poppendieck
  57. 57. Questions? ???...or catch me later!

×