Slide 1

Slide 1 text

Pragmatic TDD Jeff Casimir / @j3

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

YATAT

Slide 4

Slide 4 text

About You

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Everybody Uses TDD

Slide 7

Slide 7 text

Derailment #1 Deadlines!

Slide 8

Slide 8 text

Derailment #2 Tools Don’t Matter (that much)

Slide 9

Slide 9 text

( BMW )

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Derailment #3 Testing Makes 
 You Slower

Slide 12

Slide 12 text

Derailment #4 I just test by hand.

Slide 13

Slide 13 text

Reality:
 TDD is SCARY

Slide 14

Slide 14 text

Why?

Slide 15

Slide 15 text

Making Decisions 
 is Hard

Slide 16

Slide 16 text

Front-Loaded, 
 Conscious Decisions

Slide 17

Slide 17 text

Choose a Framework

Slide 18

Slide 18 text

Choose an Entry Point

Slide 19

Slide 19 text

The Paradox of Choice

Slide 20

Slide 20 text

What if you don’t choose?

Slide 21

Slide 21 text

Change choices consciously

Slide 22

Slide 22 text

Pragmatic TDD
 v0.1

Slide 23

Slide 23 text

Red, Green, Refactor

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Let’s layout a 
 real strategy

Slide 26

Slide 26 text

1. Why am I building 
 a thing?

Slide 27

Slide 27 text

2. How will it ultimately 
 be used?

Slide 28

Slide 28 text

3. What would they 
 name it?

Slide 29

Slide 29 text

4. What inputs 
 does it need?

Slide 30

Slide 30 text

5. How will I know 
 when it works?

Slide 31

Slide 31 text

6. Are there
 edge cases?

Slide 32

Slide 32 text

1. Why am I building a thing? 2. How will it ultimately be used? 3. What would they name it? 4. What kind of inputs does it need? 5. How will I know when it works? 6. Are there edge cases? TDD Strategy

Slide 33

Slide 33 text

Then dive into
 tactics

Slide 34

Slide 34 text

1. Write a big test that summarizes the whole functionality.

Slide 35

Slide 35 text

2. Run the big test, 
 see it fail.

Slide 36

Slide 36 text

3. What’s the tiniest incremental step?

Slide 37

Slide 37 text

4. What are the
 minimal inputs?

Slide 38

Slide 38 text

5. What are the 
 expected outputs?

Slide 39

Slide 39 text

6. Write the test

Slide 40

Slide 40 text

7. See it fail

Slide 41

Slide 41 text

8. Write an implementation

Slide 42

Slide 42 text

9. Run the test. 
 Return to (8) if it fails.

Slide 43

Slide 43 text

10. Run the big test.
 If it fails, go to (3).
 If it passes, you’re done!

Slide 44

Slide 44 text

1. Write a big test 2. Run the big test 3. What’s the tiniest incremental step? 4. What are the minimal inputs? 5. What are the expected outputs? 6. Write the test 7. See it fail 8. Write an implementation 9. Run the test. If it fails, go to (8) 10. Run the big test. If it fails, go to (3), or else you’re done! TDD Tactics

Slide 45

Slide 45 text

Looks easy!

Slide 46

Slide 46 text

1. Write a big test 2. Run the big test 3. What’s the tiniest incremental step? 4. What are the minimal inputs? 5. What are the expected outputs? 6. Write the test 7. See it fail 8. Write an implementation 9. Run the test. If it fails, go to (8) 10. Run the big test. If it fails, go to (3) TDD Tactics

Slide 47

Slide 47 text

Do try this at home.
 (not in front of all these people)

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

1. Why am I building a thing? 2. How will it ultimately be used? 3. How would they name it? 4. What kind of inputs does it need? 5. How will I know when it works? 6. Are there edge cases? TDD Strategy

Slide 50

Slide 50 text

1. Write a big test 2. Run the big test 3. What’s the tiniest incremental step? 4. What are the minimal inputs? 5. What are the expected outputs? 6. Write the test 7. See it fail 8. Write an implementation 9. Run the test. If it fails, go to (8) 10. Run the big test. If it fails, go to (3), or else you’re done! TDD Tactics

Slide 51

Slide 51 text

Pragmatic TDD Jeff Casimir / @j3