你遇到过的源代码中最好的注释是什么?
当前回答
/**
* As Gregor Samsa awoke one morning from uneasy dreams he found himself
* transformed in his bed into a gigantic insect. He was lying on his hard,
* as it were armour plated, back, and if he lifted his head a little he
* could see his big, brown belly divided into stiff, arched segments, on
* top of which the bed quilt could hardly keep in position and was about
* to slide off completely. His numerous legs, which were pitifully thin
* compared to the rest of his bulk, waved helplessly before his eyes.
* "What has happened to me?", he thought. It was no dream....
*/
protected static String DEFAULT_TRANSLET_NAME = "GregorSamsa";
其他回答
// TODO: Delete
long long ago; /* in a galaxy far far away */
这是我最喜欢的评论。
/// I intend to do this as shittily as possible because there are many better products that will totally blow this out of the water
/// and we don't have them so whatever
在后面的文件中,我们有更多的乐趣
/// sidestep a bug in WCF (that we can't send types across)
/// or, depending on how you look at, this issue is a Feature
稍后再讲
if( where == null)//be nice
一些源代码中的德语注释,由机器或非常疲惫的人翻译+谷歌
; Rechnen ja ; have faith in yes
我猜原来的意思是“假设这里是真的”…但从那以后,我就把它当成了人生的咒语。
在一个著名的商业DOS电子表格应用程序中:
/* This comment was just added in order to check-in a file that was last
checked in by [Insert Programmer FirstName] "Back-to-the-Future" [Insert
Programmer LastName]. While testing for year 2000 problems, he accidentally
checked-in this file while his machine clock was set forward to the year 2000.
This meant that the source code was always newer than the object file and
compiled every time the code was built. I'm checking this file in again to
fix that. */