News for hackers. Stuff that matters.
Re:Why Not Comments by cesaref on Wednesday September 11, 2024 @05:29AM (#41509666)
Junior programmers tend to either document nothing, or document everything. With experience you realise that you just want to document the unusual stuff, and as you get more experienced, you realise there is less and less unusual stuff, so the amount of comments drop down.

So, less comments wins out, but faced with a code base without comments you have to inspect it to tell the difference between a beautifully crafted piece of brilliance or a totally flaky codebase written by a bunch of newbie hacks.

Re:Why Not Comments by lawn on Wednesday September 11, 2024 @07:14AM (#41510219)
> and as you get more experienced, you realise there is less and less unusual stuff, so the amount of comments drop down.

This is a common experience when I use a new language or framework. At the start I comment a lot of things because I think it's useful for future me, but as I learn more I realize that many of the comments are redundant so I end up removing them.

Re:Why Not Comments by andoando on Wednesday September 11, 2024 @09:53AM (#41511414)
You have to consider who the comments are for. Senior engineers comments are more useful for senior engineers, but the junior comments will be more useful for junior engineers.
Re:Why Not Comments by seanw444 on Wednesday September 11, 2024 @10:09AM (#41511563)
I don't know. Senior engineers may understand the point of the code already, and "why it's not written a different way." The comment could be explaining to the less-experienced devs why they shouldn't waste time on another intuitive-at-first-glance approach.