From: Phillip Gawlowski Date: 2008-03-31T21:51:16+09:00 Subject: Re: Is it me or Math::sqrt? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert Klemme wrote: | 2008/3/31, Phillip Gawlowski : | | Often it's helpful to try parts of an algorithm in IRB. That way you | easily find bugs as this one. :-) The difficulty is, that my assumptions were broken. And even with irb, the assumptions *I* make aren't checked. Neither would unit tests or similar things: If my assumptions are incorrect, and I don't know it, I'll write tests and code that validate my assumptions. The difficulty, if one is working alone, to find a way to check assumptions (and looking up the math formula for calculating the Euclidean distance between two points helped my catch another assumption I made, fortunately), which co-workers or so could provide. Ah, well, this just shows that I have to check my assumptions, too, and perform due diligence when working on something. Which is blatantly obvious, of course, but I needed that reminder, obviously. I'm just glad that I only write code in a vacuum, but don't exist in one. :P - -- Phillip Gawlowski -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfw3kYACgkQbtAgaoJTgL+lHwCfRmMN9JLjszwU0S+s+au4cJPc l20AnRTtcp2y4kygn++M8Dbadxw2DrLE =v+RD -----END PGP SIGNATURE-----