你遇到过的源代码中最好的注释是什么?
当前回答
/**
* Not even your mum thinks you're special if you call this method
*/
onlyYourMumThinksYoureSpecialIfYouCallThisMethod() {...}
其他回答
/* Emits a 7-Hz tone for 10 seconds.
True story: 7 Hz is the resonant frequency of a
chicken's skull cavity. This was determined
empirically in Australia, where a new factory
generating 7-Hz tones was located too close to a
chicken ranch: When the factory started up, all the
chickens died.
Your PC may not be able to emit a 7-Hz tone. */
main()
{
sound(7);
delay(10000);
nosound();
}
(Turbo C 2.0版本参考指南中的声音功能)
我猜它被病毒式传播了,我在一个守护进程(Linux)中发现了以下防止OOM杀手选择它:
/*
* Don't OOM me, bro!
*/
这紧跟在mlockall()之后,以防止进程交换,注释如下:
/*
* Don't swap me, bro!
*/
当我还在路透社工作的时候,我们的一个feed处理人员发表了一条评论,让一些人认为万能的上帝在帮助我们……
// Jesus told me to skip to the end of the message here
后来我们发现有一个拉丁美洲的联系人叫耶稣(HeyZus)。
THIS PROGRAM HAS CODE THAT DOES NOT MEET STANDARDS
这个评论几乎出现在我们这里的每一个节目中....
/**
* Always returns true.
*/
public boolean isAvailable() {
return false;
}
永远不要依赖评论……