comment


Also found in: Dictionary, Thesaurus, Legal, Acronyms, Idioms, Wikipedia.

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 ?
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.
The Google-owned site has now launched a new tool that makes comment management easier and essentially brings the old YouTube Inbox back with categories into areas for published comments, pending comments and those marked as spam.
Washington -- Facebook is revamping a platform designed to power the frequently unruly comments space on websites.
Any suspicious comment will be moved to the Spam tab and will not be displayed on the blog.
Wednesday night the board assured residents public comment is here to stay.
Like a blog, each paper posted on the site had a place for comments, though only scientists associated with a research facility, were permitted to post them.
But some residents say it would be a disservice to Burbank's residents to limit the public comment period.
The White House, however, was quick to condemn Robertson's comments regarding the Israeli prime minister.
The Board plans to implement the amendments as part of its review of Regulation Z and is publishing this second ANPR to reopen and extend the public comment period.
Then I added a comment (I'm relieved to learn I can permanently delete erasures).
In comments from several federal and state regulatory agencies this week, the EPA said the LMDC's plan for the buidling needs more safety measures.
Both EDs have a 75-day comment period and public hearings on the FV ED are scheduled for September 2.