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


当前回答

// The hackiest hack that ever did hack

它在WordPress博客引擎(wp-admin/includes/user.php -如果有人真的想看黑客攻击本身)。

其他回答

从技术上讲,这不是一个评论,而是在凌晨2点左右编写的代码:

consent = False

... 该变量永远不会再次使用,并且出现在套接字的监听循环的开始。

    /* Mark: If there's one thing you learn from this code, it is this...
   Never, ever fly Air France.  Their customer service is absolutely
   the worst.  I've never heard the words "That's not my problem" as 
   many times as I have from their staff -- It should, without doubt
   be their corporate motto if it isn't already.  Don't bother giving 
   them business because you're just a pain in their side and they
   will be sure to let you know the first time you speak to them.

   If you ever want to make me happy just tell me that you, too, will
   never fly Air France again either (in spite of their excellent
   cuisine). 

   Update by oej: The merger with KLM has transferred this
   behaviour to KLM as well. 
   Don't bother giving them business either...

   Only if you want to travel randomly without luggage, you
   might pick either of them.
   */

在被迫为贫血域对象编写单元测试时,这些对象不过是getter和setter的包(我也是被迫写的):

// zzzzZZZZzzzz....

来自c#中的单元测试类:

#region quis custodiet ipsos custodes?

[Fact]
public void TestPositive()
{
    Assert.Equal(4, 2 + 2);
}

[Fact]
public void TestNegative()
{
    Assert.Equal(5, 2 + 2);
}

#endregion
//ALL YOUR BASE ARE BELONG TO US

...这让我的老板以为有人黑进了系统。他不知道这个笑话。