ExploringDesignAlternativesusingTDD
How do you design software?
Waystodesignsoftware● Sketch a diagram (hopefully not UML)● Think about the problem● Write code (prototype)● Review with o...
Why do we design software?
WhyDesignSoftware?
What is design?
Designis...“Conceiving and givingform to artifacts thatsolve problems.”Karl Ulrichhttp://www.ulrichbook.org/
Designis...Conceiving and giving form to artifacts thatsolve problemswithin constraints.The primary constraint for softwar...
GeneralDesignProcess
ExploringDesignAlternativesSource: Apollo Paul Paredes
Software design:What are the artifacts?
OOPArtifacts● Classes– List of methods● Methods– Names– Parameter lists● Collaboration between objects => contracts
Do you explore design alternatives?How?
ExploringDesignAlternatives● On paper● By writing code
Whats this got to do with TDD?
TDDis...A way of doing incremental design(design while writing code)
IncrementalDesignDefine examples of inputs – outputsImplementparticular casesExtract abstractionsaka generalize solutionak...
Design is creation of artifacts that solve problemsSoftware design is the creation of classes,methods etc. that solve a pr...
How about using TDD as way to explore designalternatives?
Turns out, Ive seen a lot of exploration with TDD
Coderetreat● One day● 6 sessions, 45● Pair program, TDD● Delete code, changepair after session● Use constraintsCode Retrea...
Inoticedatcoderetreatsthat...How you start and the constraints you set maychange the final design.
How to start?
Vary:numberofdesignentitiesTDD As If you meant it → 0 entities...n entities
Startfromexistingentities● Must have a certain class● Cant modify a certain class
Use different constraints
Constraints● Pure functions● Dont use data structures● Use only events to communicate betweenobjects
Paradigm● Only OOP● Only Functional Programming
ConclusionTDD can be used to explore design alternatives.
Thankyou!Alexandru BolboacaCoach and Trainer at MozaicWorksContact me:@alexbolyalex.bolboaca@mozaicworks.comRemote pair wi...
Upcoming SlideShare
Loading in …5
×

Exploring design-alternatives-using-tdd

327 views
257 views

Published on

Exploring alternatives is part of the design process.
TDD is a way to do incremental design, or design while you write code.
So can we use TDD to explore design alternatives?

Turns out, I've seen a lot of design exploration during the 30+ code retreats I facilitated and attended. While I don't have a definite proof, it seems that TDD could be used for this purpose.

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

  • Be the first to like this

No Downloads
Views
Total views
327
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Exploring design-alternatives-using-tdd

  1. 1. ExploringDesignAlternativesusingTDD
  2. 2. How do you design software?
  3. 3. Waystodesignsoftware● Sketch a diagram (hopefully not UML)● Think about the problem● Write code (prototype)● Review with other people, or work together
  4. 4. Why do we design software?
  5. 5. WhyDesignSoftware?
  6. 6. What is design?
  7. 7. Designis...“Conceiving and givingform to artifacts thatsolve problems.”Karl Ulrichhttp://www.ulrichbook.org/
  8. 8. Designis...Conceiving and giving form to artifacts thatsolve problemswithin constraints.The primary constraint for software is need forquick change.
  9. 9. GeneralDesignProcess
  10. 10. ExploringDesignAlternativesSource: Apollo Paul Paredes
  11. 11. Software design:What are the artifacts?
  12. 12. OOPArtifacts● Classes– List of methods● Methods– Names– Parameter lists● Collaboration between objects => contracts
  13. 13. Do you explore design alternatives?How?
  14. 14. ExploringDesignAlternatives● On paper● By writing code
  15. 15. Whats this got to do with TDD?
  16. 16. TDDis...A way of doing incremental design(design while writing code)
  17. 17. IncrementalDesignDefine examples of inputs – outputsImplementparticular casesExtract abstractionsaka generalize solutionaka design
  18. 18. Design is creation of artifacts that solve problemsSoftware design is the creation of classes,methods etc. that solve a problemExploring design alternatives is part of the designprocessOne way to explore an alternative is to build itTDD is a method to design software while writingcode
  19. 19. How about using TDD as way to explore designalternatives?
  20. 20. Turns out, Ive seen a lot of exploration with TDD
  21. 21. Coderetreat● One day● 6 sessions, 45● Pair program, TDD● Delete code, changepair after session● Use constraintsCode Retreat #1 in EuropeAttended / facilitated: ~30 code retreats
  22. 22. Inoticedatcoderetreatsthat...How you start and the constraints you set maychange the final design.
  23. 23. How to start?
  24. 24. Vary:numberofdesignentitiesTDD As If you meant it → 0 entities...n entities
  25. 25. Startfromexistingentities● Must have a certain class● Cant modify a certain class
  26. 26. Use different constraints
  27. 27. Constraints● Pure functions● Dont use data structures● Use only events to communicate betweenobjects
  28. 28. Paradigm● Only OOP● Only Functional Programming
  29. 29. ConclusionTDD can be used to explore design alternatives.
  30. 30. Thankyou!Alexandru BolboacaCoach and Trainer at MozaicWorksContact me:@alexbolyalex.bolboaca@mozaicworks.comRemote pair with meCome at code and beer!

×