Live data from Hacker News

What is the best comment in source code you have ever encountered?

stackoverflow.com

11–20 of 50 posts

Re: What is the best comment in source code you have ever encountered?

#12

    char  program [1];/* Unwarranted chumminess with compiler. */
First by Dennis Ritchie in his regular expression implementation, and then subsequently copied with the comment intact into all other regular expression implementations ever written.

Re: What is the best comment in source code you have ever encountered?

#17
I hate the way SO only remembers you for a week or two, so when you return, you have to login, going to a separate screen and so on. Why do they have to make it so hard? What's the advantage in forcing frequent logins?

Yeah, I know I should find some other StackExchange site, go there, create an account there, login there, and post this complaint there - but you know, that's just more of the same problem.

Re: What is the best comment in source code you have ever encountered?

#20
There are lost of great ones. I especially liked this practical comment:

From the SO answer:

This seems to stop morons from messing my code...

// Autogenerated, do not edit. All changes will be undone.

http://stackoverflow.com/questions/184618/what-is-the-best-c...

Post reply on HN