I started reading Test-Driven Development by Kent Beck. It’s been a pretty interesting read.
Some of the basics I wanted to blog just to help me remember.
Two rules of Test-Driven Development (TDD):
- Write new code only if an automated test has failed.
- Eliminate duplication.
Order of Tasks of Programming:
- 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.
I tried a little TDD and it’s really interesting and great to get immediate feedback. I’d highly recommend giving it a shot if you get the chance. The book is pretty good so far too.