Quote Originally Posted by pitfiend View Post
Don't feel like an alien, it happens to many programmers, myself included.
It happens to me too. I usually put comments after I'm certain code is doing what is supposed to do.

Quote Originally Posted by pitfiend View Post
But well writen code is a good documentation in itself if you name your functions/procedures and types/const/variables/classes/properties with meaning names.
Yeah, about that... I'm not big fan of "self documenting code". I had many times read code that was supposed to be "self documenting one" but wasn't easy to grasp (though easier than if variables were called "Variable1","Variable2", etc. and functions "Function1","Function2",...). And it was both Pascal and other language code (which includes so easy, at least for me, languages like C# or Java).

In my opinion nothing will help more than properly documented code. Even comments like "this function is supposed to do..." before function body are good.