News for hackers. Stuff that matters.
Re:On navigating a large codebase by spinningslate on Sunday February 14, 2021 @05:20AM (#26131059)
my priority for comments is that they should answer "why?" and "why not?" questions. Why does the method/function do it this way? Why didn't it choose that other, perhaps more obvious route?

That's not necessary in every case. But it's true in a good number of them. The code alone can never tell you that - but it's often invaluable during evolution/refactoring.

Re:On navigating a large codebase by wiredfool on Sunday February 14, 2021 @08:45AM (#26132334)
Why does this code exist?

What are you working around?

What are the assumptions? What limitations?

If it's complicated enough that I'm only understanding it because of the context of the last week, we need the comments. Anything that can speed the reverse engineering in 6 months when it breaks is helpful, because then you can quickly decide that we got different input or if we missed an edge case or whatever.

Re:On navigating a large codebase by Pokepokalypse on Sunday February 14, 2021 @12:53PM (#26134433)
Yah, and what's gross is when your team-mates criticize you for leaving comments at all. Let alone a lengthy discussion on why.