K. Sabbak

Developer

language

Clean Code and Comments

March 02, 2018

I've always heard of the philosophy that comments aren't a great idea in code. I knew the reasons, but I didn't want to believe. Something about comments just really appeal to me. They're like a little secret message -- and who doesn't love secret messages? But in the face of Robert Martin's arguments from Clean Code: A Handbook of Agile Software Craftsmanship, I think I'm finally ready to cave.

The argument I have always heard for no comments is that code has to get updated but comments don't, which means they often are wrong. Of course, my brain immediately responds with "Well, not me. I will always update the comments". I know this is objectively false. So I grumble about it a little and try to avoid using them a bit more than I had. But not entirely. Because secret messages!

Read More

Tags: comments language clean-code