Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Where are the code comments? I see a large block of commented text that would work better as POD, but not a single comment in the code itself. I like to have this interface documentation to POD so that your module can be 'perloc Module'ed by users. Given that the code is fairly dense (although not inscrutable), you might consider a note here and there about what is going on.

FWIW I like the "Code Complete" method for generating correct code comments. Outline the procedure in English (or Latin or Klingon or German). Turn all those simple English statements into comments. Then write the code that does what the English states needs to be done. If one of those English steps is too complex to be done in five to ten lines, consider repeating the process for this piece of the routine.

This method has the advantage of forcing you to outline your code *before* writing it-- which means that problems will become apparent before you write a single line of code. It also means that meaningful comments will be right there.

Well, that's my two cents, anyhoo. YMMV. :)


In reply to (ichi) Re: Am I over-commenting my code? by ichimunki
in thread Am I over-commenting my code? by belden

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found