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

Re: Re: Rules of Proper Perl Style

by salvadors (Pilgrim)
on Feb 15, 2001 at 23:24 UTC ( [id://58695]=note: print w/replies, xml ) Need Help??


in reply to Re: Rules of Proper Perl Style
in thread Rules of Proper Perl Style

6. Write a lot of comments, especially about the purpose of a code chunk.

Time for me to beat my "comments" drum again.

Ideally comments should not explain the purpose of a code block. The purpose should be self-evident. Moving your code out to a well named method/sub can often help greatly with this.

Instead, comments should explain the WHY behind the particular manner in which you achieve your purpose. Any average programmer should be able to read your code and see easily enough what it does. But even a great programmer might have difficult knowning why you did it a certain way. That's where good comments save a lot of head-scratching.

Tony

Tony

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://58695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-25 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found