Comments in Programming

Dont comment bad code - rewrite it

We use comments to compensate for our failure to express yourself in Code.


Whenever you find yourself in a position where you need to write a comment, think it through and see whether there isn’t some way to turn the tables and express yourself in code.


-Why Comments are bad
If you are a programmer you now that Code changes and evolves. Chunks of it move from here to there. Those chunks bifurcate and reproduce and come together again to form chimeras. Unfortunately, the comments don’t always follow them—can’t always follow them.
And all too often the comments get separated from the code they describe and become orphaned blurbs of ever decreasing accuracy


Why programmers use comment
We write a module and we know it is confusing and disorganized. We know it’s a mess. So we say to ourselves,


“Ooh, I’d better comment that!” No! You’d better clean it!


Explain Yourself in Code
There are certainly times when code makes

Or this?
> References : - Chapter 4, Clean code by Robert C Martin




Comments