Learning TDD by reading the book: TDD by Example
- Write a test
- Make it compile
- Run it to see that it fails
- Make it run
- Remove duplication
First 3 steps prioritise speed over quality
- Divide and conquer (small steps)
- Passing tests very quickly is more important than code quality
- After passing the tests, then clean up the code
- Fake it: If something goes wrong
- Obvious implementation: When all is well
- Triangulation: adding another test case and generalize the 2 cases when uncertain on how to refactor