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


当前回答

//休斯顿,我们有麻烦了

其他回答

我最喜欢的评论是我的一个同性恋朋友说的。他喜欢用VB标记他所有的TODO注释。净,

'TODO: Matt Damon

有时会提供额外的信息,但通常不是这样。

从谷歌代码项目:

# This job would be great if it wasn't for the fucking customers.
[onload_1;block=begin;when 1=0]

Some of the techinques in this template are rather obscure, just trust me, they need to be there.
OTOH a better sollution would be to create a few seperate templates and pick one in the php-script...

[onload_1;block=end]
{
This is a gathering place for all unit tests.
Create a TUnitTestWrapper, then call "RunAllUnitTests".

This class will create an instance of each thing to be tested, and call each of
their unit tests.

It does not really do any testing on it's own; it just gives a common place from
which to call everyone else's tests.

This way, one day, we can automate our testing with each build. [Cue laughter]
}
// human madable inconvenient. Way too sucks.

我仍然没有完全理解它的含义,但我发现它对于许多代码来说是非常正确的。