comment

(redirected from commented)
Also found in: Dictionary, Thesaurus, Legal, Idioms.

comment

[′käm‚ent]
(computer science)
An expression identifying or explaining one or more steps in a routine, which has no effect on execution of the routine.

comment

(programming)
(Or "remark") Explanatory text embedded in program source (or less often data) intended to help human readers understand it.

Code completely without comments is often hard to read, but code with too many comments is also bad, especially if the comments are not kept up-to-date with changes to the code. Too much commenting may mean that the code is over-complicated. A good rule is to comment everything that needs it but write code that doesn't need much of it. Comments that explain __why__ something is done and how the code relates to its environment are useful.

A particularly irksome form of over-commenting explains exactly what each statement does, even when it is obvious to any reasonably competant programmer, e.g.

/* Open the input file */ infd = open(input_file, O_RDONLY);
References in periodicals archive ?
Treasury Department on the cost sharing rules, and commented to the European Union on issues relating to the most recent EU enlargement.
If you think about the fact," continued Levinson, "the only other public figure who's commented about Sharon's dying being appropriate in any way is the president of Iran, who's a fundamentalist nut case.
Forest Service officials) stated that no one commented on the fact that Whitney, Placerita and Elsmere are designated riparian wetland areas,'' said Santa Clarita Councilwoman Marsha McLean.
Five participants commented on a need for more information on inclusion.
In a jointly issued letter on March 25, 2003, the AICPA, in conjunction with the American Bar Association and the Tax Executives Institute, commented to Treasury Secretary Snow on the tax simplification aspects of the Administration's 2004 Budget Proposals.
On January 31, CA commented on the draft working principles for risk analysis.
Forty-six of the Choice reviews commented on this aspect of databases at some length, often providing detailed discussions of the contents of the database; two reviews in effect relied on the title for the only information about coverage.
If Smith is not hired by Firm 2, Firm 1 may find itself having to defend the dismissal in a defamation suit without having commented on the dismissal.