Calendar Day View: TDD Breakdown

If you haven't heard about the series I'm doing, the Calendar Day View project is one that I'm trying to use TDD practices to show the process creating a custom control.  However, there are times when TDD breaks down, not because TDD fails, but because I failed to implement TDD.  Now, that's OK; really, the universe isn't going to come crashing down because I didn't create unit tests ahead of time, or jumped ahead into the code.

Case in point: I started to create new classes and a new approach for rendering items and calendar items.  I also used CodeSmith Studio to generate an AJAX component for me; CodeSmith Studio is awesome for generating a lot of code rather quickly; I just had to invest a moderate portion of time to get the script right, and the dividends pay off in the long run.  Thanks CodeSmith!

Anyway, I've started to create all these assets without creating tests or thinking about how the tests will come into play in the AJAX scenario.  That's not necessarily bad (unless you are a hard core TDD person).  However, the question is what I've developed is correct or not, which unit tests would have helped flesh out.  That's really what the biggest question around TDD is; does it really help you write better code, and does the extra hours put in to writing tests really mean less hours testing and maintaining later?

So I think I'll take a break, and revisit it another day when I'm more focused on TDD.  If you too wonder if unit testing is important, I came across this which might help explain it some:


No Comments