Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I do believe that light commenting is good.

In your bullets, you make the following points:

  1. helps clarify the problem before coding

    Yes, but sometimes these notes should be kept separate as design documentation. Some of this can also be done by writing tests.

    Here you are saying they have served their purpose already; you need another purpose to shove them into the code.

  2. reminds you ... what you thought you were doing.

    This is true, but it is could also true of the code itself. This can also be done with tests.

  3. [make] obvious that there's a mismatch between what was intended and what's been written

    No, this is like having two compasses that don't agree. Well, if you're the author, it can work until tickling your memory doesn't help.

    Expressing your intentions for some code can be more precisely done by tests.

  4. make you to consider edge conditions and check [them]

    Better done by testing.

  5. require you to express and examine assumptions.

    Better done by testing.

  6. justify and document the choice of algorithm or method.

    Agreed.

  7. leave notes on things which were not obvious when you worked out what needed to be done or how to do it

    What is being done and how it is being done is captured in the code; the mindset of a maintainer with the artifact of the code before him may not mirror that of the writer who sat down with no code in front of him.

  8. and so on.

    May your comments not be so vague, :-) and testing will probably help with whatever this is :-).

Be well,
rir


In reply to Re^2: Why no comments? by rir
in thread Why no comments? by targetsmart

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (11)
    As of 2019-10-17 17:40 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?