Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Nevoic1997yI know this isn't a serious meme, but I do want to point out that if this thought crosses anyone's mind, the code needs to be refactored.
You shouldn't be relying on comments to improve readability at all, let alone rely on the comments to make the code usable. -
I agree with you. @Nevoic I see so many times comments like
<!-- header --!>
<header>...
But then when they write code that's actually complex... No comment lol. So many times they don't even use comments properly anyway. -
Nevoic1997yYeah, I've been in scenarios with old complex code a number of times, and it's generally helpful in those scenarios to have comments.
But, I think if someone looks at code and says "this is complicated and needs comments", I would recommend instead "this is complicated and needs refactoring", because no matter the comments, people need to be able to read and understand the code.
Comments have mislead me before because they were out of date, or over simplified what's happening and caused me to look over something and miss a bug for some period of time.
Code can have a lot of side effects especially when it's heavily coupled and messy. Relying on comments in those scenarios clears up the code while also obscuring some of the details, and can ultimately provide false information.
Relying on the code, however, always works.
Related Rants
Lol true
joke/meme
comments