Comments? What comments?

Probably everyone knows the famous saying “better no comment than a wrong one”, or one of its variations. And it’s true: it’s extremely confusing reading what a piece of software is supposed do and find out it does something different… Of course, it happens to all of us. You wrote something once, including informative comments. Then you refactor it, then refactor some more, and in having to deal with all the complexities of getting it to work, forget to update the comments.

Here are some best practices for commenting: