http://qs321.pair.com?node_id=307613


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)