DEV Community

Discussion on: The ONE book every developer MUST read!

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

One of them is that they tend to get out of sync over time and they can state falsehoods about the ever changing code base, which unnecessarily adds to confusion instead of aiding in understanding what's going on.

That's a failure on the part of the programmer, not of comments. The exact same can be said of variable and function names, but we don't condemn those.

Comments are often neglected when code changes.

Only if you let them.

Comments are also often abused by developers by not explaining the intent, but by simply rephrasing or describing what is literally going on...

Yes, but even my commenting standard condemns that. Just because there is a wrong way to comment doesn't mean there is not a right way.

...that they are rarely ever necessary once all other steps have been taken into account and implemented for writing clean code.

I could bore you with an entire article series on real-world scenarios where this is not true. The rest of clean code does not preclude actual intent commenting.

The main takeaway from that chapter about comments, IMO, is that comments should not make up for bad code.

I absolutely agree. Comments have their own unique role, and fixing code ain't it.

But I think Martin tries to strongly encourage us to avoid them and he implies that if the need arises for writing a comment, then something probably went wrong.

And again, that's completely dismissing their actual use. I'm advocating for using comments in a capacity that I have never seen even the best code properly fill. And I've seen a lot of code.

"Clean Code" raises multiple excellent points that stem from decades of experience.

I'm sure it does, but even the best material wrapped in unapproachable egotism is still unapproachable egotism. I don't take issues with the content, I take issues with the author.

I don't think it's fair to dismiss the entire book and Martin's contributions as a whole based on a single quote you happen to disagree with.

Oh, I'm not. It's one example. I've read much of Robert Martin's writing, and it nearly always carries his egotism and his inability to distinguish between his opinion and objective reality.

There is a lot of really solid advise and insight in it and I highly recommend it to anyone.

There's a lot of really solid advice and insight in it....and I highly recommend anyone find a less egotistic teacher than Robert Martin to educate them; it is not wise to have to pick out the good advice from the overinflated opinions, when they are portrayed indistinguishably from each other.

Unfortunately, I've run smack into the attitude of "This Always Works, Because Uncle Bob Says" as a coding mentor and manager. It's entirely his own fault, given his predilection to "ALWAYS" and "NEVER" pronouncements, even if he makes a half-hearted attempt at qualifying them.

Just my two cents. I will never be able to respect Robert Martin, not because his ideas are all bad, but because his attitude is contemptible.

Some comments have been hidden by the post's author - find out more