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


当前回答

我相信在JBoss的某个地方有一行写着

return null; //Not really null

我一直很喜欢这句话。

其他回答

我在重用我很久以前写的一个PHP类时发现了这一点。我仍然不记得那里有什么,我仍然发现它没有任何用处……我甚至不记得我写过那篇评论;所以当我找到它的时候,我真的笑出声来了。

try
{               
    // Some database logic
}
catch (Exception $ex)
{
    // sure, it looks silly and I honestly cant remember what code used to go here... but i swear i will
    // find a use for this code.... eventually....
    throw $ex;
}

一个承包商在申请一家英国银行。

// i don't know how this works but it does so i'll leave it here anyway

他还增加了BNP(英国极右翼政党)作为测试的虚拟客户之一…我们的顶头上司是亚裔。

// No women, no children... What movie???
// I have to find a better job

我经常看到这种情况:

// TODO make this work