[Tutorial] Test Driven Design

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):

  1. Write new code only if an automated test has failed.
  2. Eliminate duplication.

Order of Tasks of Programming:

  1. Red-Write a little test that doesn’t work, and perhaps doesn’t even compile at first.
  2. Green-Make the test work quickly, committing whatever sins necessary in the process.
  3. 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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s