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
-
hjk10157311yAh well high signal low noise is a thing.
I find that I comment way less since I joined this company too. Part of it is because I'm Go you tend to be obvious and not hide magic. Part is because it is discouraged a bit by colleagues.
Still if there is ambiguity, Some weird edge case or exposed API's a single line of comment is warranted and often super helpful in IDE -
@hjk101 same. I do comment, but mainly for critical things that are a bit tricky. To give the code credit it does have very descriptive non-generic naming. So most of the time I can figure out the purpose pretty fast.
-
Comments are stupid and are out of date as soon as you write them down.
Good! I feel your anger take your weapon and strike me down and your journey to the dark side will be complete…. -
Writing comments in your code "just because" is such an anti pattern!
Your code should be expressive enough to explain what it does and why it does what it does.
As a last resort and failing the above, leave a helpful comment but only as a last resort.
Comments go stale, and always end up being wrong, or worse, misleading
Also tests > comments -
Use good names and only comment when the logic is complicated or when the change was demanded of you and you know it will cause problems later.
-
drewbinsky1213dIt may take some time to change the culture of your team, but it's worth the effort. Well-commented code is easier to understand, maintain, and debug. In the long run, it will save you and your team time and frustration.
https://drift-hunters.org
Related Rants
I had high ideals when I started working here. The entire code base was practically devoid of comments. Its been 5 years and it is still practically devoid of comments. I have become like them...
joke/meme
comment
dark side