You are right. Comments cannot be tested. So skip the comments. You've still either wasted your employer's time by refactoring everything when you didn't need to (unless your employer intentionally pays you to work the way you do) or you have annoyed your coworkers by making their code conform to your style.

You are right. Comments cannot be tested. That doesn't mean they cannot be trusted. All of human based language cannot be directly tested by a computer for validity. That doesn't make it less valuable. If this thread really boils down to you not trusting a human developer's comments - that is great - I am sorry for belaboring the issue.

If grammatical issues are the driving force for this thread, well I can't help you there because my prose and the comments of most other programmers are full of errors. Somehow most people cope. Code often has style or "grammatical" errors that are not syntax errors. Somehow the computer copes as well.

I do trust comments while I am reviewing somebody else's code for general functionality. I find that when properly done, comments provide a good 30000ft view. If I am doing code review then I look closer and start to evaluate the expressions in context of the comments, but with a little more scrutiny. But when I need to fix a bug I generally ignore comments - not because I don't trust them, but because I have found I can isolate the problem more quickly with other tools and techniques. But I will still be glad when the comments are there because they have previously and will potentially give insight into what some obscure code was intended to do.

I hate the term "agree to disagree," but I think we must.

my @a=qw(random brilliant braindead); print $a[rand(@a)];

In reply to Re^6: knowing your audience by Rhandom
in thread Programming *is* much more than "just writing code". by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.