Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"I shouldn't have to read code to understand comments"

That's fair, but that's not universally agreed. Some say comment the "why" not the "what" because you can always read the code to understand the what. Also, code will likely be more correct than the comments if code is modified, and the comment isn't. And finally an entirely different school of thought is that you don't need comments if you name your functions right, breaking every few lines, the thing you would have otherwise commented on, into its own function with a good name.

I think all of these are good suggestions to some degree. I'm somewhere in between, leaning toward more comments to help the AI



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: