Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Code Maintainability

by sundialsvc4 (Monsignor)
on Dec 09, 2008 at 21:34 UTC ( #729273=note: print w/ replies, xml ) Need Help??


in reply to Code Maintainability

Well, I do find that comments are extremely useful. They help me understand "what that damned fool was (not...) thinking when he wrote this awful code!" ... even though, of course, that "fool" was likely-as-not me!

What a good comment tells me, that (Perl or otherwise) source-code cannot, is: the designer's intent. It serves as an introduction to the code, a way to point-out particulars about understanding it, a "running narrative" between the original writer and the (same or different) person who follows him/her.

I never need a comment to tell me, "this is what this-or-that code block does." I can see that. What I need to know is: "what was running through your head when you wrote this?" "What's the not-so-obvious or easily forgotten aspect of this code that you'd really like to point out to me? What's the special breadcrumb that you'd like me to remember?"

"Priceless."


Comment on Re: Code Maintainability
Re^2: Code Maintainability
by Forsaken (Friar) on Dec 11, 2008 at 09:44 UTC
    I can't help but agree with this. Going through some code that I wrote 2 years ago, I can easily see *what* it does, but I'm damn happy I used comments to explain *why* I chose to do certain things a certain way.


    Remember rule one...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-08-20 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (107 votes), past polls