There’s a fascinating look at the Win2k source code comments over at Kuro5hin today. I’ve written plenty of source code (only several thousand lines as opposed to tens of millions) but I’ve never commented my source code like they have. I guess I just operate in a very different corporate culture than Microsoft’s.
My comments amount to explaining why I made choices I did, how a particular section works, and the purpose of different areas. They are at times humorous, mostly sterile, and never profane. I always assume that my co-workers are going to be reading them and that my boss might see it someday. I stay away from the redundant mode of commenting and try always to craft self-documenting code.