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


当前回答

//If the Current Record is Getting End Dated, We should not create New History Entry. 
//We Just need to Update the Previous History Entry
//If the History is already End Dated and the New Record is now removing End Date, Then 
//We should not update the Previous History End Date. 
//We Just need to Create the New History Record Only.
//Alright.. 
//Alright.... 
//Enough Comments. Code it. :-)

其他回答

//把这个放在这里的人是个白痴…这根本不管用!

但是代码还在那里……

/**---------START-----------**/

  //  IMPLEMENTATION GOES HERE

/**---------END-----------**/

但没有代码;)

在开发团队中每个人都在大量编辑的代码文件头部:

'Avert your eyes, it may take on other forms!

好弗兰德斯。

我在COBOL程序中看到的一些东西让我感到恐惧

* All comments pertain to the lines which follow.

这是什么意思?

有人对评论感到不舒服,以至于不得不写一个元评论? 有人习惯将注释放在相关代码的下面,而被告知要将注释放在上面?这是怎么发生的?

在给一个朋友看了这篇来自《Coding Horror》的文章几个小时后,我看到了他对代码的评论:

// valdez先生是一个暴力的精神病患者。别惹他生气。