TDD Mini Workshop @ Bucharest JUG 2014 04 24

393 views

Published on

Published in: Software, Technology, Sports
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

No notes for slide

TDD Mini Workshop @ Bucharest JUG 2014 04 24

  1. 1. WhatIsTDD?
  2. 2. WhatIsTDD? A Way to Design Software Incrementally (while you code)
  3. 3. TwoWaysToDesign Design before dev. ● Assumes requirements are stable ● Implies design is the job of a designer ● Can take a long time ● Makes designer think ahead Design during dev. ● Assumes requirements will change a lot ● Design is the job of the programmers ● Is real time ● Focuses on current needs
  4. 4. Upfrontvs.IncrementalDesign Upfront designers: Define abstractions Incremental designers: Start from examples and extract abstractions based on patterns
  5. 5. TestDrivenDevelopment ● Write one test that describes a new behavior ● Add the minimum of code to make it pass ● Improve design by refactoring code and tests
  6. 6. KeepitSimple Minimum code to make the current test pass
  7. 7. KeepitClean Refactor after each small change
  8. 8. BeinFlow ● What's the next behavior? ● What's the minimum change to implement it? ● What's the right design?
  9. 9. TwoMainDifficulties ● Think at the problem, not the solution – Problem: I want to play TicTacToe – Solution: We need four classes and a main method ● Proof-based design – Proof-based: I see duplication, remove it by creating a class – Assumption based: I will need a Game class
  10. 10. StartWithTDD
  11. 11. HowtoStart? ● What is the first test? ● What is the next test? ● Am I going in the right direction?
  12. 12. Remember Incremental Design starts from examples, extracts abstractions based on proof
  13. 13. BehaviorSlicing ● Identify Input and Output ● Specify behaviors: input – action – output ● Simplify: Identify first increment of the problem ● Order behaviors so that only one thing changes
  14. 14. Contact me http://www.mozaicworks.com adrian.bolboaca@mozaicworks.com @adibolb Extend your mentoring & training capacity Accelerate learning through communities of practice Grow your functional leaders and top talents www.mozaicworks.com
  15. 15. PhotoAttribution http://home.dei.polimi.it/pinto/tdd/images/tdd. gif http://www.flickr.com/photos/hey__paul/75118 23952/sizes/m/in/photostream/ http://www.flickr.com/photos/ru_boff/8307297 704/sizes/m/in/photostream/
  16. 16. PhotoAttributions http://www.flickr.com/photos/porsche- linn/5738170905/sizes/l/in/photostream/ http://www.flickr.com/photos/argenberg/45090 9401/sizes/z/in/photostream/

×