0
Reclaim your legacy                                 systems                           Toe-dipping and deep-diving with    ...
2-by-2 sharing:                           Code-change horror storiesThursday, March 17, 2011
Once upon a time,                           we were to change                              a codebase...Thursday, March 17...
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
✘                                                   ✘                                   ✘✘                                ...
✘                                                    ✘                                    ✘✘                              ...
✘                                     ✘                            ✘✘                           ✘ ✘                 ✘     ...
✘                                                              ✘                                    ✘                     ...
✘                                                              ✘                                    ✘                     ...
✘                                                                     ✘                                           ✘       ...
✘                                              ✘                     ✘ ✘                                               ✘ ✘...
✘                                             ✘                     ✘ ✘                                              ✘ ✘  ...
✘                                             ✘                     ✘ ✘                                              ✘ ✘  ...
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              ...
This time, we noted a                                    prerequisite for each                                       of th...
This time, we noted a                                          prerequisite for each                                      ...
This time, we noted a                                          prerequisite for each                                      ...
This time, we noted a                                           prerequisite for each                                     ...
...then we reverted the                                             errors,                                      but we ke...
Then we         Prereq               Prereq       implemented the               A change     prerequisites, one at a      ...
Then we         Prereq               Prereq       implemented the               A change     prerequisites, one at a      ...
...got new           errors...                                           ✘ ✘                                            ✘✘...
...noted the new    prerequisites...                                           ✘ ✘                                        ...
...noted the new    prerequisites...                                                 ✘ ✘                                  ...
...noted the new    prerequisites...                                         Prereq✘✘ ✘                                   ...
...and           reverted             again                       Prereq✘✘ ✘                                              ...
...and           reverted             again                   Prereq                           Prereq                     ...
Picked the        next leaf         a.s.o...                    Prereq                           Prereq                   ...
...until we could do a      prerequisite w/o            errors                                         Prereq             ...
We continued                                    with all leaves...                                         Prereq         ...
Prereq                                                  ✔                           Prereq                                ...
Prereq                                                  ✔                           Prereq                                ...
Prereq                                                  ✔                           Prereq                                ...
Prereq                                                  ✔                           Prereq                                ...
Prereq                                                  ✔                           Prereq                                ...
Prereq                                                  ✔                           Prereq                                ...
Mikado Method                               “rules”Thursday, March 17, 2011
Mikado Method                                    “rules”                           Write down your goal -code or businessT...
Mikado Method                                     “rules”                           Write down your goal -code or business...
Mikado Method                                     “rules”                           Write down your goal -code or business...
Mikado Method                                     “rules”                           Write down your goal -code or business...
BenefitsThursday, March 17, 2011
Benefits                           Always deliverable - from the main branchThursday, March 17, 2011
Benefits                           Always deliverable - from the main branch                                Goal focus - do...
Benefits                           Always deliverable - from the main branch                                Goal focus - do...
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/exe...
Questions?Thursday, March 17, 2011
Questions?                                Is this instead of refactorings                                           or WEL...
Forces                           when refactoring?Thursday, March 17, 2011
Forces                           when refactoring?                               http://commons.wikimedia.org/wiki/File:Ma...
Design principles!                           Move towards systems that are stable                                  in the ...
A selection of                           software principlesThursday, March 17, 2011
A selection of                             software principles                           • Don’t Repeat YourselfThursday, ...
A selection of                             software principles                           • Don’t Repeat Yourself          ...
A selection of                             software principles                           • Don’t Repeat Yourself          ...
A selection of                             software principles                           • Don’t Repeat Yourself          ...
A selection of                             software principles                           • Don’t Repeat Yourself          ...
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,...
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/...
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             OCPT...
S.O.L.I.D                   Single Responsibility Principle   SRP                   Open Closed Principle             OCP ...
S.O.L.I.D                   Single Responsibility Principle   SRP                   Open Closed Principle             OCP ...
S.O.L.I.D                   Single Responsibility Principle   SRP                   Open Closed Principle             OCP ...
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,...
Package design principles                           Low coupling - High cohesion                      ✕Thursday, March 17,...
Thursday, March 17, 2011                                                                                                  ...
Cohesion          The Release Reuse Equivalency Principle - REP          "The granule of release is the granule of reuse."...
Cohesion          The Release Reuse Equivalency Principle - REP          "The granule of release is the granule of reuse."...
Cohesion          The Release Reuse Equivalency Principle - REP          "The granule of release is the granule of reuse."...
Cohesion          The Release Reuse Equivalency Principle - REP          "The granule of release is the granule of reuse."...
CouplingThursday, March 17, 2011
Coupling          The Acyclic Dependencies Principle - ADP          "The dependency graph of packages must have no cycles....
Coupling                        142                                      Principles of packages                           ...
Coupling                        142                                      Principles of packages                           ...
Coupling                        142                                      Principles of packages                           ...
Coupling                        142                                      Principles of packages                           ...
Coupling                        142                                      Principles of packages                           ...
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,...
Coding: Exercise 2              Instructions:              http://mikadomethod.wordpress.com/exercises/                   ...
Coding: Exercise 2              Instructions:              http://mikadomethod.wordpress.com/exercises/                   ...
Coding: Exercise 2              Instructions:              http://mikadomethod.wordpress.com/exercises/                   ...
Thursday, March 17, 2011
Enable reuse of                           PhysicalObjectThursday, March 17, 2011
Create physics                              project                                            Enable reuse of            ...
Move                           Create physics                     PhysicalObject to physics                              p...
Make space                                            depend on physics                                                pro...
Pass stepSize                                                                                        (Space.seconds) to hi...
Move PaintPhysicalObject to                                                        new SpaceGraphics class                ...
Create                                       SpaceGraphics class                                                       Mov...
Create                      Inject PhysicalObject po                                       SpaceGraphics class            ...
Create                                                                                              ✔                     ...
Create    ✔                                       ✔                                                                       ...
Create    ✔                                       ✔                                                                       ...
Create    ✔                                       ✔                                                                       ...
Create    ✔                                       ✔                                                                       ...
Create    ✔                                       ✔                                                                       ...
Create    ✔                                       ✔                                                                       ...
Create    ✔                                       ✔                                                                       ...
Thanks!!  Daniel Brolund               @danielbrolund  Ola Ellnestam                @ellnestam  #mikadomethod             ...
Upcoming SlideShare
Loading in...5
×

Mikadomethod tad2011

710

Published on

Common presentation for both presentations at Turku Agile Day 2011

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
710
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Mikadomethod tad2011"

  1. 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/bookThursday, March 17, 2011
  2. 2. 2-by-2 sharing: Code-change horror storiesThursday, March 17, 2011
  3. 3. Once upon a time, we were to change a codebase...Thursday, March 17, 2011
  4. 4. Thursday, March 17, 2011
  5. 5. Lets say this was our system...Thursday, March 17, 2011
  6. 6. A change We were to make a change...Thursday, March 17, 2011
  7. 7. ✘ ✘ ✘✘ A change ✘✘✘ ✘ ...but we got some errors...Thursday, March 17, 2011
  8. 8. ✘ ✘ ✘✘ A change ✘✘✘ ✘ Patching led to more errors...Thursday, March 17, 2011
  9. 9. ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ Patching led to more errors...Thursday, March 17, 2011
  10. 10. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ Patching led to more errors...Thursday, March 17, 2011
  11. 11. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ Patching led to more errors...Thursday, March 17, 2011
  12. 12. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ...and each patch led to even more errors...Thursday, March 17, 2011
  13. 13. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ...and each patch led to even more errors...Thursday, March 17, 2011
  14. 14. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ Like trying to stop the shockwave with our hands...Thursday, March 17, 2011
  15. 15. ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ A change ✘✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ We could only revert.Thursday, March 17, 2011
  16. 16. We could only revert.Thursday, March 17, 2011
  17. 17. Thursday, March 17, 2011
  18. 18. But we really needed to do that change!Thursday, March 17, 2011
  19. 19. A change The same change...Thursday, March 17, 2011
  20. 20. ✘✘ ✘ ✘ A change ✘✘✘ ✘ ...the same errors...Thursday, March 17, 2011
  21. 21. This time, we noted a prerequisite for each of the errors... ✘✘ ✘ ✘ A change ✘✘✘ ✘Thursday, March 17, 2011
  22. 22. This time, we noted a prerequisite for each of the errors... Prereq ✘ ✘✘ ✘ A change ✘✘✘ ✘Thursday, March 17, 2011
  23. 23. This time, we noted a prerequisite for each of the errors... Prereq ✘ Prereq ✘✘ ✘ A change ✘✘✘ ✘Thursday, March 17, 2011
  24. 24. This time, we noted a prerequisite for each of the errors... Prereq ✘ Prereq ✘✘ ✘ A change ✘✘✘ Prereq ✘Thursday, March 17, 2011
  25. 25. ...then we reverted the errors, but we kept the notes! Prereq Prereq A change PrereqThursday, March 17, 2011
  26. 26. Then we Prereq Prereq implemented the A change prerequisites, one at a time... PrereqThursday, March 17, 2011
  27. 27. Then we Prereq Prereq implemented the A change prerequisites, one at a time... PrereqThursday, March 17, 2011
  28. 28. ...got new errors... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
  29. 29. ...noted the new prerequisites... ✘ ✘ ✘✘ ✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
  30. 30. ...noted the new prerequisites... ✘ ✘ ✘✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
  31. 31. ...noted the new prerequisites... Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
  32. 32. ...and reverted again Prereq✘✘ ✘ ✘ Prereq✘✘ ✘ ✘ Prereq Prereq A change PrereqThursday, March 17, 2011
  33. 33. ...and reverted again Prereq Prereq Prereq Prereq A change PrereqThursday, March 17, 2011
  34. 34. Picked the next leaf a.s.o... Prereq Prereq Prereq Prereq A change PrereqThursday, March 17, 2011
  35. 35. ...until we could do a prerequisite w/o errors Prereq Prereq ✔ Prereq Prereq A change PrereqThursday, March 17, 2011
  36. 36. We continued with all leaves... Prereq ✔ Prereq ✔ Prereq Prereq A change PrereqThursday, March 17, 2011
  37. 37. Prereq ✔ Prereq ✔ Prereq ✔ Prereq ...getting transient A change prerequisites in place... PrereqThursday, March 17, 2011
  38. 38. Prereq ✔ Prereq ✔ Prereq ✔ ✔ ...fulfilling Prereq prerequisites... A change PrereqThursday, March 17, 2011
  39. 39. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ...working the way Prereq ✔ back to the original changeThursday, March 17, 2011
  40. 40. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change Prereq ✔ In time, all prerequisites for the original change were in place...Thursday, March 17, 2011
  41. 41. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ✔ Prereq ✔ The change was now easy to implement.Thursday, March 17, 2011
  42. 42. Prereq ✔ Prereq ✔ Prereq ✔ ✔ Prereq A change ✔ Prereq ✔ We’re done!Thursday, March 17, 2011
  43. 43. Mikado Method “rules”Thursday, March 17, 2011
  44. 44. Mikado Method “rules” Write down your goal -code or businessThursday, March 17, 2011
  45. 45. Mikado Method “rules” Write down your goal -code or business Seek things to try - note where it breaksThursday, March 17, 2011
  46. 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 brokenThursday, March 17, 2011
  47. 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 - recursivelyThursday, March 17, 2011
  48. 48. BenefitsThursday, March 17, 2011
  49. 49. Benefits Always deliverable - from the main branchThursday, March 17, 2011
  50. 50. Benefits Always deliverable - from the main branch Goal focus - do only the necessaryThursday, March 17, 2011
  51. 51. Benefits Always deliverable - from the main branch Goal focus - do only the necessary Visualize - memo and cooperationThursday, March 17, 2011
  52. 52. The Mikado Method?Thursday, March 17, 2011
  53. 53. Thursday, March 17, 2011
  54. 54. ?!? Now, where’s the code...?!?Thursday, March 17, 2011
  55. 55. Lets do an example!Thursday, March 17, 2011
  56. 56. Welcome to Pasta Inc.Thursday, March 17, 2011
  57. 57. Coding: Exercise 1 Instructions: http://mikadomethod.wordpress.com/exercises/ Code: https://github.com/mikadomethod/kata-javaThursday, March 17, 2011
  58. 58. Questions?Thursday, March 17, 2011
  59. 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. 60. Forces when refactoring?Thursday, March 17, 2011
  61. 61. Forces when refactoring? http://commons.wikimedia.org/wiki/File:Maglev_june2005.jpgThursday, March 17, 2011
  62. 62. Design principles! Move towards systems that are stable in the face of changeThursday, March 17, 2011
  63. 63. A selection of software principlesThursday, March 17, 2011
  64. 64. A selection of software principles • Don’t Repeat YourselfThursday, March 17, 2011
  65. 65. A selection of software principles • Don’t Repeat Yourself • Class design principlesThursday, March 17, 2011
  66. 66. A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesionThursday, March 17, 2011
  67. 67. A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion • ImmutabilityThursday, March 17, 2011
  68. 68. A selection of software principles • Don’t Repeat Yourself • Class design principles • Low coupling, high cohesion • Immutability • Pure functionsThursday, March 17, 2011
  69. 69. Don’t Repeat Yourself - DRYThursday, March 17, 2011
  70. 70. Don’t Repeat Yourself - DRY CodeThursday, March 17, 2011
  71. 71. Don’t Repeat Yourself - DRY Code CodeThursday, March 17, 2011
  72. 72. Don’t Repeat Yourself - DRY Code ✕ CodeThursday, March 17, 2011
  73. 73. Class design principlesThursday, March 17, 2011
  74. 74. Single Responsibility Principle - SRPThursday, March 17, 2011
  75. 75. Single Responsibility Principle - SRPThursday, March 17, 2011
  76. 76. Single Responsibility Principle - SRP ✕Thursday, March 17, 2011
  77. 77. Open Closed Principle - OCPThursday, March 17, 2011
  78. 78. Open Closed Principle - OCPThursday, March 17, 2011
  79. 79. Liskow Substitution Principle - LSPThursday, March 17, 2011
  80. 80. Liskow Substitution Principle - LSPThursday, March 17, 2011
  81. 81. Liskow Substitution Principle - LSPThursday, March 17, 2011
  82. 82. Liskow Substitution Principle - LSP is aThursday, March 17, 2011
  83. 83. Liskow Substitution Principle - LSP is aThursday, March 17, 2011
  84. 84. Interface Segregation Principle - ISPThursday, March 17, 2011
  85. 85. Interface Segregation Principle - ISPThursday, March 17, 2011
  86. 86. Interface Segregation Principle - ISP ✕Thursday, March 17, 2011
  87. 87. Interface Segregation Principle - ISP ✕ http://commons.wikimedia.org/wiki/File:Pedalboard_%28995939579%29.jpgThursday, March 17, 2011
  88. 88. Dependency Inversion Principle - DIPThursday, March 17, 2011
  89. 89. Dependency Inversion Principle - DIPThursday, March 17, 2011
  90. 90. S.O.L.I.DThursday, March 17, 2011
  91. 91. S.O.L.I.D Single Responsibility Principle SRPThursday, March 17, 2011
  92. 92. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCPThursday, March 17, 2011
  93. 93. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSPThursday, March 17, 2011
  94. 94. S.O.L.I.D Single Responsibility Principle SRP Open Closed Principle OCP Liskow Substitution Principle LSP Interface Segregation Principle ISPThursday, March 17, 2011
  95. 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 DIPThursday, March 17, 2011
  96. 96. Package design principles Low coupling - High cohesionThursday, March 17, 2011
  97. 97. Package design principles Low coupling - High cohesionThursday, March 17, 2011
  98. 98. Package design principles Low coupling - High cohesion ✕Thursday, March 17, 2011
  99. 99. Package design principles Low coupling - High cohesion ✕Thursday, March 17, 2011
  100. 100. Thursday, March 17, 2011 Cohesion http://www.freedigitalphotos.net/images/view_photog.php?photogid=1970
  101. 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=1970Thursday, March 17, 2011
  102. 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=1970Thursday, March 17, 2011
  103. 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. 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
  105. 105. CouplingThursday, March 17, 2011
  106. 106. Coupling The Acyclic Dependencies Principle - ADP "The dependency graph of packages must have no cycles."Thursday, March 17, 2011
  107. 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 142Thursday, March 17, 2011
  108. 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." 142Thursday, March 17, 2011
  109. 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." 142Thursday, March 17, 2011
  110. 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. 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, 1733Thursday, March 17, 2011
  112. 112. ImmutabilityThursday, March 17, 2011
  113. 113. ImmutabilityThursday, March 17, 2011
  114. 114. Pure functionsThursday, March 17, 2011
  115. 115. Pure functions f(x,y) = x + yThursday, March 17, 2011
  116. 116. Coding: Exercise 2 Instructions: http://mikadomethod.wordpress.com/exercises/Thursday, March 17, 2011
  117. 117. Coding: Exercise 2 Instructions: http://mikadomethod.wordpress.com/exercises/ Easy Enable reuse of PhysicalObjectThursday, March 17, 2011
  118. 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. 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
  120. 120. Thursday, March 17, 2011
  121. 121. Enable reuse of PhysicalObjectThursday, March 17, 2011
  122. 122. Create physics project Enable reuse of PhysicalObjectThursday, March 17, 2011
  123. 123. Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObjectThursday, March 17, 2011
  124. 124. Make space depend on physics projects Move Create physics PhysicalObject to physics project projects Enable reuse of PhysicalObjectThursday, March 17, 2011
  125. 125. 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
  126. 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 PhysicalObjectThursday, March 17, 2011
  127. 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 PhysicalObjectThursday, March 17, 2011
  128. 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 PhysicalObjectThursday, March 17, 2011
  129. 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 PhysicalObjectThursday, March 17, 2011
  130. 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 PhysicalObjectThursday, March 17, 2011
  131. 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 PhysicalObjectThursday, March 17, 2011
  132. 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 PhysicalObjectThursday, March 17, 2011
  133. 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 PhysicalObjectThursday, March 17, 2011
  134. 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 PhysicalObjectThursday, March 17, 2011
  135. 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 PhysicalObjectThursday, March 17, 2011
  136. 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. 137. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×