SlideShare une entreprise Scribd logo
1  sur  137
Télécharger pour lire hors ligne
Reclaim your legacy
                                 systems
                           Toe-dipping and deep-diving with
                           The Mikado Method
     Daniel Brolund             @danielbrolund
     Ola Ellnestam                  @ellnestam
     #mikadomethod               @mikadomethod


      http://mikadomethod.wordpress.com/book




Thursday, March 17, 2011
2-by-2 sharing:
                           Code-change horror stories




Thursday, March 17, 2011
Once upon a time,
                           we were to change
                              a codebase...


Thursday, March 17, 2011
Thursday, March 17, 2011
Lets say this was our system...
Thursday, March 17, 2011
A change




                           We were to make a change...
Thursday, March 17, 2011
✘
                                                   ✘
                                   ✘✘

                                        A change


                                             ✘✘✘
                                              ✘




                           ...but we got some errors...
Thursday, March 17, 2011
✘
                                                    ✘
                                    ✘✘

                                         A change


                                              ✘✘✘
                                               ✘




                           Patching led to more errors...
Thursday, March 17, 2011
✘
                                     ✘
                            ✘✘
                           ✘ ✘                 ✘
                                                    ✘
                             ✘      ✘✘

                                         A change


                                              ✘✘✘
                                               ✘




                           Patching led to more errors...
Thursday, March 17, 2011
✘
                                                              ✘
                                    ✘                       ✘   ✘
                                                              ✘
                                     ✘
                            ✘✘
                           ✘ ✘                 ✘
                                                    ✘
                             ✘      ✘✘

                                         A change


                                              ✘✘✘
                                               ✘




                           Patching led to more errors...
Thursday, March 17, 2011
✘
                                                              ✘
                                    ✘                       ✘   ✘
                                                              ✘
                                     ✘
                            ✘✘
                           ✘ ✘                 ✘
                                                    ✘
                             ✘      ✘✘

                                         A change


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




                           Patching led to more errors...
Thursday, March 17, 2011
✘
                                                                     ✘
                                           ✘                       ✘   ✘
                                                                     ✘
                                            ✘
                                   ✘✘
                                  ✘ ✘                 ✘
                                                           ✘
                                    ✘      ✘✘

                                                A change


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




                           ...and each patch led to even more errors...
Thursday, March 17, 2011
✘
                                              ✘                     ✘ ✘
                                               ✘ ✘                                      ✘
                                     ✘                                                   ✘ ✘
                                      ✘ ✘                                 ✘
                                                                                ✘
                                                   ✘                          ✘   ✘
                                                                                ✘
                            ✘                      ✘
                             ✘ ✘     ✘✘
                                    ✘ ✘                       ✘
                                                                   ✘                      ✘
                                      ✘            ✘✘                                      ✘ ✘
                             ✘
                              ✘ ✘                       A change


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




                           ...and each patch led to even more errors...
Thursday, March 17, 2011
✘
                                             ✘                     ✘ ✘
                                              ✘ ✘                                      ✘
                                    ✘                                                   ✘ ✘
                                     ✘ ✘                                 ✘
                                                                               ✘
                                                  ✘                          ✘   ✘
                                                                               ✘
                           ✘                      ✘
                            ✘ ✘     ✘✘
                                   ✘ ✘                       ✘
                                                                  ✘                      ✘
                                     ✘            ✘✘                                      ✘ ✘
                            ✘
                             ✘ ✘                       A change


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




        Like trying to stop the shockwave with our hands...
Thursday, March 17, 2011
✘
                                             ✘                     ✘ ✘
                                              ✘ ✘                                      ✘
                                    ✘                                                   ✘ ✘
                                     ✘ ✘                                 ✘
                                                                               ✘
                                                  ✘                          ✘   ✘
                                                                               ✘
                           ✘                      ✘
                            ✘ ✘     ✘✘
                                   ✘ ✘                       ✘
                                                                  ✘                      ✘
                                     ✘            ✘✘                                      ✘ ✘
                            ✘
                             ✘ ✘                       A change


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




                                         We could only revert.
Thursday, March 17, 2011
We could only revert.
Thursday, March 17, 2011
Thursday, March 17, 2011
But we really
                           needed to do
                            that change!
Thursday, March 17, 2011
A change




                           The same
                           change...
Thursday, March 17, 2011
✘✘               ✘
                                                ✘


                                 A change



                                    ✘✘✘
                                     ✘




                           ...the same
                             errors...
Thursday, March 17, 2011
This time, we noted a
                                    prerequisite for each
                                       of the errors...
                           ✘✘              ✘
                                               ✘


                                A change



                                   ✘✘✘
                                    ✘




Thursday, March 17, 2011
This time, we noted a
                                          prerequisite for each
                                             of the errors...
                           Prereq                ✘
                                 ✘✘                  ✘


                                      A change



                                         ✘✘✘
                                          ✘




Thursday, March 17, 2011
This time, we noted a
                                          prerequisite for each
                                             of the errors...
                           Prereq                ✘       Prereq
                                 ✘✘                  ✘


                                      A change



                                         ✘✘✘
                                          ✘




Thursday, March 17, 2011
This time, we noted a
                                           prerequisite for each
                                              of the errors...
                           Prereq                 ✘       Prereq
                                 ✘✘                   ✘


                                       A change



                                           ✘✘✘
                                      Prereq ✘




Thursday, March 17, 2011
...then we reverted the
                                             errors,
                                      but we kept the notes!

                           Prereq               Prereq



                                     A change



                                    Prereq




Thursday, March 17, 2011
Then we         Prereq               Prereq


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




Thursday, March 17, 2011
Then we         Prereq               Prereq


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




Thursday, March 17, 2011
...got new
           errors...
                                           ✘ ✘
                                            ✘✘
                           ✘✘ ✘
                             ✘

                                  Prereq                     Prereq



                                                  A change



                                                 Prereq




Thursday, March 17, 2011
...noted the new
    prerequisites...
                                           ✘ ✘
                                            ✘✘
                           ✘✘ ✘
                             ✘

                                  Prereq                     Prereq



                                                  A change



                                                 Prereq




Thursday, March 17, 2011
...noted the new
    prerequisites...
                                                 ✘ ✘
                                                  ✘✘
                           Prereq✘✘ ✘
                                   ✘

                                        Prereq                     Prereq



                                                        A change



                                                       Prereq




Thursday, March 17, 2011
...noted the new
    prerequisites...
                                         Prereq✘✘ ✘
                                                 ✘
                           Prereq✘✘ ✘
                                   ✘

                                        Prereq                    Prereq



                                                       A change



                                                      Prereq




Thursday, March 17, 2011
...and
           reverted
             again                       Prereq✘✘ ✘
                                                 ✘
                           Prereq✘✘ ✘
                                   ✘

                                        Prereq                    Prereq



                                                       A change



                                                      Prereq




Thursday, March 17, 2011
...and
           reverted
             again                   Prereq

                           Prereq


                                    Prereq                Prereq



                                               A change



                                              Prereq




Thursday, March 17, 2011
Picked the
        next leaf
         a.s.o...                    Prereq

                           Prereq


                                    Prereq                Prereq



                                               A change



                                              Prereq




Thursday, March 17, 2011
...until we could do a
      prerequisite w/o
            errors
                                         Prereq

                           Prereq
                                    ✔
                                        Prereq                Prereq



                                                   A change



                                                  Prereq




Thursday, March 17, 2011
We continued
                                    with all leaves...

                                         Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq                    Prereq



                                                       A change



                                                      Prereq




Thursday, March 17, 2011
Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq    ✔               Prereq


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




Thursday, March 17, 2011
Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq    ✔               ✔ ...fulfilling
                                                                  Prereq

                                                                       prerequisites...
                                                       A change



                                                      Prereq




Thursday, March 17, 2011
Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq    ✔               ✔
                                                                  Prereq



                                                       A change

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




Thursday, March 17, 2011
Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq    ✔                ✔
                                                                   Prereq



                                                       A change



                                                      Prereq   ✔


                                    In time, all prerequisites
                                     for the original change
                                         were in place...
Thursday, March 17, 2011
Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq    ✔                ✔
                                                                   Prereq



                                                       A change
                                                                  ✔
                                                      Prereq   ✔


                                    The change was now
                                     easy to implement.

Thursday, March 17, 2011
Prereq
                                                  ✔
                           Prereq
                                    ✔
                                        Prereq    ✔                ✔
                                                                   Prereq



                                                       A change
                                                                  ✔
                                                      Prereq   ✔




                                    We’re done!
Thursday, March 17, 2011
Mikado Method
                               “rules”




Thursday, March 17, 2011
Mikado Method
                                    “rules”

                           Write down your goal -code or business




Thursday, March 17, 2011
Mikado Method
                                     “rules”

                           Write down your goal -code or business

                           Seek things to try - note where it breaks




Thursday, March 17, 2011
Mikado Method
                                     “rules”

                           Write down your goal -code or business

                           Seek things to try - note where it breaks
                              Back out of broken code - it’s broken




Thursday, March 17, 2011
Mikado Method
                                     “rules”

                           Write down your goal -code or business

                           Seek things to try - note where it breaks
                              Back out of broken code - it’s broken
                               Fix the prerequisites - recursively


Thursday, March 17, 2011
Benefits




Thursday, March 17, 2011
Benefits


                           Always deliverable - from the main branch




Thursday, March 17, 2011
Benefits


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




Thursday, March 17, 2011
Benefits


                           Always deliverable - from the main branch
                                Goal focus - do only the necessary
                              Visualize - memo and cooperation




Thursday, March 17, 2011
The Mikado Method?



Thursday, March 17, 2011
Thursday, March 17, 2011
?!?
                           Now, where’s the code...?!?




Thursday, March 17, 2011
Lets do an example!




Thursday, March 17, 2011
Welcome to Pasta Inc.




Thursday, March 17, 2011
Coding: Exercise 1


                           Instructions:
                           http://mikadomethod.wordpress.com/exercises/

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




Thursday, March 17, 2011
Questions?




Thursday, March 17, 2011
Questions?
                                Is this instead of refactorings
                                           or WELC?

                           What about dynamically typed languages?

                                   How do I get started?

                               What about design principles?

Thursday, March 17, 2011
Forces
                           when refactoring?




Thursday, March 17, 2011
Forces
                           when refactoring?




                               http://commons.wikimedia.org/wiki/File:Maglev_june2005.jpg



Thursday, March 17, 2011
Design principles!
                           Move towards systems that are stable
                                  in the face of change




Thursday, March 17, 2011
A selection of
                           software principles




Thursday, March 17, 2011
A selection of
                             software principles
                           • Don’t Repeat Yourself




Thursday, March 17, 2011
A selection of
                             software principles
                           • Don’t Repeat Yourself
                           • Class design principles




Thursday, March 17, 2011
A selection of
                             software principles
                           • Don’t Repeat Yourself
                           • Class design principles
                           • Low coupling, high cohesion



Thursday, March 17, 2011
A selection of
                             software principles
                           • Don’t Repeat Yourself
                           • Class design principles
                           • Low coupling, high cohesion
                           • Immutability


Thursday, March 17, 2011
A selection of
                             software principles
                           • Don’t Repeat Yourself
                           • Class design principles
                           • Low coupling, high cohesion
                           • Immutability
                           • Pure functions

Thursday, March 17, 2011
Don’t Repeat Yourself - DRY




Thursday, March 17, 2011
Don’t Repeat Yourself - DRY



                                  Code




Thursday, March 17, 2011
Don’t Repeat Yourself - DRY



                                  Code      Code




Thursday, March 17, 2011
Don’t Repeat Yourself - DRY



                                  Code


                                         ✕  Code




Thursday, March 17, 2011
Class design principles




Thursday, March 17, 2011
Single Responsibility Principle - SRP




Thursday, March 17, 2011
Single Responsibility Principle - SRP




Thursday, March 17, 2011
Single Responsibility Principle - SRP




                                      ✕
Thursday, March 17, 2011
Open Closed Principle - OCP




Thursday, March 17, 2011
Open Closed Principle - OCP




Thursday, March 17, 2011
Liskow Substitution Principle - LSP




Thursday, March 17, 2011
Liskow Substitution Principle - LSP




Thursday, March 17, 2011
Liskow Substitution Principle - LSP




Thursday, March 17, 2011
Liskow Substitution Principle - LSP



                                               is a




Thursday, March 17, 2011
Liskow Substitution Principle - LSP



                                               is a




Thursday, March 17, 2011
Interface Segregation Principle - ISP




Thursday, March 17, 2011
Interface Segregation Principle - ISP




Thursday, March 17, 2011
Interface Segregation Principle - ISP




                 ✕
Thursday, March 17, 2011
Interface Segregation Principle - ISP




                 ✕                                 http://commons.wikimedia.org/wiki/File:Pedalboard_%28995939579%29.jpg




Thursday, March 17, 2011
Dependency Inversion Principle - DIP




Thursday, March 17, 2011
Dependency Inversion Principle - DIP




Thursday, March 17, 2011
S.O.L.I.D




Thursday, March 17, 2011
S.O.L.I.D

                   Single Responsibility Principle   SRP




Thursday, March 17, 2011
S.O.L.I.D

                   Single Responsibility Principle   SRP
                   Open Closed Principle             OCP




Thursday, March 17, 2011
S.O.L.I.D

                   Single Responsibility Principle   SRP
                   Open Closed Principle             OCP
                   Liskow Substitution Principle     LSP




Thursday, March 17, 2011
S.O.L.I.D

                   Single Responsibility Principle   SRP
                   Open Closed Principle             OCP
                   Liskow Substitution Principle     LSP
                   Interface Segregation Principle   ISP




Thursday, March 17, 2011
S.O.L.I.D

                   Single Responsibility Principle   SRP
                   Open Closed Principle             OCP
                   Liskow Substitution Principle     LSP
                   Interface Segregation Principle   ISP
                   Dependency Inversion Principle    DIP




Thursday, March 17, 2011
Package design principles
                           Low coupling - High cohesion




Thursday, March 17, 2011
Package design principles
                           Low coupling - High cohesion




Thursday, March 17, 2011
Package design principles
                           Low coupling - High cohesion




                      ✕
Thursday, March 17, 2011
Package design principles
                           Low coupling - High cohesion




                      ✕
Thursday, March 17, 2011
Thursday, March 17, 2011
                                                                                                   Cohesion




                           http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
Cohesion
          The Release Reuse Equivalency Principle - REP
          "The granule of release is the granule of reuse."




                                                              http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
Thursday, March 17, 2011
Cohesion
          The Release Reuse Equivalency Principle - REP
          "The granule of release is the granule of reuse."

          The Common Reuse Principle - CRP
          "Classes that are used together are packaged together."




                                                                    http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
Thursday, March 17, 2011
Cohesion
          The Release Reuse Equivalency Principle - REP
          "The granule of release is the granule of reuse."

          The Common Reuse Principle - CRP
          "Classes that are used together are packaged together."

          The Common Closure Principle - CCP




                                                                    http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
          "Classes that change together are packaged together."




Thursday, March 17, 2011
Cohesion
          The Release Reuse Equivalency Principle - REP
          "The granule of release is the granule of reuse."

          The Common Reuse Principle - CRP
          "Classes that are used together are packaged together."

          The Common Closure Principle - CCP




                                                                    http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
          "Classes that change together are packaged together."




Thursday, March 17, 2011
Coupling




Thursday, March 17, 2011
Coupling

          The Acyclic Dependencies Principle - ADP
          "The dependency graph of packages must have no cycles."




Thursday, March 17, 2011
Coupling                        142                                      Principles of packages




                                                                                Pkg                          Pkg




          The Acyclic Dependencies Principle - ADP
          "The dependency graph of packages must have no cycles."         Pkg                                       Pkg




                                                                                              Pkg




                                                                            Figure 6.13: Cyclic dependencies are evil




                                                                                              142




Thursday, March 17, 2011
Coupling                        142                                      Principles of packages




                                                                                Pkg                          Pkg




          The Acyclic Dependencies Principle - ADP
          "The dependency graph of packages must have no cycles."         Pkg                                       Pkg




                                                                                              Pkg




                                                                            Figure 6.13: Cyclic dependencies are evil




                                  The Stable Dependencies Principle - SDP
                                  "Depend in the direction of stability."                     142




Thursday, March 17, 2011
Coupling                        142                                      Principles of packages




                                                                                Pkg                          Pkg




          The Acyclic Dependencies Principle - ADP
          "The dependency graph of packages must have no cycles."         Pkg                                       Pkg




                                                                                              Pkg




                                                                            Figure 6.13: Cyclic dependencies are evil




                                  The Stable Dependencies Principle - SDP
                                  "Depend in the direction of stability."                     142




Thursday, March 17, 2011
Coupling                        142                                      Principles of packages




                                                                                     Pkg                          Pkg




          The Acyclic Dependencies Principle - ADP
          "The dependency graph of packages must have no cycles."              Pkg                                       Pkg




                                                                                                   Pkg




                                                                                 Figure 6.13: Cyclic dependencies are evil




                                       The Stable Dependencies Principle - SDP
                                       "Depend in the direction of stability."                     142




              The Stable Abstractions Principle - SAP
              "Abstractness increases with stability."


Thursday, March 17, 2011
Coupling                        142                                      Principles of packages




                                                                                     Pkg                          Pkg




          The Acyclic Dependencies Principle - ADP
          "The dependency graph of packages must have no cycles."              Pkg                                       Pkg




                                                                                                   Pkg




                                                                                 Figure 6.13: Cyclic dependencies are evil




                                       The Stable Dependencies Principle - SDP
                                       "Depend in the direction of stability."                     142




              The Stable Abstractions Principle - SAP
              "Abstractness increases with stability."
                                                                                     Map of Old Town in Stockholm, 1733



Thursday, March 17, 2011
Immutability




Thursday, March 17, 2011
Immutability




Thursday, March 17, 2011
Pure functions




Thursday, March 17, 2011
Pure functions


                           f(x,y) = x + y



Thursday, March 17, 2011
Coding: Exercise 2

              Instructions:
              http://mikadomethod.wordpress.com/exercises/




Thursday, March 17, 2011
Coding: Exercise 2

              Instructions:
              http://mikadomethod.wordpress.com/exercises/




                           Easy

             Enable reuse of PhysicalObject




Thursday, March 17, 2011
Coding: Exercise 2

              Instructions:
              http://mikadomethod.wordpress.com/exercises/




                           Easy               Intermediate
                                                   Two separate,
                                               minimal, deliverables for
             Enable reuse of PhysicalObject
                                               bouncing balls and solar
                                                       system.


Thursday, March 17, 2011
Coding: Exercise 2

              Instructions:
              http://mikadomethod.wordpress.com/exercises/




                           Easy               Intermediate                      Difficult
                                                   Two separate,
                                                                                The domain logic is
                                               minimal, deliverables for
             Enable reuse of PhysicalObject                                compilable without Swing/AWT
                                               bouncing balls and solar
                                                                                   dependencies
                                                       system.


Thursday, March 17, 2011
Thursday, March 17, 2011
Enable reuse of
                           PhysicalObject




Thursday, March 17, 2011
Create physics
                              project



                                            Enable reuse of
                                            PhysicalObject




Thursday, March 17, 2011
Move
                           Create physics                     PhysicalObject to physics
                              project                                 projects




                                            Enable reuse of
                                            PhysicalObject




Thursday, March 17, 2011
Make space
                                            depend on physics
                                                projects



                                                                                       Move
                           Create physics                                     PhysicalObject to physics
                              project                                                 projects




                                                            Enable reuse of
                                                            PhysicalObject




Thursday, March 17, 2011
Pass stepSize
                                                                                        (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                       Move
                           Create physics                                     PhysicalObject to physics
                              project                                                 projects




                                                            Enable reuse of
                                                            PhysicalObject




Thursday, March 17, 2011
Move PaintPhysicalObject to
                                                        new SpaceGraphics class



                                                                                                 Pass stepSize
                                                                                          (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                         Move
                           Create physics                                       PhysicalObject to physics
                              project                                                   projects




                                                            Enable reuse of
                                                            PhysicalObject




Thursday, March 17, 2011
Create
                                       SpaceGraphics class




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class



                                                                                                 Pass stepSize
                                                                                          (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                         Move
                           Create physics                                       PhysicalObject to physics
                              project                                                   projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create                      Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class



                                                                                                   Pass stepSize
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                          Move
                           Create physics                                        PhysicalObject to physics
                              project                                                    projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create
                                                                                              ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class



                                                                                                   Pass stepSize
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                          Move
                           Create physics                                        PhysicalObject to physics
                              project                                                    projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class



                                                                                                   Pass stepSize
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                          Move
                           Create physics                                        PhysicalObject to physics
                              project                                                    projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class
                                                                                     ✔

                                                                                                   Pass stepSize
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                          Move
                           Create physics                                        PhysicalObject to physics
                              project                                                    projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class
                                                                                     ✔

                                                                                                   Pass stepSize  ✔
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                          Move
                           Create physics                                        PhysicalObject to physics
                              project                                                    projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class
                                                                                     ✔

                                                                                                   Pass stepSize  ✔
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                projects



                                                                                          Move
                           Create physics
                              project
                                            ✔                                    PhysicalObject to physics
                                                                                         projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class
                                                                                     ✔

                                                                                                   Pass stepSize  ✔
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                             ✔
                                                projects



                                                                                          Move
                           Create physics
                              project
                                            ✔                                    PhysicalObject to physics
                                                                                         projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class
                                                                                     ✔

                                                                                                   Pass stepSize  ✔
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                             ✔
                                                projects



                                                                                          Move      ✔
                           Create physics
                              project
                                            ✔                                    PhysicalObject to physics
                                                                                         projects




                                                             Enable reuse of
                                                             PhysicalObject




Thursday, March 17, 2011
Create    ✔                                       ✔
                                                                        Inject PhysicalObject po
                                       SpaceGraphics class              into PaintPhysicalObject




                                                       Move PaintPhysicalObject to
                                                        new SpaceGraphics class
                                                                                     ✔

                                                                                                   Pass stepSize  ✔
                                                                                            (Space.seconds) to hitBy(..)
                                               Make space
                                            depend on physics
                                                             ✔
                                                projects



                                                                                          Move      ✔
                           Create physics
                              project
                                            ✔                                    PhysicalObject to physics
                                                                                         projects




                                                             Enable reuse of
                                                             PhysicalObject    ✔
Thursday, March 17, 2011
Thanks!!
  Daniel Brolund               @danielbrolund
  Ola Ellnestam                @ellnestam
  #mikadomethod                @mikadomethod


  http://mikadomethod.org
  http://mikadomethod.wordpress.com
  http://groups.google.com/group/mikado-method




Thursday, March 17, 2011

Contenu connexe

Dernier

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Dernier (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

En vedette

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
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
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
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...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
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...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
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...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
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...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Mikadomethod tad2011

  • 1. Reclaim your legacy systems Toe-dipping and deep-diving with The Mikado Method Daniel Brolund @danielbrolund Ola Ellnestam @ellnestam #mikadomethod @mikadomethod http://mikadomethod.wordpress.com/book Thursday, March 17, 2011
  • 2. 2-by-2 sharing: Code-change horror stories Thursday, March 17, 2011
  • 3. Once upon a time, we were to change a codebase... Thursday, March 17, 2011
  • 5. Lets say this was our system... Thursday, March 17, 2011
  • 6. A change We were to make a change... Thursday, March 17, 2011
  • 7. ✘ ✘✘ A change ✘✘✘ ✘ ...but we got some errors... Thursday, March 17, 2011
  • 8. ✘ ✘✘ A change ✘✘✘ ✘ Patching led to more errors... Thursday, March 17, 2011
  • 9. ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ Patching led to more errors... Thursday, March 17, 2011
  • 10. ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ Patching led to more errors... Thursday, March 17, 2011
  • 11. ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ Patching led to more errors... Thursday, March 17, 2011
  • 12. ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ...and each patch led to even more errors... Thursday, March 17, 2011
  • 13. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ...and each patch led to even more errors... Thursday, March 17, 2011
  • 14. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ Like trying to stop the shockwave with our hands... Thursday, March 17, 2011
  • 15. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ We could only revert. Thursday, March 17, 2011
  • 16. We could only revert. Thursday, March 17, 2011
  • 18. But we really needed to do that change! Thursday, March 17, 2011
  • 19. A change The same change... Thursday, March 17, 2011
  • 20. ✘✘ ✘ ✘ A change ✘✘✘ ✘ ...the same errors... Thursday, March 17, 2011
  • 21. This time, we noted a prerequisite for each of the errors... ✘✘ ✘ ✘ A change ✘✘✘ ✘ Thursday, March 17, 2011
  • 22. This time, we noted a prerequisite for each of the errors... Prereq ✘ ✘✘ ✘ A change ✘✘✘ ✘ Thursday, March 17, 2011
  • 23. This time, we noted a prerequisite for each of the errors... Prereq ✘ Prereq ✘✘ ✘ A change ✘✘✘ ✘ Thursday, March 17, 2011
  • 24. This time, we noted a prerequisite for each of the errors... Prereq ✘ Prereq ✘✘ ✘ A change ✘✘✘ Prereq ✘ Thursday, March 17, 2011
  • 25. ...then we reverted the errors, but we kept the notes! Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 26. Then we Prereq Prereq implemented the A change prerequisites, one at a time... Prereq Thursday, March 17, 2011
  • 27. Then we Prereq Prereq implemented the A change prerequisites, one at a time... Prereq Thursday, March 17, 2011
  • 28. ...got new errors... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 29. ...noted the new prerequisites... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 30. ...noted the new prerequisites... ✘ ✘ ✘✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 31. ...noted the new prerequisites... Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 32. ...and reverted again Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 33. ...and reverted again Prereq Prereq Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 34. Picked the next leaf a.s.o... Prereq Prereq Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 35. ...until we could do a prerequisite w/o errors Prereq Prereq ✔ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 36. We continued with all leaves... Prereq ✔ Prereq ✔ Prereq Prereq A change Prereq Thursday, March 17, 2011
  • 37. Prereq ✔ Prereq ✔ Prereq ✔ Prereq ...getting transient A change prerequisites in place... Prereq Thursday, March 17, 2011
  • 38. Prereq ✔ Prereq ✔ Prereq ✔ ✔ ...fulfilling Prereq prerequisites... A change Prereq Thursday, March 17, 2011
  • 39. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ...working the way Prereq ✔ back to the original change Thursday, March 17, 2011
  • 40. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change Prereq ✔ In time, all prerequisites for the original change were in place... Thursday, March 17, 2011
  • 41. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ✔ Prereq ✔ The change was now easy to implement. Thursday, March 17, 2011
  • 42. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ✔ Prereq ✔ We’re done! Thursday, March 17, 2011
  • 43. Mikado Method “rules” Thursday, March 17, 2011
  • 44. Mikado Method “rules” Write down your goal -code or business Thursday, March 17, 2011
  • 45. Mikado Method “rules” Write down your goal -code or business Seek things to try - note where it breaks Thursday, March 17, 2011
  • 46. Mikado Method “rules” Write down your goal -code or business Seek things to try - note where it breaks Back out of broken code - it’s broken Thursday, March 17, 2011
  • 47. Mikado Method “rules” Write down your goal -code or business Seek things to try - note where it breaks Back out of broken code - it’s broken Fix the prerequisites - recursively Thursday, March 17, 2011
  • 49. Benefits Always deliverable - from the main branch Thursday, March 17, 2011
  • 50. Benefits Always deliverable - from the main branch Goal focus - do only the necessary Thursday, March 17, 2011
  • 51. Benefits Always deliverable - from the main branch Goal focus - do only the necessary Visualize - memo and cooperation Thursday, March 17, 2011
  • 54. ?!? Now, where’s the code...?!? Thursday, March 17, 2011
  • 55. Lets do an example! Thursday, March 17, 2011
  • 56. Welcome to Pasta Inc. Thursday, March 17, 2011
  • 57. Coding: Exercise 1 Instructions: http://mikadomethod.wordpress.com/exercises/ Code: https://github.com/mikadomethod/kata-java Thursday, March 17, 2011
  • 59. Questions? Is this instead of refactorings or WELC? What about dynamically typed languages? How do I get started? What about design principles? Thursday, March 17, 2011
  • 60. Forces when refactoring? Thursday, March 17, 2011
  • 61. Forces when refactoring? http://commons.wikimedia.org/wiki/File:Maglev_june2005.jpg Thursday, March 17, 2011
  • 62. Design principles! Move towards systems that are stable in the face of change Thursday, March 17, 2011
  • 63. A selection of software principles Thursday, March 17, 2011
  • 64. A selection of software principles • Don’t Repeat Yourself Thursday, March 17, 2011
  • 65. A selection of software principles • Don’t Repeat Yourself • Class design principles Thursday, March 17, 2011
  • 66. A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion Thursday, March 17, 2011
  • 67. A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion • Immutability Thursday, March 17, 2011
  • 68. A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion • Immutability • Pure functions Thursday, March 17, 2011
  • 69. Don’t Repeat Yourself - DRY Thursday, March 17, 2011
  • 70. Don’t Repeat Yourself - DRY Code Thursday, March 17, 2011
  • 71. Don’t Repeat Yourself - DRY Code Code Thursday, March 17, 2011
  • 72. Don’t Repeat Yourself - DRY Code ✕ Code Thursday, March 17, 2011
  • 74. Single Responsibility Principle - SRP Thursday, March 17, 2011
  • 75. Single Responsibility Principle - SRP Thursday, March 17, 2011
  • 76. Single Responsibility Principle - SRP ✕ Thursday, March 17, 2011
  • 77. Open Closed Principle - OCP Thursday, March 17, 2011
  • 78. Open Closed Principle - OCP Thursday, March 17, 2011
  • 79. Liskow Substitution Principle - LSP Thursday, March 17, 2011
  • 80. Liskow Substitution Principle - LSP Thursday, March 17, 2011
  • 81. Liskow Substitution Principle - LSP Thursday, March 17, 2011
  • 82. Liskow Substitution Principle - LSP is a Thursday, March 17, 2011
  • 83. Liskow Substitution Principle - LSP is a Thursday, March 17, 2011
  • 84. Interface Segregation Principle - ISP Thursday, March 17, 2011
  • 85. Interface Segregation Principle - ISP Thursday, March 17, 2011
  • 86. Interface Segregation Principle - ISP ✕ Thursday, March 17, 2011
  • 87. Interface Segregation Principle - ISP ✕ http://commons.wikimedia.org/wiki/File:Pedalboard_%28995939579%29.jpg Thursday, March 17, 2011
  • 88. Dependency Inversion Principle - DIP Thursday, March 17, 2011
  • 89. Dependency Inversion Principle - DIP Thursday, March 17, 2011
  • 91. S.O.L.I.D Single Responsibility Principle SRP Thursday, March 17, 2011
  • 92. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Thursday, March 17, 2011
  • 93. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSP Thursday, March 17, 2011
  • 94. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSP Interface Segregation Principle ISP Thursday, March 17, 2011
  • 95. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSP Interface Segregation Principle ISP Dependency Inversion Principle DIP Thursday, March 17, 2011
  • 96. Package design principles Low coupling - High cohesion Thursday, March 17, 2011
  • 97. Package design principles Low coupling - High cohesion Thursday, March 17, 2011
  • 98. Package design principles Low coupling - High cohesion ✕ Thursday, March 17, 2011
  • 99. Package design principles Low coupling - High cohesion ✕ Thursday, March 17, 2011
  • 100. Thursday, March 17, 2011 Cohesion http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
  • 101. Cohesion The Release Reuse Equivalency Principle - REP "The granule of release is the granule of reuse." http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970 Thursday, March 17, 2011
  • 102. Cohesion The Release Reuse Equivalency Principle - REP "The granule of release is the granule of reuse." The Common Reuse Principle - CRP "Classes that are used together are packaged together." http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970 Thursday, March 17, 2011
  • 103. Cohesion The Release Reuse Equivalency Principle - REP "The granule of release is the granule of reuse." The Common Reuse Principle - CRP "Classes that are used together are packaged together." The Common Closure Principle - CCP http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970 "Classes that change together are packaged together." Thursday, March 17, 2011
  • 104. Cohesion The Release Reuse Equivalency Principle - REP "The granule of release is the granule of reuse." The Common Reuse Principle - CRP "Classes that are used together are packaged together." The Common Closure Principle - CCP http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970 "Classes that change together are packaged together." Thursday, March 17, 2011
  • 106. Coupling The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles." Thursday, March 17, 2011
  • 107. Coupling 142 Principles of packages Pkg Pkg The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles." Pkg Pkg Pkg Figure 6.13: Cyclic dependencies are evil 142 Thursday, March 17, 2011
  • 108. Coupling 142 Principles of packages Pkg Pkg The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles." Pkg Pkg Pkg Figure 6.13: Cyclic dependencies are evil The Stable Dependencies Principle - SDP "Depend in the direction of stability." 142 Thursday, March 17, 2011
  • 109. Coupling 142 Principles of packages Pkg Pkg The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles." Pkg Pkg Pkg Figure 6.13: Cyclic dependencies are evil The Stable Dependencies Principle - SDP "Depend in the direction of stability." 142 Thursday, March 17, 2011
  • 110. Coupling 142 Principles of packages Pkg Pkg The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles." Pkg Pkg Pkg Figure 6.13: Cyclic dependencies are evil The Stable Dependencies Principle - SDP "Depend in the direction of stability." 142 The Stable Abstractions Principle - SAP "Abstractness increases with stability." Thursday, March 17, 2011
  • 111. Coupling 142 Principles of packages Pkg Pkg The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles." Pkg Pkg Pkg Figure 6.13: Cyclic dependencies are evil The Stable Dependencies Principle - SDP "Depend in the direction of stability." 142 The Stable Abstractions Principle - SAP "Abstractness increases with stability." Map of Old Town in Stockholm, 1733 Thursday, March 17, 2011
  • 115. Pure functions f(x,y) = x + y Thursday, March 17, 2011
  • 116. Coding: Exercise 2 Instructions: http://mikadomethod.wordpress.com/exercises/ Thursday, March 17, 2011
  • 117. Coding: Exercise 2 Instructions: http://mikadomethod.wordpress.com/exercises/ Easy Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 118. Coding: Exercise 2 Instructions: http://mikadomethod.wordpress.com/exercises/ Easy Intermediate Two separate, minimal, deliverables for Enable reuse of PhysicalObject bouncing balls and solar system. Thursday, March 17, 2011
  • 119. Coding: Exercise 2 Instructions: http://mikadomethod.wordpress.com/exercises/ Easy Intermediate Difficult Two separate, The domain logic is minimal, deliverables for Enable reuse of PhysicalObject compilable without Swing/AWT bouncing balls and solar dependencies system. Thursday, March 17, 2011
  • 121. Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 122. Create physics project Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 123. Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 124. Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 125. Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 126. Move PaintPhysicalObject to new SpaceGraphics class Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 127. Create SpaceGraphics class Move PaintPhysicalObject to new SpaceGraphics class Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 128. Create Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 129. Create ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 130. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 131. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class ✔ Pass stepSize (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 132. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class ✔ Pass stepSize ✔ (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 133. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class ✔ Pass stepSize ✔ (Space.seconds) to hitBy(..) Make space depend on physics projects Move Create physics project ✔ PhysicalObject to physics projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 134. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class ✔ Pass stepSize ✔ (Space.seconds) to hitBy(..) Make space depend on physics ✔ projects Move Create physics project ✔ PhysicalObject to physics projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 135. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class ✔ Pass stepSize ✔ (Space.seconds) to hitBy(..) Make space depend on physics ✔ projects Move ✔ Create physics project ✔ PhysicalObject to physics projects Enable reuse of PhysicalObject Thursday, March 17, 2011
  • 136. Create ✔ ✔ Inject PhysicalObject po SpaceGraphics class into PaintPhysicalObject Move PaintPhysicalObject to new SpaceGraphics class ✔ Pass stepSize ✔ (Space.seconds) to hitBy(..) Make space depend on physics ✔ projects Move ✔ Create physics project ✔ PhysicalObject to physics projects Enable reuse of PhysicalObject ✔ Thursday, March 17, 2011
  • 137. Thanks!! Daniel Brolund @danielbrolund Ola Ellnestam @ellnestam #mikadomethod @mikadomethod http://mikadomethod.org http://mikadomethod.wordpress.com http://groups.google.com/group/mikado-method Thursday, March 17, 2011