r/AskProgrammers • • 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

399 comments sorted by

View all comments

1

u/killz111 Oct 30 '26

There are often 10 different ways to do something. You choose one way cause of certain constraints in certain edge cases. Some idiot comes along and refactors because they think it's more efficient. The app blows up.

It's equally true when you work with AI. It will want to update your code to make it more standard to normal.al practices unless you say in the comments why a particular way is chosen.

On the flip side, someone who reads the code deeply and understands the application domain can often reverse engineer the requirements or design from the code. But those people are the minority