David Cantrell wrote: > Geoffrey Young wrote: > >>> "Only the simplest of designs benefits from pre-coded tests, unless >>> you have >>> unlimited developer time." >> >> needless to say I just don't believe this. > > > Try writing a test suite ahead of time for a graphing library. It's > possible (indeed, it's trivial - just check the md5 hashes of the images > that are spat out against images that you have prepared ahead of time in > some other way) but it would be damnably time-consuming to create those > tests. Consequently, I've not bothered. I throw data at it, and look > at the results. If the results are good I then put an md5 hash of the > image into a regression test.
well, ok, I'll agree with you if you look at it that way. but I think tdd ought to happen at much lower level than that - certainly there's more to test than just spitting out an image? you're probably calling several different subroutines in order to generate that image, each of which can be developed using tdd, and each of which gets more and more simple as you get deeper into the application I'd suspect. in general that's where I think the gap really rests for people who think tdd doesn't work. or maybe it's my misunderstanding. but I think there are places much deeper than the end product that warrant testing, and where tdd can succeed and add value no matter how large or complex the code is. --Geoff