It’s not about testing!!!

When you hear someone talking about Test Driven Development, what is the first thing that comes to mind? Is it “Gee, this sounds like a testing technique!”? If it is, you aren’t alone. Given that the first word of the phrase is Test, I guess you could be excused. But the startling fact is that Test Driven Development, or TDD for short, is not fundamentally about testing.

If Not Testing, Then What?

TDD is fundamentally a design technique. It’s really about thinking about the shape and feel of the class you’re writing right now, and trying to get the interface so that it feels right, based on what you know right now. There is no other time at which getting the interface right will cost less than it will right now, before there is any code holding you back, so you may as well spend a few minutes and think about the class you’re writing from the point of view of the users of your class. Later on, they’ll appreciate the time you’re taking now to make their lives better.

If you’d like an example of this, let me know. I’ll be happy to do it, and I’ll also know that someone is reading these rants 🙂

— bab

2 thoughts to “It’s not about testing!!!”

  1. I have talked with several people lately that did not get this; they are doing test first development but not test <b>driven</b> development. To me those are two ways of saying the same thing but they have missed the exact point that you are making here.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.