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


当前回答

来自一个显然在看巨蟒剧团的小伙子:

> //现在,for something完全 > // different: 类theLarch {

其他回答

# dont question, i just felt like throwing some globals in
# this is actually quite pointless as youll soon see

稍后在代码中

#draw the circles (complicated)...dont question

更晚…

# complicated process of drawing the circles in a
# somewhat symmetrical, 3-d pattern
# dont question again

甚至以后……

# will determine if user clicks on die
# i determined these values...dont worry about them

所有bug由David S. Miller添加

virgin = 0;     /* you're not a virgin anymore, sweety */
// I know the line below is wrong, but it came that way from our IP vendor, and 
// the driver won't work if you "fix" it. I've had to revert this change 4 times
// now. Leave it alone, or I will hunt you down and hurt you
if (r = 0) {
    /* bunch of code here */
}
else
{
   /* even more code here */
}

我继承了一个没有任何UAT交付给客户的项目。它被踢出了栅栏,要求赔偿。

他们第一次使用它,它自然就爆炸了。它是一个插入库,可以覆盖任何以文件名而不是文件描述符作为参数的系统调用。

许多系统调用已经被遗忘。

当我开始使用这款游戏时,它的代码包含了以下内容:

/* core dumps around here but this is hardly ever called */

and

/* don't know why this works but it seeems to be ok */

哦,没有单元测试。一位同事已经开始添加缺失的系统调用和单元测试。

编写代码的那些混蛋还在团队中,他们根本不在乎已经交付的垃圾!