Hacker News new | ask | show | jobs
by almet 1074 days ago
I'm not sure the ratio of comments to LoC is a sign of good quality code.

Too many comments might actually be a bad thing. It's more lines to maintain, and sometimes the comments just tell what the code is doing where there is no need to.

1 comments

I find that comments are most valuable when onboarding/understanding an unfamiliar code base. Comments composed of a little bit of “what” some “where” and a lot of “why” seems best for this scenario.