你遇到过的源代码中最好的注释是什么?
当前回答
我的精选集:
// Thats the end of the While loop
// Clean up last row. I really must program better than this.
// Note: You can't immediately tell if the line below works.
// Rounding - blech. It's assumed that all .5s are rounded up.
// Sort out predictions first. Seems like the right place for a prediction, 'first'.
// Let's interpret!
其他回答
try
{
...
}
catch(Exception ex)
{
//if this happens the world is going to end...
}
现在猜猜发生了什么……
try {
dataSource.close();
}
catch (SQLException ex) {
// Do nothing, since we're going to trash this anyway
}
当然,这类事情实际上是JDBC(或者至少是Oracle的JDBC驱动程序)中的wtf,因为它可以在关闭连接时抛出SQLExceptions…
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
'
' NOTE: DON'T SCREW WITH THIS CODE UNLESS YOU REALLY UNDERSTAND IT!
'
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
我刚刚注意到自己在写这个
// not brilliant solution, but fair enough heh.
来自usenet的经典:
Teradyne硬件建模器代码的深层是一个例程 一大堆十六进制数字到SYS$QIO调用中。唯一的评论是 “这里发生了奇怪的魔法”。