williamerubin
12/7/2005 6:20:00 PM
> At the risk of sounding pedantic, Test Driven Development really is
> the best solution to this. Not only will it catch the cases you are
> talking about, but if done right it can even catch the dynamic cases
> that were given as counterexamples earlier. If you have tests that
> cover your code sufficiently, you'll find these kinds of problems
> much, much sooner. And Ruby makes TDD so easy it's almost criminal to
> not take advantage of it.
At the risk of repeating myself, it seems to me that for one-off
scripts that you may constantly be tweaking as the need arises, the
time cost of designing unit tests, and keeping them up to date, for
every possible scenario, is prohibitive.
That said, I notice that you have capitalized "Test Driven
Development"; that and the fact that you say that Ruby makes it so easy
that it's criminal to not take advantage of it leads me to believe that
you might be talking about something very specific, perhaps involving
some specific tool or specific coding technique, that I am not aware
of, as opposed to talking about the generic "unit test your code"
theory.
If so, could you please elaborate? Pointers to a website, or Google
search terms, or whatever, would be appreciated greatly.