Comment

What Does Comment Mean?

A comment is a special construct in a programming language that allows the program developer to mention additional information associated with the program. The main reason for including comments in programming languages is to improve the portability and maintainability of a code.

Advertisements

Techopedia Explains Comment

Often, software development teams work together on different software modules, which are inspected by testing engineers during the testing process. During the process of testing, the engineers have to be aware of the workings of a module. Hence, comments are included by the developer to explain the workings of a particular module by stating the valid types of inputs, the number of inputs, the algorithm used for processing in the internal module, the expected outputs and the error conditions that may be encountered during processing.

Comments also often provide information regarding the author of the content, the date and time it was developed and the date and time it was last modified. How much detail to include is a matter of subjectivity. Some developers are notorious for hating comments and view them as a waste of time. To others, comments are an absolute necessity. In theory, an organization should lay all its coding standards. Still, for whatever reason, anybody who has inherited code from a previous development team will tell you more times than not that the code does not have the commenting they would of liked to see.

Advertisements

Related Terms

Latest DevOps Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…