Very well put. I'm going to save you message to use the next time I have this discussion with my colleagues. Curt -----Original Message----- From: Darrin Thompson [mailto:dthompson / characterlink.net] Sent: Friday, December 07, 2001 8:40 AM To: ruby-talk ML Subject: [ruby-talk:27818] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) David B Lightstone wrote: >(3) Mr Beck may have determined that the customer can afford >to take the risk because the expected loss associated with >the pruned test cases is acceptable. > From my reading of XP, this is probably correct. XP Explained opens with an explanation of risk management and the use of an "options calculator". (It's been a little while since I read it.) When you approach the problem as risk management I think you get closer to Beck's intent and what customers want. When customers can't define their needs well, or keep changing their minds, or their business is changing under them, we programmers need to be able to change what we are writing for them. There's a certain amount of unit testing that allows us as programmers to more confidently change what we've already done for the customer. Actual practice shows that a combination of coding standards, good use of OO, unit testing, and acceptance testing together lower the cost of making changes for the customer. And some other stuff that has worked for the big XP proponents. Getting too focused on any particular aspect of the process, like unit testing, results in a loss of focus on the big picture, delivering exactly what the customer wants, even though they never know exactly what they want before you start. Unit testing is about delivering more quality for less money than you could without it. It's about knowing when you broke something. It's not about a 100% correctness guarantee. The kind of testing Beck advocates is more art than science. It requires some gut instinct to know what to test and what to assume is unlikely to break. Sometimes you are wrong. You learn. You fix it. There's places maybe like NASA where more discipline is needed. For the small to medium sized business app or web thingie, that kind of discipline is overkill and very expensive. IMHO. :-) Darrin