Mikadomethod tad2011
Upcoming SlideShare
Loading in...5
×
 

Mikadomethod tad2011

on

  • 851 views

Common presentation for both presentations at Turku Agile Day 2011

Common presentation for both presentations at Turku Agile Day 2011

Statistics

Views

Total Views
851
Views on SlideShare
851
Embed Views
0

Actions

Likes
2
Downloads
17
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Mikadomethod tad2011 Mikadomethod tad2011 Presentation Transcript

    • 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/bookThursday, March 17, 2011
    • 2-by-2 sharing: Code-change horror storiesThursday, 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 PrereqThursday, March 17, 2011
    • Then we Prereq Prereq implemented the A change prerequisites, one at a time... PrereqThursday, March 17, 2011
    • Then we Prereq Prereq implemented the A change prerequisites, one at a time... PrereqThursday, March 17, 2011
    • ...got new errors... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
    • ...noted the new prerequisites... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
    • ...noted the new prerequisites... ✘ ✘ ✘✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
    • ...noted the new prerequisites... Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
    • ...and reverted again Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
    • ...and reverted again Prereq Prereq Prereq Prereq A change PrereqThursday, March 17, 2011
    • Picked the next leaf a.s.o... Prereq Prereq Prereq Prereq A change PrereqThursday, March 17, 2011
    • ...until we could do a prerequisite w/o errors Prereq Prereq ✔ Prereq Prereq A change PrereqThursday, March 17, 2011
    • We continued with all leaves... Prereq ✔ Prereq ✔ Prereq Prereq A change PrereqThursday, March 17, 2011
    • Prereq ✔ Prereq ✔ Prereq ✔ Prereq ...getting transient A change prerequisites in place... PrereqThursday, March 17, 2011
    • Prereq ✔ Prereq ✔ Prereq ✔ ✔ ...fulfilling Prereq prerequisites... A change PrereqThursday, March 17, 2011
    • Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ...working the way Prereq ✔ back to the original changeThursday, 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 businessThursday, March 17, 2011
    • Mikado Method “rules” Write down your goal -code or business Seek things to try - note where it breaksThursday, 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 brokenThursday, 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 - recursivelyThursday, March 17, 2011
    • BenefitsThursday, March 17, 2011
    • Benefits Always deliverable - from the main branchThursday, March 17, 2011
    • Benefits Always deliverable - from the main branch Goal focus - do only the necessaryThursday, March 17, 2011
    • Benefits Always deliverable - from the main branch Goal focus - do only the necessary Visualize - memo and cooperationThursday, 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-javaThursday, 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.jpgThursday, March 17, 2011
    • Design principles! Move towards systems that are stable in the face of changeThursday, March 17, 2011
    • A selection of software principlesThursday, March 17, 2011
    • A selection of software principles • Don’t Repeat YourselfThursday, March 17, 2011
    • A selection of software principles • Don’t Repeat Yourself • Class design principlesThursday, March 17, 2011
    • A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesionThursday, March 17, 2011
    • A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion • ImmutabilityThursday, March 17, 2011
    • A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion • Immutability • Pure functionsThursday, March 17, 2011
    • Don’t Repeat Yourself - DRYThursday, March 17, 2011
    • Don’t Repeat Yourself - DRY CodeThursday, March 17, 2011
    • Don’t Repeat Yourself - DRY Code CodeThursday, March 17, 2011
    • Don’t Repeat Yourself - DRY Code ✕ CodeThursday, March 17, 2011
    • Class design principlesThursday, March 17, 2011
    • Single Responsibility Principle - SRPThursday, March 17, 2011
    • Single Responsibility Principle - SRPThursday, March 17, 2011
    • Single Responsibility Principle - SRP ✕Thursday, March 17, 2011
    • Open Closed Principle - OCPThursday, March 17, 2011
    • Open Closed Principle - OCPThursday, March 17, 2011
    • Liskow Substitution Principle - LSPThursday, March 17, 2011
    • Liskow Substitution Principle - LSPThursday, March 17, 2011
    • Liskow Substitution Principle - LSPThursday, March 17, 2011
    • Liskow Substitution Principle - LSP is aThursday, March 17, 2011
    • Liskow Substitution Principle - LSP is aThursday, March 17, 2011
    • Interface Segregation Principle - ISPThursday, March 17, 2011
    • Interface Segregation Principle - ISPThursday, March 17, 2011
    • Interface Segregation Principle - ISP ✕Thursday, March 17, 2011
    • Interface Segregation Principle - ISP ✕ http://commons.wikimedia.org/wiki/File:Pedalboard_%28995939579%29.jpgThursday, March 17, 2011
    • Dependency Inversion Principle - DIPThursday, March 17, 2011
    • Dependency Inversion Principle - DIPThursday, March 17, 2011
    • S.O.L.I.DThursday, March 17, 2011
    • S.O.L.I.D Single Responsibility Principle SRPThursday, March 17, 2011
    • S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCPThursday, March 17, 2011
    • S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSPThursday, March 17, 2011
    • S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSP Interface Segregation Principle ISPThursday, 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 DIPThursday, March 17, 2011
    • Package design principles Low coupling - High cohesionThursday, March 17, 2011
    • Package design principles Low coupling - High cohesionThursday, 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=1970Thursday, 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=1970Thursday, 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
    • CouplingThursday, 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 142Thursday, 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." 142Thursday, 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." 142Thursday, 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, 1733Thursday, March 17, 2011
    • ImmutabilityThursday, March 17, 2011
    • ImmutabilityThursday, March 17, 2011
    • Pure functionsThursday, March 17, 2011
    • Pure functions f(x,y) = x + yThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, March 17, 2011
    • Create physics project Enable reuse of PhysicalObjectThursday, March 17, 2011
    • Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObjectThursday, March 17, 2011
    • Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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 PhysicalObjectThursday, 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-methodThursday, March 17, 2011