Meditations
- “As the tests get more specific, the code gets more generic.” [1] (http://cleancoder.posterous.com/the-transformation-priority-premise)
- "Test code is just as important as production code" [1] (http://cleancoder.posterous.com/the-transformation-priority-premise)
- "Do the simplist thing that could possibly work" (see What is Simple Code for guidance)
[Three laws of TDD] (http://dave.thehorners.com/tech-talk/random-tech/387-the-three-laws-of-test-driven-development-tdd)
- You are not allowed to write any production code unless it is to make a failing unit test pass.
- You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
- You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
[TPP Provisions] (http://cleancoder.posterous.com/the-transformation-priority-premise)
- When passing a test, prefer higher priority transformations.
- When posing a test choose one that can be passed with higher priority transformations.
- When an implementation seems to require a low priority transformation, backtrack to see if there is a simpler test to pass
[What is simple code?] (http://c2.com/cgi/wiki?XpSimplicityRules)
- Runs all the tests.
- Expresses every idea that we need to express.
- Says everything OnceAndOnlyOnce.
- Has no superfluous parts.