1 / 46

Why NOT Do TDD?

Why NOT Do TDD?. Bob Allen Code Craftsman meeting Sept 3. Why NOT Do TDD? Mobile apps. "We can't do TDD because … … we work on Android apps": . Why NOT Do TDD? Mobile apps. "We can't do TDD because … … we work on Android apps" : … we work on IOS apps (Objective-C) ": .

kata
Download Presentation

Why NOT Do TDD?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why NOT Do TDD? Bob Allen Code Craftsman meeting Sept 3

  2. Why NOT Do TDD?Mobile apps "We can't do TDD because … • … we work on Android apps":

  3. Why NOT Do TDD?Mobile apps "We can't do TDD because … • … we work on Android apps": • … we work on IOS apps (Objective-C) ":

  4. Why NOT Do TDD?It’s a new language "We can't do TDD because … • … we code in Scala":

  5. Why NOT Do TDD?It’s a new language "We can't do TDD because … • … we code in Scala": • … we code in Erlang:

  6. Why NOT Do TDD?It’s a new language "We can't do TDD because … • … we code in Scala": • … we code in Erlang: • … we code Clojure":

  7. Why NOT Do TDD?It’s a new language "We can't do TDD because … • … we code in Scala": • … we code in Erlang: • … we code Clojure": • … we code in < some functional language >":

  8. Why NOT Do TDD?We don’t know how "We can't do TDD because … • … we work in JavaScript":

  9. Why NOT Do TDD?We don’t know how "We can't do TDD because … • … we work in JavaScript": • …we work on { Angular | NodeJS | Backbone | …}":

  10. Why NOT Do TDD?It’s too old of a language "We can't do TDD because … • …we work in COBOL":

  11. Why NOT Do TDD?It’s too old of a language "We can't do TDD because … • …we work in COBOL": • … we work in RPG":

  12. Why NOT Do TDD?It’s too old of a language "We can't do TDD because … • …we work in COBOL": • … we work in RPG": • … we work in .NET/C#":

  13. Why NOT Do TDD?It’s too old of a language "We can't do TDD because … • …we work in COBOL": • … we work in RPG": • … we work in .NET/C#": • … we work in assembler":

  14. Why NOT Do TDD?It’s takes too long to run "We can't do TDD because … • … our tests take forever":

  15. Why NOT Do TDD?It’s takes too long to run "We can't do TDD because … • … our tests take forever": • … the unit testing framework is too slow”:

  16. Why NOT Do TDD?It’s takes too long to run "We can't do TDD because … • … our tests take forever": • … the unit testing framework is too slow”: • … what’s a mock and why are static methods bad?”:

  17. Why NOT Do TDD?TDD is only for trivial cases • Trivial apps like Facebook, Google, and Amazon. These guys any many more use TDD.

  18. Why NOT Do TDD?TDD is only for trivial cases • Trival apps like Facebook, Google, and Amazon. These guys and many more use TDD. • Major portions of Eclipse and Visual Studio were developed using TDD. Probably just the trivial parts though.

  19. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Detecting

  20. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Detecting • Reporting

  21. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Detecting • Reporting • Tracking

  22. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Detecting • Reporting • Tracking • Charting

  23. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Detecting • Reporting • Tracking • Charting • Investigating

  24. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Detecting • Reporting • Tracking • Charting • Investigating • Solving (days or weeks after creating the bug)

  25. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Doing all that stuff, • And compare it to the time required to prevent it in the first place.

  26. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Doing all that stuff, • And compare it to the time required to prevent the bug in the first place.

  27. Why NOT Do TDD?TDD slows down the development process Add up all the time you spend … • Doing all that stuff, • And compare it to the time required to prevent the bug in the first place. • Then think about having single-digit bug counts (zero is a single digit).

  28. Why NOT Do TDD?TDD Means Not Doing Any Design Thinking Up Front Bull … • First: Sketches, CRC cards, and even UML are all present and recommended in Beck’s book Extreme Programming Explained.

  29. Why NOT Do TDD?TDD Means Not Doing Any Design Thinking Up Front Bull … • First: Sketches, CRC cards, and even UML are all present and recommended in Beck’s book Extreme Programming Explained. • Second: TDD is design. Emergent design that allows for and pretty much demands that you apply what you learn along the way.

  30. Why NOT Do TDD?TDD Doesn’t Catch ALL The Bugs Yep … • If you find a process that does, please use it.

  31. Why NOT Do TDD?TDD Doesn’t Catch ALL The Bugs Yep … • If you find a process that does, please use it. • …and tell us about it.

  32. Why NOT Do TDD?What Else? You’ve probably been given reasons (or have your own) for why/when NOT to use TDD. Let’s hear them. Then we’ll do some coding…

  33. Why NOT Do TDD?Coding Playtime #1 Point your browsers at Cyber-Dojo.com (20 minutes of playtime):

  34. Why NOT Do TDD?Coding Playtime #1 Point your browsers at Cyber-Dojo.com (20 minutes of playtime): • - Self-organize into pairs or triplets (as you see fit). • Hit start and note your assigned animal. • Take out your smart phone or anything else you can use as a timer. • Start a 2-minute timer and begin. • IF you get to GREEN before the timer expires, then go ahead and refactor if need be. Then restart your timer, and go back a step. • IF you FAIL to get to green before the timer expires, revert to your prior green traffic light (see the “Click to revert” arrow in the lower left) and go back two steps (start timer).

  35. Why NOT Do TDD?Coding Playtime #1 STOP! 20 minutes have gone by. Time for a RETRO

  36. Why NOT Do TDD?Coding Playtime #1 RETROWhat was THAT all about? (can you guess?)

  37. Why NOT Do TDD?Coding Playtime #1 RETROWhat was THAT all about? (can you guess?) THAT was “Taking Baby Steps” (thank you Adrian Bolboaca). The point is emphasize the importance of taking very small steps to prevent getting lost in the weeds, and being willing to throw away what you’ve got and start again when you’re down the rabbit hole.

  38. Why NOT Do TDD?Coding Playtime #2 Want to do another (45 minutes)?

  39. Why NOT Do TDD?Coding Playtime #2 Want to do another (45 minutes)? • Go back to Cyber-Dojo.com. Pick a different problem this time; either one you’re familiar with, or a new problem, it doesn’t matter. • Self-organize into pairs or triplets (as you see fit). • This time, I’ll start a 10-minute timer, but you can iterate as many times as you wish within that 10 minutes. WRITE GOOD CODE. • At the end of ten minutes, I’ll let you know what I want you to do next.

  40. Why NOT Do TDD?Coding Playtime #2 Starting the second 10 minutes: Person on the left shift over to next pair on their left. • move one pair over (just one person in each pair). • Start second ten minute iteration. • Veterans (the pair member that stayed behind): you’re the newbie’s guide

  41. Why NOT Do TDD?Coding Playtime #2 Starting the third minutes: Person on the right shifts right. • move one pair to your right (just one person in each pair). • Start third ten minute iteration. • Veterans (the pair member that stayed behind): you’re the newbie’s guide

  42. Why NOT Do TDD?Coding Playtime #2 Starting the fourth 10 minutes: Both pair members move this time. • Person the left, move over to the next pair to your left. • Person on the right, move one pair over to your right. • Start fourth ten minute iteration. • There are no veterans at this point. WAAHHHAAAHAA!

  43. Why NOT Do TDD?Coding Playtime #2 STOP! 40 minutes have gone by. Time for a RETRO

  44. Why NOT Do TDD?Coding Playtime #2 RETROWhat was THAT all about? (can you guess?)

  45. Why NOT Do TDD?Coding Playtime #2 RETROWhat was THAT all about? (can you guess?) THAT was “Crazy Boston Pairing” (thank you Zack Shaw). It’s about learning to appreciate what the next person that looks at your code is going to encounter and writing expressive code to help-out that next person. You may be that next person, but maybe not.

  46. Why NOT Do TDD?Coding Playtime #2 FINI! Please visit http://codecraftmansaturdays.blogspot.com See you in 2 weeks??

More Related