useless comments (was Re: ActiveState going the wrong way)

Simon Brunning SBrunning at trisystems.co.uk
Wed Apr 11 07:20:09 EDT 2001


> From:	Alex Martelli [SMTP:aleaxit at yahoo.com]
> > I have yet to find a "useless" comment.
> 
> Have you TRULY never seen such beauties as
> 
>     x++;    // increment x by one
 
I can beat that. This comment would explain to someone who had never seen C
what this line of code does. That's not *useless*, it's merely next to
useless.

I'm working in RPGIII at the moment*, and I came across this little beauty:

.....CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments+++++++..
....
     C                     COMIT                           Comit

(RPG is a fixed format, columnar language. Not pretty. I've included a
'ruler', to show where the columns are.) The opcode is 'COMIT' - i.e. commit
database changes. Notice that in the comment, the programmer didn't even
bother to use the whole word!

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk

* It's a living.




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.




More information about the Python-list mailing list