Edsger W. Dijkstra wrote:Program testing can be used to show the presence of bugs, but never to show their absence!
John Czukkermann wrote:The more I thought about it though, the more I came to the realization that TDD, as defined, cannot be applied to unit testing unless you are superbly clairvoyant! Why? Well, if one of the criteria of unit testing is to test all code paths in a given unit of code (class, method, whatever), in order to apply TDD, one would have to know what the code paths are before the code was written, so you could create the tests to drive them. That's a really hard task for a typical mortal.
Jeff Langr wrote:
I've found that a mostly-test-driven approach has indeed been practical, on very large and very complex systems and many others of different stripes I've worked with in the past 15 years, and perhaps partly because it promotes *eschewing* methods with a high degree of complexity. Most complexity in software can and should be driven out in favor of small, composed methods and rare but isolated complex methods.
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
Free, earth friendly heat - from the CodeRanch trailbosshttps://www.kickstarter.com/projects/paulwheaton/free-heat