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


当前回答

我最喜欢的评论是:

//the XML returned from this request is *mind-bogglingly* bad. Terrifyingly bad.
//a completed batch looks like this:
//<Batch>batchid=363777811 status=Done dateandtime=09/18/2007 09:53:10 PDT activateditems=335 numberofwarnings=0 itemsnotacivated=17 </Batch>
//and an incomplete batch like:
//<Batch>batchid=363778361 status=In Progress </Batch>
//so we'll just parse each item as a regex. Thanks Amazon.

Amazon实际上是这样返回XML的。

其他回答

我相信在JBoss的某个地方有一行写着

return null; //Not really null

我一直很喜欢这句话。

// TODO: Drive an ashen stake through the foul heart of this function.

这是一个糟糕的函数。直到今天我还在做噩梦。

# let's pretend we are free, for a while

在教室前面发现了这个。接下来是一个(天真的)实现ORM的尝试。我还是不明白他为什么这么写。

在LKM中:

/*
* Dear Richard Stallman,
*
* This one's for you.
*
* Sincerely,
* Me
*
*/
MODULE_LICENSE( "GPL" );

生产源代码:

// Remove this if you wanna be fired