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


当前回答

经典ASP:

'Is it worth it, let me work it'
'I put my thing down, flip it and reverse it'
'Ti esrever dna ti pilf, nwod gniht ym tup I'

NextIP = StrReverse(UserRecordset.Fields.Item(0))

其他回答

我刚刚完成了一个日志框架(使用Trace,为什么没有这样的存在我不知道)。我做了一个继承自TraceListener的方便基类。它覆盖了所有的TraceListener方法,并将它们路由到一个方法中——因此有很多文档注释:

// TODO: Need some codemonkey to doc comment this class.

一些来自Linux内核的代码:

/* Sun, you just can't beat me, you just can't.  Stop trying,
* give up.  I'm serious, I am going to kick the living shit
* out of you, game over, lights out.
*/

-

/* 2,191 lines of complete and utter shit coming up... */

-

#if 0 /* XXX No fucking way dude... */
// fix for groupid > 9 
// if groupid ever gets to 100 everything will break (again)

if (groupid < 10) {
groupid = "0" + groupid;
}

//休斯顿,我们有麻烦了

//If you're reading this, then my program is probably a success