====== Test Driven Development ====== \cite[S. ix]{Beck2003} In TDD, we * write new code only if an automated test has failed * eliminate duplication. The TDD mantra \cite[S. x]{Beck2003} - red: write a little test that doesn't work, and perhaps doesn't even compile at first. - green: make the test work quickly, committing whatever sins necessary in the process. - refactor: eliminate all of the duplication created in merely getting the test to work. The rhythm of TDD \cite[S. 1]{Beck2003} - quickly add a test - run all tests and see the new one fail - make a little change - run all tests and see them all succeed - refactor to remove duplication