你遇到过的源代码中最好的注释是什么?


当前回答

/* Here I sit, Joe broken hearted, came to do some sh*t, but only just started. */

关于一些繁重的正则表达式输入验证。

其他回答

我猜它被病毒式传播了,我在一个守护进程(Linux)中发现了以下防止OOM杀手选择它:

/*
 * Don't OOM me, bro!
 */

这紧跟在mlockall()之后,以防止进程交换,注释如下:

/*
 * Don't swap me, bro!
 */

好吧,这是我刚刚提到的一个问题:

/* Every time I re-visit this function, I feel like
 * I need to take a shower.
 *
 * Don't get too used to this function, its days are
 * numbered.
 */

有人可以创建像greatcodecomments.com这样的网站,然后赚点钱。然而,那个人不是我。

我经常发现这个

// fix it!
catch
{     
    // you’re fucked
    // write out the file somewhere and start screaming “Connection down! Connection down!”
}

我最近看到了这个:

//你刚刚输了比赛

如果你不知道游戏是什么: http://en.wikipedia.org/wiki/The_Game_ (mind_game) (这很傻,但在某种程度上很有趣)