@falemagn
Ok, just so we're clear I agree with pretty much every point you've made.
The misunderstanding comes from the line:
The only things that require comments are algorithms, but the more self-documenting code you are able to write, the better.
Which in my haste this morning I totally missed. I'd personally extend that to include classes, structures, the usage of templates and a few other bits n' pieces that trip people over.
The idea of self commenting code is good, and all your points seemed valid, but having helped people through very well "
self documented" code I still prefer to place comments to at least give them a secondary perspective. I also remember being a junior coder lost in "self documented" code and cursing the black heart of whoever wrote it for NOT leaving comments! So usually before a complex method I'll give a few lines description of the purpose of that method, the expected ranges and/or condition of it's inputs and expected outputs. It just helps people see what you're intention was.
I'm currently working on a project that has been outsourced to my company. The only comments in this code base are around equations in the physics library. Even though I've been doing this for a good 11 years now an undocumented interface is merely a hassle, but to someone else it's a quagmire that hinders development and can encourage lazy development practices.
Whilst C is a very precise language it isn't most of our coders "first" language. Over here that's English and so when people read my beautiful code :-D I like to tell them my purpose in writing it as well...
... plus comments give Babelfish something to work with, there's nothing worse than receiving a code base entirely with Japanese comments, variable and function names :crazy:
Andy