Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
However, I don't see how using a higher-level language rather than English prose would help in every case.

Definitely not "in every case". And to be honest, these days I'd use a good macro assembler (directives .while etc.) to code most loops, branches and procedures, which does away with the need for the HLL "description". But back then, the assembler did little more than translate the opcode mnemonics to binary, and perform (non-nested) branch calculations.

Your 'security reasons' is an example(*) of when you should (ie. I would) justify breaking my basic "Don't comment." stance. It is a clear case of the exception that proves the rule.

My "Don't comment" stance has a similar power to simplify and clarify, as modern moves in governments to switch from 'Everything is secret unless we say it is not' to 'Nothing is secret unless we say it is'. There is no intention to endanger people or things by giving away everything.

Just a desire to ensure that (costly) security efforts to be concentrated upon those things that need it. Oh, and if by-the-by, it prevents a few politicians and civil servants from hiding their laziness, gross incompetence or worse, behind layers of "need to know", so much the better.

And that's my take on comments. If you've justified the addition of a comment in a piece of otherwise sparingly commented code, you can bet your bottom dollar I am going to give it my full attention.

But by my reckoning, there are about 7 or 8 significant comments in this, but I challenge anyone to find them in a hurry, so lost are they in a morass of unnecessary, irrelevant or downright misleading thoughts, feelings, opinions and speculations.

(*)It is hard to tell from such a brief description of a real situation, but I actually, I still might not comment it. From my interpretation of your description, I would probably opt for self-documentation in the form of a macro: Say SEC_reg-zero <reg>; or SEC_reg-signExtend <reg>; and the detail of the security implications would be detailed once in the macro definition.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^7: On comments by BrowserUk
in thread On comments by pemungkah

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 having a coffee break in the Monastery: (8)
As of 2024-04-19 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found