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


当前回答

这是我们在大学宿舍使用的自定义DHCP服务器,根据它们是否注册/安装补丁和防病毒,将计算机放入“干净”或“脏”IP地址池:

public boolean getDirty (String MAC) // not as fun as it sounds

其他回答

options.BatchSize = 300; //Madness? THIS IS SPARTA!
//  If you delete the credits, I will fucking kill you.

在joomla模块中找到。

在一个巨大的800行'switch'语句中,在中间的某处:

// Joe is sorry

几百行之后……

// Harry is sorry too

我一直很喜欢Paul DiLascia在他的文件头中写的:

// If this code works, it was written by Paul DiLascia. If not, I don't know
// who wrote it
// The freshest corpse at the back please.
m_DeadCharacters.push_back( std::make_pair(character, 0.0f) );
// Get rid of the rotting surplus
while( m_DeadCharacters.size() > 3 )
    m_DeadCharacters.pop_front();