Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: "Cleverness" from HOP

by chromatic (Archbishop)
on Jun 12, 2009 at 08:15 UTC ( [id://770858]=note: print w/replies, xml ) Need Help??


in reply to Re: "Cleverness" from HOP
in thread "Cleverness" from HOP

Am I naive in thinking you can write clever code so long as your commenting for it increases exponentially with respect to "unit" increases in cleverness?

Yes; comments are far too often a maintenance burden.

I want the intent of my code to be clear on reading the code itself. Where it's not, I try to rephrase the code for clarity. Where that's not possible, I use a comment to explain the motivation.

Replies are listed 'Best First'.
Re^3: "Cleverness" from HOP
by demerphq (Chancellor) on Jun 14, 2009 at 10:54 UTC

    Agreed. Comments should explain the why. The what should be blindingly obvious from the code.

    ---
    $world=~s/war/peace/g

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2025-04-20 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.