4. Principles
1. Don’t write any new code until you first have a
failing test.
2. Test everything that could “possibly” break.
3. BabySteps
5. How to Get to Green
• Fake it till you make it
• Fake it - return what the test requires, nothing more
• Obvious - when the code to make the test pass is
trivial
• Triangulation - write a second test forcing the ‘fake’
solution to be exposed as insufficient
6. Refactoring
• DRY - Don’t Repeat Yourself
• Technical Debt
• Don’t Live with Broken Windows
• Refactor Early, Refactor Often
10. The Rules of FizzBuzz
• If number is divisible by 3, return “Fizz”
• If number is divisible by 5, return “Buzz”
• If number is divisible by 3 & 5, return “FizzBuzz”
• Otherwise, return the number