你遇到过的源代码中最好的注释是什么?
当前回答
目前为止最好的一个:
"This code makes baby Jesus very sad!".
它像这样引用一个String的初始化:
String blankSpaces=" "+ //100 whitespaces
" "+ //200 Whitespaces
...
" " //100 whitespaces
你懂的。
其他回答
long john; // silver
// No women, no children... What movie???
#define SHIT_HAPPENED (BASE + 1) /* generic shit happened */
//todo: never to be implemented
我曾经想出了一个我认为很优雅的解决方案来解决一个特别棘手的问题,现在回想起来,这有点令人费解,并且大量使用了宏编程。多年以后,我从一个维护程序员那里发现了这条评论
/* Description: The Total Perspective Vortex derives its picture of the whole Universe on the principle of extrapolated matter analyses. To explain - since every piece of matter in the Universe is in some way affected by every other piece of matter in the Universe, it is in theory possible to extrapolate the whole of creation - every sun, every planet, their orbits, their composition and their economic and social history from, say, one small Macro. The man who invented the Total Perspective Vortex did so basically in order to annoy the IT department. Steve Weet - for that was his name - was a dreamer, a thinker, a speculative philosopher or, as some would have it, a slacker. And they would nag him incessantly about the utterly inordinate amount of time he spent staring out into space, or mulling over the mechanics of Chelsea FC, or doing spectrographic analyses of macros. "Have some sense of proportion!" they would say, sometimes as often as thirty-eight times in a single day. And so he built the Total Perspective Vortex - just to show them. And into one end he plugged the whole of reality as extrapolated from one macro, and into the other end he plugged the IT department: so that when he turned it on they saw in one instant the whole infinity of creation and theirselves in relation to it. To Steve Weet's horror, the shock completely annihilated ' their brains; but to his satisfaction he realized that he had proved conclusively that if life is going to exist in a Universe of this size, then the one thing it cannot afford to have is a sense of proportion. */