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


当前回答

javascript函数的第一行:

// this part is more difficult

WTF?

其他回答

// haack, phil haack

and:

/* hack, hack, hack, hack, hack hack, hack, hack
 * hackity hack, oh wonderful hacks
 * wonderful hacks, oh wonderful hack, hack, hack
 * hack hack hack... and spam 
 */

编辑:刚刚在我的一些代码中发现了这个(项目希望保持匿名):

// yikes, we need to:
/*
 *       o
 *      -|-     < US CROSSING PLATFORM
 *       |\ 
 ************************************************
 *       |          ^ PLATFORM           |
 *       |                           T   |
 *       |                      TROLL^   |
 */
// right now:
/*
 *   o ./_  | 
 *  -|-[]\  |  (_'_) () (\) | ) \|/ (S) < WALL
 *   |\     |    ^ FRIENDLY MESSAGE FROM YOUR FRIENDS AT MICROSOFT
 *  ***********************************************
 *        | ^PLATFORM                       |
 *      ^ SPRAY CAN (IN HAND)
 */
public static class DefaultFonts
{
    public static string SansSerifPath
    {
        get { return @"C:\Windows\Fonts\arial.ttf"; }
    }
    public static string SerifPath
    {
        get { return @"C:\Windows\Fonts\times.ttf"; }
    }
    public static string MonospacePath
    {
        get { return @"C:\Windows\Fonts\courier.ttf"; }
    }
}

我好喜欢双关语。

/*

 ____________________
/                    \
| Jean-Michel Bechet |
| 2002-2009          |
\___  _______________/
    |/
 (o_
 //\
 V_/_


*/
double t = 0.0; /* that's generally my opinion of the diner, too. */
// 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();
<!-- Here it is -->

没有其他评论了。直到今天我都不知道“它”是什么。