"Rolf" wrote: >>> how do you test the accuracy of your new whizz-bang ultra-accurate >>> pressure sensor ..... somehow you have to build an even more accurate >>> pressure container... >>> >> >> I think this is like comparing apples and banana pies. >> >> >> > Your original assertion wash that the tests are simpler than the > program. Why is this comparing apples and banana pies? Because software is different from physical objects. So much so, that most software analogies brought in from "the real world" are not very useful. Prime example is comparing software to building a house, and yet Wouter et al had a fun discussion recently about the merits of top-down, bottom-up, and middle-out development approaches. >>> how do you test a software implemented queue that is accessed in a >>> multi-threaded environment for both adding to and removing from the >>> queue... >>> >> >> You write functions that put something in the queue, and other functions >> that pull stuff from the queue. What's complicated about it? > > I can see how at face value it may seem simple, perhaps the example is > trivial. How about I said "how do you test an 'savings account' where > interest is calculated/adjsuted with each deposit/withdrawal in a > multi-threaded environment."... then again, perhaps my industry-specific > bias makes that 'simple' operation a whole lot more complex to get > right.... like telling an EE to just get a 16-bit ADC for an analog > signal... and they freak when you have no idea about noisy ground > planes/power supplies, jitter and bandwidth.... and you say "What's > complicated about it?". > > For the record, in a multi-threaded environment it is not unusual for > the test mechanisms to subtly (and sometimes not so subtly) alter the > process flow in such ways that the way the code works without the tests > is different to the way it works with the tests... You and Gerhard are both right, I don't have anough expertise to make qualified statements about your examples. I already said I'm new to TDD, but the concept makes sense to me, and I find the the simple "sanity check" tests useful. Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist