More on TDD "so much code"

by Buddy Lindsey on June 16, 2007

As you may know I have been trying to learn Test Driven Development. One thing that has always bugged me is how much code you write just to test something. To me it seems like you should spend most of your time writing your application not writing tests.

Well believe it or not writing a lot of test code is great. As I am working through examples I have realized the more tests you write the stronger your code is. Reason I say this is because say in 2 years when you come back to your code and add or change something and 20 tests break, that you will probably never notice, you know that hey there is a potential bug. When you fix that hey you have good code because all your tests pass and you are testing every part of your app not just a small bit of it.

So in the end I realize now that writing a A LOT of test code is a good thing because it leads to a better final product.

Related Posts:

Was this Helpful?

If you found this article useful you might find others useful as well. Please browse the archives and subscribe to the RSS Feed to stay up-to-date.

Leave a Comment

Previous post:

Next post: