How to Write a Comment in a Computer Programming Language
How to Write a Comment in a Computer Programming Language
When programming on a computer, sometimes it is necessary to leave notes or comments so that other developers may browse your code with ease. Whether it is an open source project or a proprietary project, comments are needed in order to coordinate with co-developers and possible future developers as well. Without comments, code would simply be unmaintainable.
Steps

Understand the purpose of commenting a computer program. Readability is the key thing here. When you look at a comment you should know that it is a comment and not a line of code. The comment should also be helpful not just to you, but to anyone else that might read the source code of your computer program.

Think of a short, simple way to get across your point. Comments don't need to be a work of art. They should be concise, neat, and straight to the point. This should not, however, discourage the use of multiple lines for a comment. The point is that the information needs to get across to the reader.

Write the comment using the appropriate syntax given by the programming language.

Ask yourself if the comment you've written is detailed enough. A comment should be able to tell someone looking at the source code what that part of the program actually does without having to compile it and run it. Does your comment accomplish this? Does it convey all the details?

What's your reaction?

Comments

https://filka.info/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!