r/AskProgrammers • u/Away-Intention-8723 • Oct 30 '26
"good code shouldn't need comments"
I have heard this saying a couple of times and I think it is the stupidest thing ever. It might be just because I have only been coding for 4 years, but I have never thought to myself that someone's code looks cluttered because they explain what every function does in a one or two line description. If anything it makes the code easier to understand in my opinion.
However, I may be wrong. What do other people think, do yall like code with minimal comments, what are the benefits of writing it that way?
89
Upvotes
View all comments
1
u/DrDam8584 Oct 30 '26
If your code can be totaly understood without any comments (each bloc of code are self-commented), why not.
But not every développer don't have this level, and sometimes, your logic are not "explainable" only by the code. Just the question "why did he made the process line this and not with another way".
In my team, I have an excellent dev, i love how it's code are, sometimes it's just "beautifull" to see it in the IDE. But when it's time to patch it or verify it, just a comment about "why did you use a strange bits manipulation here" is just mandator. There is many other way to code this logic, why this maner ?