On 03 May 2005, at 12:27, Ben Giddings wrote:

> The stock answer here is "unit tests", but honestly, I never bought 
> that
> answer.  Maybe it's because too often I deal with things that are
> incredibly difficult to unit test, i.e. GUIs, external data sources,
> unreliable networks, opaque 3rd-party interfaces and other things which
> are very difficult to mock out.  It isn't to say they aren't testable,
> just that they're really hard to test well.
>
> My open question is then: how do you find typos and brainos in 
> seldom-run
> code in a dynamic language like Ruby?

Yes, unit tests and ruby -w.  I wrote the thing in the 'I Rock.' post 
between midnight and 4am.  As you can imagine, writing code tired is 
fraught with crazy typos, but the unit tests found them all.

When I was almost done, I spent 15 minutes on a 1 character typo (rrc 
in one spot, rcc in another).  I didn't have a unit test for that case.

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04