<computer 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);

(01 Jan 2007)

commencement, commensal, commensalism, commensal parasite < Prev | Next > comment, comment out, commerce

Bookmark with: icon icon icon icon iconword visualiser Go and visit our forums Community Forums

A critical or explanatory note written to discuss, support, or dispute an article or other presentation previously published. It may take the form of an article, letter, editorial, etc. It appears in publications under a variety of names: comment, commentary, editorial comment, viewpoint, etc.

(12 Dec 1998)

commensal, commensalism, commensal parasite, comment < Prev | Next > comment out, commerce, commercial at

Bookmark with: icon icon icon icon iconword visualiser Go and visit our forums Community Forums