Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: flower box comments

by EdwardG (Vicar)
on Nov 17, 2003 at 10:06 UTC ( [id://307613]=note: print w/replies, xml ) Need Help??

in reply to flower box comments

What I have seen is that this style of comment (in particular) tends to grow less accurate as it passes through iterations of maintenance. Eventually it becomes just wrong, for example referring to parameters that are no longer used, or describing the original purpose that no longer applies.

And if you don't trust the comment, you have to read the code, and if you end up reading the code then why bother with this type of comment in the first place.

It could also be argued that this style of comment is a form of code duplication, complete with the same maintenance issues. Of course I want to see helpful comments, particularly for dense or terse code, but frankly I've developed a form of comment-blindness, triggered by code like this:

/********************************************** * Copyright: Moneygrubbers, inc 1982-1984 * * ALL RIGHTS RESERVED * * System: Custom IEBGENER for CICS T1 * * Name: MyFunction * * Created: 1 Jan 1982 * * Author: asmith * * Purpose: Apply foo algorithm to bar data * * Returns: bptr - ptr to modified bah * * Mod: asmith * * Mod Purpose: bar is now baz * * Mod Date: 2 Jan 1982 * * Parameters: bar - ptr to bar * * Parameters: baz - stack copy of bar * * Known bugs: none * * Other comments: Hello, World! * * Re-written by bjones 1998 * * Code Status: UNREVIEWED * *********************************************/

(Exaggerated for dramatic effect)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-06-13 19:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.