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

Re: The difficulties of commenting code

by voyager (Friar)
on Jun 29, 2001 at 06:02 UTC ( [id://92517]=note: print w/replies, xml ) Need Help??


in reply to The difficulties of commenting code

Agreed. And in addition to clear names for variables, (stolen from Refactoring, Fowler) replace several lines of code and the comment with a well-named sub:
sub xxx { # this code does foo and bar and baz [many lines of code] }
can become
sub xxx { do_foo_and_bar_and_baz(); } sub do_foo_and_bar_baz { # no explicit comment needed, since sub has clear name [many lines of code] }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2024-04-18 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found