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


当前回答

我没有这个来源的副本,但我一直记得它:

//如果你想不明白,就不要读这篇文章

其他回答

//MailBody builders for two outgoing messages
StringBuilder hanz = new StringBuilder();
StringBuilder franz = new StringBuilder();

当我读到这篇文章时,我仍然会笑出声来……

    /* 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.
   */
// HACK ! COPY/PASTE this and look for another job
} catch (PartInitException pie) {
    // Mmm... pie

有一次,我问一个同事如何用我们的内部框架做一些事情(忘了具体是什么,一些晦涩的技术调用)。 他说“简单,看这里”,然后在他的编辑器中打开一个。java文件,在几页代码中间给我看了这个注释:

// HERE

我刚刚检查了一下,注释仍然在这个文件中:)