procmail
[Top] [All Lists]

Re: simple manpage question: procmailrc and comments

2001-02-07 10:46:49
At 11:01 2001-02-07 -0500, Joe Altman wrote:

I realized late last night what I was probably missing: I am not a
coder. If I understand correctly, 'good' code has comments explaining
the code...usually to the right of the line of code, rather than above
or elsewhere.

No, good code merely has clear and correct commentary. It doesn't matter if it is above or to the right.

Quite often, it is easier to document a block of code right above the code than it is to document along the right hand side (there is rarely the need to document each individual line). For one, you have more space in which to write a comment if you start in the first column, whereas if you start at the end of the line of code, you have limited space between that start point and the right margin (panning to the right to see comments which may be offscreen is terribly inefficient, and if you print, it ends up either being truncated or wrapped).

The important thing is to document anything which needs documenting (the need to double-escape a variable definition which is then used in a regexp for instance), and to document even things which don't necessarily need gobs of clarification (a one-liner that identifies the name of a mailing list you're filtering, because the email address for it might not be the same - thus, you can easily search your .rc files for the recipe which pertains to a list).


---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail