Geeks With Blogs
Lee Brandt's Blog You're only as smart as your last line of code

For someone like me, who has never traditionally done test-driven development, it sucks. It's hard to get used to writing the test first, then when you write your test, it's easy to start writing the code to make the test pass and forget that you're doing TDD and just continue coding.

It's also hard to know WHAT needs to be testing and HOW to test everything you need to, at the appropriate isolation level. To add to my frustration, I starting my first fully test-driven project (on my own) and learning about ASP.NET MVC as well. TDD & MVC'ers also have to learn all about Mocking Frameworks and Dependency Injection framework too.

I've been an ASP.NET developer since the early betas (2000) and I can usually crank out a website in pretty good time and with this project, I have spent probably 20 hours already and I haven't even created a usable page! At least not one that didn't already exist in the MVC project template.

But I see the value.

I have created my fair share of web apps, and every one was always a crap shoot when it went live. I can (and almost always) do have someone acceptance-test the apps before launch, but it still always a crap shoot. You never know when some user is going to do something weird and end up sending a bug into your system (for your boss to see) with a screenshot of a yellow screen of death on it. I don't care WHO you are, the kinda stuff doesn't look good. But just the few (modified template pages) that I have created have been rock freakin solid. You know how I know? 'Cause I tested 'em!

The process is slow, because I am a beginner at it (and all the accoutrements that go with it). I can really see how, when I get accustomed to doing test-first development, I could settle into a real groove and not have it take that much longer than non-tested development (and with the a lot more confidence).

I'm sold. No doubt about it, I believe. I am sending in my $12.95/mo for the full satisfaction of knowing that I can never be turned down for coverage, no matter how old I am. I am riding the wave of confidence that says, "Of course my method checks that!" an "Of course, I'm sure!" I know that might delivered product will eventually be better for the suffering I face now (I'm getting paid for it and I LOVE it, so maybe suffering is a bit strong). I am a total convert and I haven't even been to the promised land.

Can I get an AMEN!

~L

Posted on Friday, April 4, 2008 2:59 PM TDD | Back to top


Comments on this post: Test-Driven Development Sucks

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Lee Brandt | Powered by: GeeksWithBlogs.net