Slashdot Mirror


If the Comments Are Ugly, the Code Is Ugly

itwbennett writes "What do your comments say about your code? Do grammatical errors in comments point to even bigger errors in code? That's what Esther Schindler contends in a recent blog post. 'Programming, whether you're doing it as an open source enthusiast or because you're workin' for The Man, is an exercise in attention to detail,' says Schindler. 'Someone who writes software must be a nit-picker, or the code won't work ... Long-winded 'explanations' of the code in the application's comments (that is, the ones that read like excuses) indicate that the developer probably didn't understand what he was doing.'"

2 of 660 comments (clear)

  1. Rubish by mce · · Score: 0, Redundant

    One simple question regarding spelling/grammar mistakes: What about non-native speakers? Is their code bad just because he or she tends to write "recieve" instead of "receive" (just one example mistake that is quite common for native Dutch speakers due to bias by his/her mother tongue)? I would hope not... TFA goes as far as to claim that non-natives actually tend to have better English language skills. First of all, I'm not convinced of that as a general rule. But even if it were true, there will always be traps for even those people to fall into unknowingly. What's more, I myself most certainly know about "receive", but even so I get it wrong at least 75% of the time. I also know that due to "selective blindness" reading the comment afterwards is not enough to catch all of those.

    At the other extreme: Back when I was still writing code on a daily basis, I tended to spell check it every so often and fix any mistakes found. Talk about bitf*cking... :-) But I fail to see why wasting time on doing that would be a guarantee of proper design.

  2. /* You are not expected to understand this */ by lbalbalba · · Score: 0, Redundant