Comment

Why Trust Techopedia

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

Margaret Rouse
Technology Specialist
Margaret Rouse
Technology Specialist

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.