Perl Monk, Perl Meditation | |
PerlMonks |
Re: Testing: Fun for the familyby sfink (Deacon) |
on Mar 11, 2004 at 20:17 UTC ( [id://335966]=note: print w/replies, xml ) | Need Help?? |
I have been doing a lot of test-driven development recently, and so far, I have to say it's a mixed bag.
It is enormously valuable to be able to have an actual demonstration of the correctness of a subsystem, rather than relying on gut feel and developers' memories of what they have "tested". It is pretty much impossible to have any confidence in a release unless you have the tests to show that at least a subset of the functionality is fully working -- without the tests, it's amazing what can be broken and still appear to work for the things that have been thrown at it so far. However, and perhaps this is more a reflection of me than the methodology, but I have not had great experiences with using test-driven development to drive the design. Whenever I start out by writing the tests and then making the design work for as many of those as I can, I end up with a simplistic design that:
I find that if I step away from the details and create the design, and even part of the code, based on a wider view of what the system needs to do know and might need to do in the future, that I end up with a much more robust system that can pass the tests and can deal with the inevitable late-stage additions. This opinion is probably not too popular with the current conventional wisdom about agile development processes or whatever, but I'm just reporting what my recent experience has been. I am more productive with initial design then initial coding then tests then final coding. And again, this may just be due to defects in the gooey stuff between my personal pair of ears, but I'm wondering if others have experienced the same.
In Section
Meditations
|
|