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


(computer science)
An expression identifying or explaining one or more steps in a routine, which has no effect on execution of the routine.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.


(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);
This article is provided by FOLDOC - Free Online Dictionary of Computing (


Lines of documentation in program source code and batch file scripts. Comments, also called "remarks," are words or symbols that identify a line or a group of lines as text that is not to be compiled or executed.

Comment Quality
The bottom line is that most programmers hate to document, and the quality of the documentation ranges from the ridiculous to the sublime (rarely sublime). The quality of the comments goes a long way in determining the ease with which a program can be changed, not only by other programmers, but also by the original programmer. See obfuscator and comment out.

Sample Codes for Comments/Remarks
When several lines of comments are used, the start and stop symbols for multi-line comments eliminate having to enter a code on each line.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
some believe mass commenting is a sign of a well-functioning democracy,
"This year's comment volume dwarfed that and our analysis highlights the relative ease with which online commenting systems allow groups and individuals to mount large-scale campaigns for public policies.
(In comparison, with traditional commenting systems on medium-to-large sites, anywhere from 15 percent to 50 percent of comments need to be flagged by users)."
When I asked Gus why he wastes so much time and spirit commenting on our site, he replied, "It doesn't take much of my time at all.
The commenting tool becomes a social gathering software where commenters share their opinions, criticism, or extraneous information.
At the end of the day, there's no denying the fact that YouTube comments needed to be cleaned up and the commenting system required streamlining.
But no matter how teachers might portray their comments as "reader feedback" or "conversations" with students, most students acknowledge that in commenting on a paper, the teacher gets the floor--more like an orator who speaks to an audience than a conversation partner.
COMMENTING CENTRAL Miller explains that the editors at Nature wondered whether this boom in openness might benefit peer review.
* Letter to Canada's Department of Finance Commenting on Legislative Proposals Relating to Treatment of Restrictive Covenants, page 144
Overall, in commenting on legislation and regulations, the Tax Division will continue to express its conviction that the tax system should be simpler and fairer.