The Artima Developer Community
Sponsored Link

.NET Buzz Forum
How Test Driven Development proved itself in a big way!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Roy Osherove

Posts: 1807
Nickname: royo
Registered: Sep, 2003

Roy Osherove is a .Net consultant based in Israel
How Test Driven Development proved itself in a big way! Posted: Sep 9, 2004 8:36 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Roy Osherove.
Original Post: How Test Driven Development proved itself in a big way!
Feed Title: ISerializable
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rosherove/Rss.aspx
Feed Description: Roy Osherove's persistent thoughts
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Roy Osherove
Latest Posts From ISerializable

Advertisement
Over the past year or so I've been going around trying to tell people how and why test-driven development will help their development process. Its hard to convince people. It's actually still hard sometimes, even after people have had real-hands on experience (after attending one of my TDD workshops). Why? because its just too good to be true , sometimes. And being afraid of what to tell your boss matters too.
 
So here's a good story you can tell around the camp fire. Today I've experienced one of the most gratifying results of writing unit tests. We have a system that is near production ready, which involves lots of layers, logic and data. Today we had to do one of the most scary things you can do to a system that is near production - change the indexes of most of your database tables, including some primary keys, then go through all the stored procedures and change them to fit this new schema. How scared would you be?
 
Heres how it worked for us:
  • Downloaded CodeSmith (awesome application, that.)
  • Created a simple template for stored procedures against all db tables
  • Ran the script against the database - generating only DELETE procedures
  • Ran all the tests
  • 5 tests out of about 200 failed
  • We tweaked the procs a little by looking at the old database
  • Ran all the tests
  • All the tests were green
  • We continued the same process for Update and Select procedures.
  • It took 4 hours to complete this whole experience, with all the tests running in the end.
Imagine doing this on your system today. Would you even consider it?
This is agility in its truest form: The ability to make changes to the system when you need it. And knowing what breaks when you actually do it. And being able to fix it and know that you actually did fix it.
I could easily say that the Unit Tests paid for themselves just from today's experience. not to mention the amount of time they have already saved thus far. I am now throughly convinced that Test-Driven development is one of the best ways to tackle, if not reduce, the amount of risk in today's average IT project.
 
If you're all now thinking "we don't have time to incorporate the complete "Extreme Programming" process into our Dev team - you don't have too. the project I'm talking about is NOT doing full on XP. however, TDD is a big part of it, as well as customer on site and refactoring. Some pair programming was done in several parts of the project, but not all of it.
 
I can certainly say that had we not had unit tests - we would be doing today "Prayer Programming" :)

Read: How Test Driven Development proved itself in a big way!

Topic: Hashing Suggestions Previous Topic   Next Topic Topic: Why Projects Fail?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use