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


当前回答

//If only humans could leave things be.

//Please do not edit this code, 
//if you do you wont go to jail, you wont go directly to jail, 
//you wont pass go, you wont collect 200 dollars

其他回答

/**
 * Always returns true.
 */
public boolean isAvailable() {
    return false;
}

永远不要依赖评论……

$this->getSelect()->where ('main_table.product_id = -1'); // Mom, Dad... sorry
// Any maintenance developer who can't quote entire Monty Python
// movies from memory has no business being a developer. 
const string LancelotsFavoriteColor = "$0204FB"
// TODO - Comment 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。