I try to write informative comments. That said, 99% of the comments I see are
* Useless, like "locks the mutex" before a mutex.lock().
* Contrary to the code, like "This parameter contains the proc name without the instance" and then the parameter does contain the instance.
* Dubious, like it's not obvious what the comment means nor if what you are doing follows the comment or not.
Worst thing is when the code and the comment contradict and there's no good reason to trust one over the other in what the code should do (never go to sea with two chronometers).
I suppose it depends on the codebase you are working on. If it's your own code the likelihood of you agreeing with the comment increases, ofc.
* Useless, like "locks the mutex" before a mutex.lock().
* Contrary to the code, like "This parameter contains the proc name without the instance" and then the parameter does contain the instance.
* Dubious, like it's not obvious what the comment means nor if what you are doing follows the comment or not.
Worst thing is when the code and the comment contradict and there's no good reason to trust one over the other in what the code should do (never go to sea with two chronometers).
I suppose it depends on the codebase you are working on. If it's your own code the likelihood of you agreeing with the comment increases, ofc.