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


当前回答

<!-- THIS IS THE MAIN CONFIGURATION FILE FOR THE ENTIRE BLOODY DIRECTORY    -->
<!--    WHATEVER YOU DO, DO NOT EDIT THIS FILE WITHOUT TALKING TO ME FIRST  -->
<!--                                I'M SERIOUS                             -->
<!-- (scroll down) -->

其他回答

// Oh crap, i think i'm gonna yack

随后不久又有:

// TODO: end this lunacy

在OLTP数据库事务的主要触发代码中找到:

-- This line negates the @inverseqty, which is the
-- negative of the @insertedquantity.  This works through the
-- magic of the trigger.  In fact, this code is a lot like
-- the bermuda triangle!
@negquantity = -1 * @inverseqty

在一组相当长且复杂的while循环和if块的末尾,开发人员插入了最后的注释:

else
{
    // wobbly wilson said this would *never* happen!!
}

机智和讽刺的简洁混合:)

/* Here I sit, Joe broken hearted, came to do some sh*t, but only just started. */

关于一些繁重的正则表达式输入验证。

# absolutely foul heuristic code.
# ..it's dirty, but you want it.

and:

# VERY USEFUL DEBUGGING AID, for when the above all goes pearshaped: