From: Florian Frank Date: 2005-05-05T05:31:26+09:00 Subject: Re: Typo-checking instead of static typing Charles Mills wrote: >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 > > (flori@lambda:flori 0)$ gem list -r |grep covera coverage (0.2, 0.1) >>>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 > > > > > -- Florian Frank