你遇到过的源代码中最好的注释是什么?
当前回答
// repopulate, slight hax (or strong assumptions :P) below
其他回答
public static final void attachListener(Object listener) {
/* ======================= */
// This does nothing, continue searching
/* ======================= */
...
与听众一起痛苦!
我想我有过这样的经历:
if (case1) { // trivial
...
}
else { // we are screwed
/* fill in later */
}
好吧,我可能用了一个比搞砸更强烈的词
-- Change Log: Not needed. The code is perfect 'cause I wrote it.
-- If you change it, it will break.
我正在检查一些代码注释,以检查它们是否有意义,并看到上面的一行。
/* Please work */
我最喜欢的评论是:
//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的。