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


当前回答

来自sendmail配置文件。一页又一页看起来就像线条噪音。我发现了这块宝石。

# insert this handy debugging line wherever you have problems
#R$*                $:$>99$1

其他回答

/**
 * Happy Javadoc haiku:
 *
 * Without Javadoc
 * Builds break in Maven site stage
 * This fixes the build.
 */

在一个著名的商业DOS电子表格应用程序中:

/* This comment was just added in order to check-in a file that was last 
checked in by [Insert Programmer FirstName] "Back-to-the-Future" [Insert 
Programmer LastName]. While testing for year 2000 problems, he accidentally 
checked-in this file while his machine clock was set forward to the year 2000. 
This meant that the source code was always newer than the object file and 
compiled every time the code was built. I'm checking this file in again to 
fix that. */

顶部的:靠近单位顶部的:

// Oh what a tangled web we weave
// When first we practice to deceive
// ASTA
// I don't know why I need this, but it stops the people being upside-down

x = -x;

我经常看到这种情况:

// TODO make this work