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


当前回答

} catch (PartInitException pie) {
    // Mmm... pie

其他回答

Tweet tweet = (Tweet) tweets.get(i); // Poetic.
-- Beyond this point, there'll be dragons

我觉得更长的说法^^更能说明问题

/* 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版本参考指南中的声音功能)

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

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

这是肮脏的代码;)

一个奇怪而恰当的有趣错别字:

断言(0);//永远不要在这一点上犯错