Mikado Method - Beheading the Legacy Beast - Agile India 2012

Beheading the legacy
       beast
Refactorings & restructurings with
The Mikado Method
   Daniel Brolund   @danielbrolund
   #mikadomethod    @mikadomethod
Mikado Method - Beheading the Legacy Beast - Agile India 2012
Code
     ch   ange
                 horr
                     or st
                          ories
                               !!
Once upon a time,
we were to change
  a codebase...
Mikado Method - Beheading the Legacy Beast - Agile India 2012
Lets say this was our system...
A change




We were to make a change...
✘
                        ✘
        ✘✘

             A change


                  ✘✘✘
                   ✘




...but we got some errors...
✘
                         ✘
         ✘✘

              A change


                   ✘✘✘
                    ✘




Patching led to more errors...
✘
          ✘
 ✘✘
✘ ✘                 ✘
                         ✘
  ✘      ✘✘

              A change


                   ✘✘✘
                    ✘




Patching led to more errors...
✘
                                   ✘
         ✘                       ✘   ✘
                                   ✘
          ✘
 ✘✘
✘ ✘                 ✘
                         ✘
  ✘      ✘✘

              A change


                   ✘✘✘
                    ✘




Patching led to more errors...
✘
                                   ✘
         ✘                       ✘   ✘
                                   ✘
          ✘
 ✘✘
✘ ✘                 ✘
                         ✘
  ✘      ✘✘

              A change


                   ✘✘✘           ✘
                    ✘                 ✘
                                       ✘
                                     ✘
         ✘
          ✘ ✘✘
            ✘




Patching led to more errors...
✘
                                          ✘
                ✘                       ✘   ✘
                                          ✘
                 ✘
        ✘✘
       ✘ ✘                 ✘
                                ✘
         ✘      ✘✘

                     A change


                          ✘✘✘           ✘
                           ✘                 ✘
                                              ✘
                                            ✘
                ✘
                 ✘ ✘✘
                   ✘




...and each patch led to even more errors...
✘
                   ✘                     ✘ ✘
                    ✘ ✘                                      ✘
          ✘                                                   ✘ ✘
           ✘ ✘                                 ✘
                                                     ✘
                        ✘                          ✘   ✘
                                                     ✘
 ✘                      ✘
  ✘ ✘     ✘✘
         ✘ ✘                       ✘
                                        ✘                      ✘
           ✘            ✘✘                                      ✘ ✘
  ✘
   ✘ ✘                       A change


                                  ✘✘✘              ✘
                                   ✘                    ✘
                                                         ✘          ✘
                                                       ✘             ✘ ✘
                        ✘
                         ✘ ✘✘
                 ✘         ✘
                  ✘ ✘              ✘
                                    ✘ ✘




...and each patch led to even more errors...
✘
                       ✘                     ✘ ✘
                        ✘ ✘                                      ✘
              ✘                                                   ✘ ✘
               ✘ ✘                                 ✘
                                                         ✘
                            ✘                          ✘   ✘
                                                         ✘
     ✘                      ✘
      ✘ ✘     ✘✘
             ✘ ✘                       ✘
                                            ✘                      ✘
               ✘            ✘✘                                      ✘ ✘
      ✘
       ✘ ✘                       A change


                                      ✘✘✘              ✘
                                       ✘                    ✘
                                                             ✘          ✘
                                                           ✘             ✘ ✘
                            ✘
                             ✘ ✘✘
                     ✘         ✘
                      ✘ ✘              ✘
                                        ✘ ✘




Like trying to stop the shockwave with our hands...
✘
                  ✘                     ✘ ✘
                   ✘ ✘                                      ✘
         ✘                                                   ✘ ✘
          ✘ ✘                                 ✘
                                                    ✘
                       ✘                          ✘   ✘
                                                    ✘
✘                      ✘
 ✘ ✘     ✘✘
        ✘ ✘                       ✘
                                       ✘                      ✘
          ✘            ✘✘                                      ✘ ✘
 ✘
  ✘ ✘                       A change


                                 ✘✘✘              ✘
                                  ✘                    ✘
                                                        ✘          ✘
                                                      ✘             ✘ ✘
                       ✘
                        ✘ ✘✘
                ✘         ✘
                 ✘ ✘              ✘
                                   ✘ ✘




              We could only revert.
We could only revert.
Mikado Method - Beheading the Legacy Beast - Agile India 2012
But we really
needed to do
 that change!
A change




The same
change...
✘✘               ✘
                     ✘


      A change



         ✘✘✘
          ✘




...the same
  errors...
This time, we noted a
         prerequisite for each
            of the errors...
✘✘              ✘
                    ✘


     A change



        ✘✘✘
         ✘
This time, we noted a
               prerequisite for each
                  of the errors...
Prereq                ✘
      ✘✘                  ✘


           A change



              ✘✘✘
               ✘
This time, we noted a
               prerequisite for each
                  of the errors...
Prereq                ✘       Prereq
      ✘✘                  ✘


           A change



              ✘✘✘
               ✘
This time, we noted a
                prerequisite for each
                   of the errors...
Prereq                 ✘       Prereq
      ✘✘                   ✘


            A change



                ✘✘✘
           Prereq ✘
...then we reverted the
                  errors,
           but we kept the notes!

Prereq               Prereq



          A change



         Prereq
Then we        Prereq               Prereq


  implemented the              A change
prerequisites, one at a
       time...                Prereq
Then we        Prereq               Prereq


  implemented the              A change
prerequisites, one at a
       time...                Prereq
...got new
  errors...
                              ✘ ✘
                               ✘✘
              ✘✘ ✘
                ✘

                     Prereq                     Prereq



                                     A change



                                    Prereq
...noted the new
  prerequisites...
                                 ✘ ✘
                                  ✘✘
                 ✘✘ ✘
                   ✘

                        Prereq                     Prereq



                                        A change



                                       Prereq
...noted the new
  prerequisites...
                                    ✘ ✘
                                     ✘✘
              Prereq✘✘ ✘
                      ✘

                           Prereq                     Prereq



                                           A change



                                          Prereq
...noted the new
  prerequisites...
                            Prereq✘✘ ✘
                                    ✘
              Prereq✘✘ ✘
                      ✘

                           Prereq                    Prereq



                                          A change



                                         Prereq
...and
reverted
  again                  Prereq✘✘ ✘
                                 ✘
           Prereq✘✘ ✘
                   ✘

                        Prereq                    Prereq



                                       A change



                                      Prereq
...and
reverted
  again              Prereq

           Prereq


                    Prereq                Prereq



                               A change



                              Prereq
Picked the
 next leaf
  a.s.o...             Prereq

             Prereq


                      Prereq                Prereq



                                 A change



                                Prereq
...until we could do a
   prerequisite w/o
         errors
                           Prereq

             Prereq
                      ✔
                          Prereq                Prereq



                                     A change



                                    Prereq
We continued
         with all leaves...

              Prereq
                       ✔
Prereq
         ✔
             Prereq                    Prereq



                            A change



                           Prereq
Prereq
                                     ✔
              Prereq
                       ✔
                           Prereq    ✔               Prereq


  ...getting transient                    A change
prerequisites in place...
                                         Prereq
Prereq
                       ✔
Prereq
         ✔
             Prereq    ✔               ✔ ...fulfilling
                                       Prereq

                                            prerequisites...
                            A change



                           Prereq
Prereq
                       ✔
Prereq
         ✔
             Prereq    ✔               ✔
                                       Prereq



                            A change

                                      ...working the way
                           Prereq   ✔     back to the
                                         original change
Prereq
                       ✔
Prereq
         ✔
             Prereq    ✔                ✔
                                        Prereq



                            A change



                           Prereq   ✔


         In time, all prerequisites
          for the original change
              were in place...
Prereq
                       ✔
Prereq
         ✔
             Prereq    ✔                ✔
                                        Prereq



                            A change
                                       ✔
                           Prereq   ✔


         The change was now
          easy to implement.
Prereq
                       ✔
Prereq
         ✔
             Prereq    ✔                ✔
                                        Prereq



                            A change
                                       ✔
                           Prereq   ✔




         We’re done!
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 try
Back out broken cod
                   e
Mikado Method
             “rules”

   Write down yo ur goal

                               Seek things to try
Back out broken cod
                     e
                                     es re cursively
                         rere quisit
             Fix   the p
Benefits
Benefits


Always deliverable - from the main branch
Benefits


Always deliverable - from the main branch
     Goal focus - do only the necessary
Benefits


Always deliverable - from the main branch
     Goal focus - do only the necessary
 Visualization - memo and cooperation
The Mikado Method?!?
The Mikado Method?!?
Mikado Method - Beheading the Legacy Beast - Agile India 2012
?!?
Now, where’s the code...?!?
Let's do an example!
Welcome to Pasta Inc.
Exercise: D.I.Y.
Instructions:
http://mikadomethod.wordpress.com/exercises/

Code:
https://github.com/mikadomethod/kata-java

Git:
git clone git://github.com/mikadomethod/kata-java.git

git clone git://github.com/mikadomethod/kata-dotnet.git
The book                             Beheading the
                                                Legacy Beast
                                                Relentless restructurings with

Daniel Brolund        @danielbrolund            The Mikado Method

Ola Ellnestam         @ellnestam
#mikadomethod         @mikadomethod


http://mikadomethod.org
http://mikadomethod.wordpress.com/book
http://groups.google.com/group/mikado-method    Daniel Brolund
                                                 Ola Ellnestam
                                                          Foreword by   Tom Poppendieck
Questions?
         ???




...or catch me later!
1 of 61

Recommended

Mikadomethod tad2011 by
Mikadomethod tad2011Mikadomethod tad2011
Mikadomethod tad2011danielbrolund
693 views137 slides
Webdynpro Excel Data Upload by
Webdynpro Excel  Data Upload Webdynpro Excel  Data Upload
Webdynpro Excel Data Upload guest28d364
525 views8 slides
Utvecklarens klagan by
Utvecklarens klaganUtvecklarens klagan
Utvecklarens klagandanielbrolund
740 views4 slides
The empirical process at Agile India 2012 by
The empirical process at Agile India 2012The empirical process at Agile India 2012
The empirical process at Agile India 2012danielbrolund
478 views197 slides
Skäggsekunder, ljusår och teamminuter by
Skäggsekunder, ljusår och teamminuterSkäggsekunder, ljusår och teamminuter
Skäggsekunder, ljusår och teamminuterdanielbrolund
312 views23 slides
ChatGPT and the Future of Work - Clark Boyd by
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
28.7K views69 slides

More Related Content

Featured

How to have difficult conversations by
How to have difficult conversations How to have difficult conversations
How to have difficult conversations Rajiv Jayarajah, MAppComm, ACC
5.7K views19 slides
Introduction to Data Science by
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceChristy Abraham Joy
82.6K views51 slides
Time Management & Productivity - Best Practices by
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
169.8K views42 slides
The six step guide to practical project management by
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
36.7K views27 slides
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright... by
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
12.8K views21 slides
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present... by
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
55.5K views138 slides

Featured(20)

Time Management & Productivity - Best Practices by Vit Horky
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky169.8K views
The six step guide to practical project management by MindGenius
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius36.7K views
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright... by RachelPearson36
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson3612.8K views
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present... by Applitools
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools55.5K views
12 Ways to Increase Your Influence at Work by GetSmarter
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter401.7K views
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G... by DevGAMM Conference
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference3.6K views
Barbie - Brand Strategy Presentation by Erica Santiago
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago25.1K views
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well by Saba Software
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software25.3K views
Introduction to C Programming Language by Simplilearn
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn8.5K views
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr... by Palo Alto Software
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
Palo Alto Software88.4K views
9 Tips for a Work-free Vacation by Weekdone.com
9 Tips for a Work-free Vacation9 Tips for a Work-free Vacation
9 Tips for a Work-free Vacation
Weekdone.com7.2K views
How to Map Your Future by SlideShop.com
How to Map Your FutureHow to Map Your Future
How to Map Your Future
SlideShop.com275.1K views
Beyond Pride: Making Digital Marketing & SEO Authentically LGBTQ+ Inclusive -... by AccuraCast
Beyond Pride: Making Digital Marketing & SEO Authentically LGBTQ+ Inclusive -...Beyond Pride: Making Digital Marketing & SEO Authentically LGBTQ+ Inclusive -...
Beyond Pride: Making Digital Marketing & SEO Authentically LGBTQ+ Inclusive -...
AccuraCast3.4K views
Exploring ChatGPT for Effective Teaching and Learning.pptx by Stan Skrabut, Ed.D.
Exploring ChatGPT for Effective Teaching and Learning.pptxExploring ChatGPT for Effective Teaching and Learning.pptx
Exploring ChatGPT for Effective Teaching and Learning.pptx
Stan Skrabut, Ed.D.57.7K views

Mikado Method - Beheading the Legacy Beast - Agile India 2012

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