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


当前回答

//uncomment the following line if the program manager changes her mind again this week

其他回答

try {
   doSomething();
} catch(err) {
   // Die quietly
   alert(err);
}
else
{
    // rien, c'est parfait.
}

这实际上是我在实现原型转换为实际代码时所做的:

// Abandon all hope you who needs to debug this

是的,有比我聪明的人在之后重构了代码(它必须有一个好的结局)。

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

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

//open lid


//take sh!t


//close lid

文件打开,数据转储,文件关闭…