News for hackers. Stuff that matters.
Re:Reducing technical debt by valuing comments as much as code by kazinator on Tuesday January 31, 2023 @09:45PM (#34605670)
I write GNU-ChangeLog-style commit messages which mention every function and other named entity touched, added or deleted, with details about why. Between that and the diff, you can figure out exactly what was done and why, matching the comment with specific code blocks.

I've never been disappointed when digging back in history to figure out why the heck something was done.

It would be a strawman of my position to say that I'm favoring zero comments. For instance, a /* fallthrough */ comment in a C switch statement cannot be in a commit comment, not the least reason for which being that compilers look that that nowadays.

Comments should be like road signs. I need a warning about a dangerous curve ahead, not a discussion of why it was built that way.

Re:Reducing technical debt by valuing comments as much as code by linuxftw on Wednesday February 01, 2023 @01:10PM (#34614828)
yeah, if you can do commits per function that would be fine. Most projects don't allow that, everyone squashes commits these days.
Re:Reducing technical debt by valuing comments as much as code by kazinator on Wednesday February 01, 2023 @01:36PM (#34615295)
* * *