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


当前回答

//too much log will kill you

这个评论是我自己写的,当降低一些日志的优先级时,否则会写数百MB的垃圾,严重削弱应用程序的性能。

其他回答

// I know the line below is wrong, but it came that way from our IP vendor, and 
// the driver won't work if you "fix" it. I've had to revert this change 4 times
// now. Leave it alone, or I will hunt you down and hurt you
if (r = 0) {
    /* bunch of code here */
}
else
{
   /* even more code here */
}
Repeat
    ...
Until (JesusChristsReturn) ' Not sure

当被问及什么是“最好的评论”时,我们的回答都是我们能找到的最糟糕的评论,这充分说明了我们的职业……

在一些非常蹩脚的vb代码(我知道这都是蹩脚的,但),我发现这是一个空的if控制块中的注释,它说:

If bFound Then
     'I love it when I write kick ass code like this
Else
  .
  .

在LKM中:

/*
* Dear Richard Stallman,
*
* This one's for you.
*
* Sincerely,
* Me
*
*/
MODULE_LICENSE( "GPL" );