Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Why NOT Do TDD? Bob Allen Code Craftsman meeting Sept 3."— 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 ":

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 RETRO What was THAT all about? (can you guess?)

37 Why NOT Do TDD? Coding Playtime #1 RETRO What 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 RETRO What was THAT all about? (can you guess?)

45 Why NOT Do TDD? Coding Playtime #2 RETRO What 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 See you in 2 weeks??


Download ppt "Why NOT Do TDD? Bob Allen Code Craftsman meeting Sept 3."

Similar presentations


Ads by Google