Caveat implementor
When I started work, a senior coder on my team explained that you should always "code and comment as if your code will be maintained by a psychopath who knows where you live". It was a good rule to live by.
Sometimes I'd return to the scene of the crime (a customer that I'd written something for five years earlier) and be responsible to maintain or update things. I quickly learned that my memory would not save me, so I'd damned well better document my assumptions.
I've lost count of the number of developers who told me I was being ridiculous, and we didn't need to document things to that level, because they were obvious. Years later, those same developers also invariably ended up spending days, or weeks, trying to reverse engineer their own undocumented code. They often not only had no idea what it was doing, they had no idea what it was supposed to be doing, because they didn't remember, it was polymorphic, multiply inherited, reflected, replicated, and god knows what else, and the only comment would be something like "// I am not sure if we need this, but too scared to delete.".
Here's a collection of comments I've found in production code bases over the years:
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
/* This is O(scary), but seems quick enough in practice. */
//Dear future me. Please forgive me.
//I can't even begin to express how sorry I am.
// TODO: Fix this. Fix what?
// If you're reading this, that means you have been put in charge of my previous project.
// I am so, so sorry for you. God speed.
// no comments for you
// it was hard to write
// so it should be hard to read
And, my favourite, a 13,000 line C++ source file that was rejected by a checkin validation script because there were no header comments to any of the hundred or so functions in the file. The code added the following header comment to every one of the hundreds of functions to get it past the validation script:
// As you can see, I comment the code