On Sat, Apr 29, 2006 at 01:49:43PM +1000, [EMAIL PROTECTED] wrote: > With regards to last night's Slug meeting and using automated testing, > I think everyone agrees that writing (and using) test cases produces > higher quality code with less bugs. My point is that higher quality > output doesn't come for free, it requires effort and that usually means > someone has to pay for it.
cost(Debugging without tests) > cost(debugging with tests) + cost(tests) Why? Because your tests tell you where the problem is, usually. If your test suite isn't comprehensive enough to localise the problem sufficiently, then the first part of your debugging routine is to add tests to your test suite that localise the problem. This is time that you would spend localising the problem in an ad-hoc fashion anyway, and if you encode it in your test suite, then it's time spent only once (writing the tests) instead of spending the time localising the problem to the same unit over and over and over again. This single point is enough to win me over to test-first development. It has cut the amount of time I spend debugging any non-trivial program by a huge amount. Then there's all of the other factors, which improve my job satisfaction -- and a happy programmer is a productive programmer, which improves productivity as well. But they're far more intangible. - Matt -- Windows is too dangerous to be left to Windows admins. -- James Riden, ASR -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html