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


当前回答

/**
 * Happy Javadoc haiku:
 *
 * Without Javadoc
 * Builds break in Maven site stage
 * This fixes the build.
 */

其他回答

这似乎阻止了白痴搞砸我的代码…

// Autogenerated, do not edit. All changes will be undone.
virgin = 0;     /* you're not a virgin anymore, sweety */

不是代码注释,而是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"

try {
   doSomething();
} catch(err) {
   // Die quietly
   alert(err);
}

我不止一次使用过这个方法,当我对一个数学公式做了一些不明显的简化时,我不想记录:

//this formula is right, work out the math yourself if you don't believe me