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


当前回答

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

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

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

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

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

and

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

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

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

其他回答

//迭代一次 美元我+ +;

不幸的是,它是我的,在我的“必须评论一切”阶段。

def leppard
# what, i cant have my own convention?
end
catch (Ex as Exception)
{
     // oh crap, we should do something.
}

没有什么比一个空的catch块更能让人觉得代码是健壮的....

// I have to find a better job
Case 1:
   ...
   break;
   ...
//I don't want do do this but [my coworker] says it's part of the code standard
default:
   break;