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


当前回答

try {
  dataSource.close();
}
catch (SQLException ex) {
  // Do nothing, since we're going to trash this anyway
}

当然,这类事情实际上是JDBC(或者至少是Oracle的JDBC驱动程序)中的wtf,因为它可以在关闭连接时抛出SQLExceptions…

其他回答

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

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

不是注释,而是属性

[ThereBeDragons]

还有一个是我在IHttpHandler的实现中看到的

//What is this?
public bool IsReusable
{
    get{return false;}
}
#pragma region Crap that is kept for temporary reasons

    //  Huge chunk of commented code

#pragma endregion

在XSLT文件的头文件中:

DON'T TOUCH THIS SCRIPT -> XSLT is like arcane, black magic
//Abandon all hope ye who enter beyond this point