From: Charles Mills Date: 2005-05-05T00:34:38+09:00 Subject: Re: Typo-checking instead of static typing Hal Fulton wrote: > Eric Hodel wrote: > > On 03 May 2005, at 12:27, Ben Giddings wrote: > > > >> > >> 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. > > Let me put in a plug for code coverage tools in general. > Combined with good unit tests, these are truly invaluable. > > There's a good one out there, but I forget what it's called -- > I don't use it much, I've only played with it. > > > Hal Are there any code coverage tools for Ruby? -Charlie