你遇到过的源代码中最好的注释是什么?
当前回答
首先,在一个大对象的更新的开始:
/*General note to all who tread in the <ObjectName>() code...
* The SetOriginals() method from the BaseEntity class should be called (and only called) right after the Get() method
* call as seen above. Calling the SetOriginals method elsewhere will result in bugs and all kinds of other nasty suprises.
*/
然后在大约200行逻辑之后更新对象:
//Attempt to explain this confusing mess of code:
//First time you save an actual absence this is what happens:
//0. The first save saves to the <TableName> table (among other things). (Fig. A)
//1. The <CalculationMethod> method is called next which inserts to the <OtherTableName> table.
//(This is the table that keeps track of credits to the case.) (Fig. B)
//2. So then you have to call <UpdateCalculations> to move the <TableName> records to the <ThirdTableName> table. (Fig. C)
//3. Then you go back and run calculations since you have the debits table (<ThirdTableName>) populated. (Fig D.)
//4. Then a final save to save the calculations back to the case. (Fig. E)
//Yeah, I know what you're thinking: this sucks. 10/01/07 XXX
开发商是对的……这太糟糕了!
其他回答
var something TBoolean; //Pickins
一个可怕的解码补丁(意大利语翻译):
/**
*@return the value
*@param key: the id of the list of instruments
*@PS this function is a violation of all the laws of the
*software engineering,
*commons sense, highway code
*and ONU decision about the coding.
That sh*t...
*/
// THE LOOP THAT DO EVERYTHING!!!!!!!
事实上,有一天我在一些代码上看到了这个,这些代码是在截止日期很急的时候写的。
//This was clearly written under duress
这是一个旧的IOCCC获奖条目,我不得不下载整个获奖档案——一个巨大的1.4 M——和grep的几个短语,我记得错了才找到它。
从语法上看,这可能不是注释。或许是这样。我还没想明白。它肯定没有注释分隔符,但也没有字符串分隔符。
C="Lint says "argument Manual isn't used." What's that
mean?";
没有价格来猜测棉绒的产量。
对于好奇的人来说,这个条目在这里。