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


当前回答

// The hackiest hack that ever did hack

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

其他回答

//The following code is commented out
//(a load of commented out code followed)

Dennis M Ritchie在这里有一个关于一些古老UNIX注释的页面

一个奇怪而恰当的有趣错别字:

断言(0);//永远不要在这一点上犯错

// TODO: Implement this function!

来自Apache Xalan源代码:

/**
 * As Gregor Samsa awoke one morning from uneasy dreams he found himself
 * transformed in his bed into a gigantic insect. He was lying on his hard,
 * as it were armour plated, back, and if he lifted his head a little he
 * could see his big, brown belly divided into stiff, arched segments, on
 * top of which the bed quilt could hardly keep in position and was about
 * to slide off completely. His numerous legs, which were pitifully thin
 * compared to the rest of his bulk, waved helplessly before his eyes.
 * "What has happened to me?", he thought. It was no dream....
 */
protected static String DEFAULT_TRANSLET_NAME = "GregorSamsa";

进一步阅读The Daily WTF。