Practicing TDD effectively goes beyond knowing the Red-Green-Refactor cycle — it involves taking small steps, writing the right tests, doing the refactor step properly, and applying judgment about when TDD fits. Done well, it drives good design and high-quality, well-tested code.
The disciplined cycle
1. RED — write ONE small failing test for the NEXT bit of behavior (run it, see it fail —
confirms the test works and the feature is missing)
2. GREEN — write the SIMPLEST code to pass (don't over-engineer; even "fake it" first)
3. REFACTOR — now improve the design (remove duplication, clean up) with tests as a safety net
→ SMALL steps; one behavior at a time; stay in short cycles.
