你遇到过的源代码中最好的注释是什么?
当前回答
/*
* You may think you know what the following code does.
* But you dont. Trust me.
* Fiddle with it, and youll spend many a sleepless
* night cursing the moment you thought youd be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/
其他回答
经典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))
这在我自己的代码中出现过几次。显然我摸了不止一次。
// TODO: Fix this. Fix what?
我刚刚完成了一个日志框架(使用Trace,为什么没有这样的存在我不知道)。我做了一个继承自TraceListener的方便基类。它覆盖了所有的TraceListener方法,并将它们路由到一个方法中——因此有很多文档注释:
// TODO: Need some codemonkey to doc comment this class.
//uncomment the following line if the program manager changes her mind again this week
'I hate nested regions and will delete them along with any code found in them.