Please enable JavaScript.
Coggle requires JavaScript to display documents.
Comments (Bad Comments (Mumbling
You add comments just because you feel…
Comments
Bad Comments
Mumbling
- You add comments just because you feel you should or because you think the is required
Redundant Comments
- Comments that are less informative than the code and it does not provide intent
Misleading Comments
- Comments that are inaccurate and could cause confusion to other programmers
Journal Comments
- Comments that is written every time they edit the code. This would be kind of a journal of every change that has ever been made.
Noise Comments
- Comments state the obvious and provide no new information
-
-
-
Closing Brace Comments
- Comments that are located closing braces, usually for locating through nested loops
-
-
Inobvious Connection
- Comments that do not show a clear connection between the code and itself
-
The proper use of comments is to make clear our failure to properly describe the purpose of the code
Inaccurate comments are worse than having no comments at all because they delude and mislead. You must trust on in the code. Only the code can truly tell you what it does
Explain Yourself in Code
- Instead of writing a comment, create a function that says the same thing as the comment
you want to write
Comments Do Not Make Up for Bad Code
- Instead of wasting your time writing the comments about the mess in your code, use that time to improve your code