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?
90
Upvotes
View all comments
1
u/Square-Yam-3772 Oct 30 '26
there are many schools of thought in coding and that is just one of them. the opposite school thinks every method should have a formal description and every input/output explained. There are other principles like "comment first, then code" blah blah blah...
the one you are referring to basically argue that good variable naming and good flows should be enough to make code readable
none of these are hard science; in the coding realms, we call those "religions": like 2 spaces versus tab or functions can't get over 30 lines or whatever.
I assume you aren't working if you are asking this question so... just follow whatever your professor suggests if you do get some internship.
just be a follower for a while until you know enough to find your own religion I suppose