Bob Martin describes Test-Driven Development using these three simple rules:
- Do not write production code unless it is to make a failing unit test pass.
- Do not write more of a unit test than is sufficient to fail, and build failures are failures.
- Do not write more production code than is sufficient to pass the one failing unit test.
Even though this sounds restrictive, it is a very productive and fun way to develop software.