This document discusses test-driven development (TDD) and its benefits. It presents examples showing that writing tests first is faster than writing code first and tests later. Key points covered include specifying requirements through tests, using tests for feedback and preventing regressions, and maintaining test code with the same quality as production code. Resources on TDD techniques and tools like ApprovalTests.com are also listed.
2. Is Testing Faster? (Test After)
60 Minutes
Work (code)
X minutes
Non-Work(tests)
Code
<
60 Minutes
Code + Test
60 + X minutes
3. Is Testing Faster? (Test 1st)
30 Minutes
Work (code)
X minutes
Non-Work(tests)
Code
60 Minutes <
?
Test + Code
X + 30 minutes
4. Today’s Kata: Triangle
1) A side has a distance
2) Side knows endpoints
3) 3 points
4) 3 sides
5) Perimeter
6) Get sides touching a point
7) Get side opposite a point
8) The angle of 2 sides touching a point
9) 3 angles
10) Right Triangle
13. Verification
Is it the right answer?
1. Change the Question
2. Ask an expert
14. Completing the Circle
Your output should tell the story.
Objects should have ToStrings
Benefits
1. Specification
2. Feedback
3. Regression
4. Granularity
15. Fake it Till You Make It
Buys some time
Allows for Triangulation
16. Today’s Kata: Triangle
1) A side has a distance
2) Side knows endpoints
3) 3 points
4) 3 sides
5) Perimeter
6) Get sides touching a point
7) Get side opposite a point
8) The angle of 2 sides touching a point
9) 3 angles
10) Right Triangle