So Raganwald said that Java is the right answer to the wrong question, Ruby is the wrong answer to the right question, and Benjamin Stein responded that the right question was How confident are you, the programmer, that the change you just made will work?
I think I agree with both of them, and I’d like to offer up the answer: which is that there is no one right answer.
This shows up most distinctly, I think, in the static typing vr.s unit testing debate. There are people on both sides who say their side is the only answer you need, that it solves all problems, and if you use one, you don’t need the other. Both sides are wrong- it’s not an either/or case. Strong static typing can detect many errors (including many more than most people suspect), but it can’t catch them all. The same goes for unit testing.
And the list doesn’t stop there- testing at all levels is necessary, as is code review (and/or pair programming), documentation (one of my favorite debugging techniques is documenting my code- it’s surprising even to me how many bugs I’ve found by adding comments that say “this code should do X” and then noticing that no, it doesn’t do that), careful design, etc.
We programmers need all the help we can get to produce correct code- because it’s so hard to do so. It’s never a case of either-or, we need both. Paranoia- it’s not just an occupational hazard for programmers, it’s a job requirement.
No related posts.
Pingback: Enfranchised Mind » Looking for Quotes