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


当前回答

在一些非常蹩脚的vb代码(我知道这都是蹩脚的,但),我发现这是一个空的if控制块中的注释,它说:

If bFound Then
     'I love it when I write kick ass code like this
Else
  .
  .

其他回答

试着在谷歌代码搜索中输入你最喜欢的脏话,它会消磨掉许多无聊的时间。以下是我最喜欢的例子:

/* These magic numbers are fucking stupid. */

/* Dear free software world, do you NOW see we are fucking
   things up?! This is insane! */

/* We will NOT put a fucking timestamp in the header here. Every
   time you put it back, I will come in and take it out again. */

# However, this only works if there are MULTIPLE checkboxes!
# The fucking JS DOM *changes* based on one or multiple boxes!?!?!
# Damn damn damn I hate the JavaScript DOM so damn much!!!!!!

/* TODO: this is obviously not right ... this whole fucking module
   sucks anyway */

/* FIXME: please god, when will the hurting stop? Thus function is so
   fucking broken it's not even funny. */

我个人最喜欢的

 # code below replaces code above - any problems?
 # yeah, it doesn't fucking work.
// long live COM'n'Roll
public enum StatusCode
{
        //success codes
        S_OK                                            = 1,
        S_NONE                                          = 2,
        S_SQL_OPERATIONS_LISTS_EMPTY                    = 3,

        //error codes
        E_NO_MATCHING_END_FOUND                         = -1,
        E_SEQUENCE_NUMBER_NOT_FOUND_AT_BEGINNING        = -2,
        E_SEQUENCE_NUMBER_NOT_FOUND_AT_END              = -3,
        E_FORWARD_AND_BACKWARD_OPS_COUNT_DO_NOT_MATCH   = -4,
        E_FORWARD_AND_BACKWARD_IDS_DO_NOT_MATCH         = -5,
        E_IDS_DO_NOT_MATCH                              = -6
}

$you = live("free") or die("hard");

# To understand recursion, see the bottom of this file 

在文件的底部:

# To understand recursion, see the top of this file

我经常看到这种情况:

// TODO make this work