More on TDD

I think I may have to break down and buy a book on test-driven development. Maybe Kent Beck's Test Driven Development By Example. I usually don't like to pay for programming books because they tend to be expensive, have low re-read value, and you can often get the information online. However, this is more a methodology topic than a technology topic, so that's not so true. Plus they don't have anything on TDD in the local Barnes & Noble, so I can't read it without shelling out. Rats!

I really just need to do some more reading and get a little more practice. There are still some aspects that I'm not quite getting. Then again, it's been less than a month since I started looking at TDD and I haven't had as much coding time as I would have liked.

The problem seems to be two-fold. The first is that I'm not yet certain how to write really good unit tests. Second, and the reason I was looking at Beck's book, is because I haven't seen any really good examples yet.

Most of the articles I've read suffer from the same pedagogical flaws as tutorials on object-oriented programming: they're too simple to be useful. An article doesn't provide enough space to work up to a good example. You either end up jumping right in on the deep end, which makes it useless for beginners, or you do something small, manageable, and not especially useful in real life.

Another problem I'm having is working with mock object frameworks like NMock. At this point I'm still working on where the line is between adding mock objects to my unit tests and refactoring things so that it's not an issue. I suspect this is because I have yet to internalize the line between unit and functional tests. Hence the need for a more extensive treatment.

It's only a matter of time and practice. Just my little experience with TDD so far make me feel that I've made significant progress as a developer. Which actually feels both good and bad. It's good to learn new techniques and improve. But on the other hand, I feel like kind of a schmuck for taking so long to get to the party. But at least I'm not the last one....

You can reply to this entry by leaving a comment below. You can send TrackBack pings to this URL. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.