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


当前回答

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

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

其他回答

Get This hack!

在一行汇编代码中,在几页未注释的代码之后。

// fix for groupid > 9 
// if groupid ever gets to 100 everything will break (again)

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

.class {border:1px solid gold;} /*我可怜这个傻瓜*/

从谷歌代码项目:

# This job would be great if it wasn't for the fucking customers.

不是代码注释,而是SVN在同一个文件上提交注释:

第一次提交(在测试人员返回结果后,再进行数十次提交):

Squashed some IPR mod bugs. The were big and juicy ones, too.

2日提交:

Squashed some more mod bugs. Those are some nasty bugs, them mod bugs...

3rd:

Squashed some more mod bugs. They are like cockroaches: they'll live through a nuclear war.

4th:

Squashed some more John bugs. They too are like cockroaches: they appear anywhere John goes. Wait. That doesn't sound right.

5:

Same John bug. It didn't die, just played 'possum.

是的,我厌倦了"修复bug"