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


当前回答

 * ...and don't just declare it volatile and think you've solved
 * the problem. You young punks think you know what volatile
 * means... why in my day we had to cast it volatile uphill
 * both ways, and the code still didn't work! Whippersnappers...

其他回答

// GK Experimental

(GK是编码器的首字母缩写)

用来表示部分代码,实际上,是实验性的。:)

这是一个很好的标志,当你在调试过程中碰到它时,你可能会在接下来的几个小时里忙着修复黑客。;)

我的精选集:

// Thats the end of the While loop
// Clean up last row.  I really must program better than this.

// Note: You can't immediately tell if the line below works.

// Rounding - blech.  It's assumed that all .5s are rounded up.

// Sort out predictions first.  Seems like the right place for a prediction, 'first'.

// Let's interpret!

唐纳德·克努斯的另一个经典作品:

注意上面代码中的bug; 我只是证明了它是正确的,并没有尝试过。

我记不清了,大概是这样的:

Person p = new Person("John", "Doe", "male");
Collection women = new ArrayList();
women.insert(p.getTail());

这是肮脏的代码;)

在XSLT文件的头文件中:

DON'T TOUCH THIS SCRIPT -> XSLT is like arcane, black magic