In the project/team I'm working the frequency of comments is a little low. One reason might be that it is not clear to the long-time devs what lines in the code really needs a comment (each part of the project has quite fixed devs).
To increase this we plan to let team members review the code and check in "requests for comments", which the main dev of that part should replace with useful comments.
- Do you think this could work?
- If "yes": what tags should we use to mark? (e.g. //TODO please comment)
- Can you think of alternatives for this process?
Edit: I appreciate your answers about best practice in commenting and writing code, and I completey agree. But my question targets the cases where refactoring is not an option (not wanting to change working code, not wanting to "accuse" main dev of producing code that needs refactoring,...) - so only more or better comments are an option (at least for this question).
// here, we're reticulating splines
I frequently writelog.trace("reticulating splines")
. Another alternative is unit tests. Instead of commenting// this should be really simple
one can create unit test for that