Jeffrey Fredrick

month

April 2010

1 post

What made me start doing TDD

In 2001 I was writing robocode robots and battling them with some co-workers. Things were going well enough — win some, lose some — when a friend suggested we try writing unit tests for our bots. Great idea! I’d been wanting to learn unit testing since at least ‘97 when I read about it on the C2 wiki.

Before I started writing the tests I thought they would help me catch those last couple of bugs in my program. Sure the average programmer wrote a bug ever 2-5 lines, but I was pretty sure I was better than average and had only a few remaining. After all, not only was I pretty careful with my code but I’d been testing and debugging my bot code for a couple of weeks.

Then I started writing the tests.

Suddenly a bug only every 5 lines sounded pretty good! How had this CRAP ever seemed to work at all?!?

Once I realized how much I sucked without tests I didn’t want to write code without them, and TDD was the most efficient way to do that.

Apr 05, 20100 notes
Next page →
2009 2010
  • January
  • February
  • March
  • April 1
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December
2008 2009 2010
  • January 2
  • February 4
  • March
  • April 1
  • May 1
  • June
  • July
  • August
  • September
  • October
  • November
  • December
2008 2009
  • January
  • February
  • March
  • April
  • May
  • June 2
  • July 3
  • August
  • September
  • October
  • November
  • December