This is review of the 4th chapter from the book-”Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin.
In a true clean code- comments have little place. You comment your code to explain what the code is doing. But if your code is well written in the first place- you will have little need to write any comments at all.
In this chapter- Robert mostly strikes back at the practise of writing comments to compensate for lack of clarity in the code. And other forms of bad comments like those which cause noise by plainly repeating what the code says. And the dangerous comments like the ones which are not in synch with the code any longer and then my favourite- comments used to strike out pieces of code.
He however does recognize some “Good Comments” like legal notices ,explanation of intent e.g. why the method is marked as synchronized , TODO comments
For other chapters- please see this post.


Pingback: Book Review: Clean Code: A Handbook of Agile Software Craftsmanship | Technology Cafe