你遇到过的源代码中最好的注释是什么?
当前回答
/*这是一个可怕的黑客攻击的副本——很多年前,遗留的PortfolioServer被修改为在“optionTrade”块中返回现金交易,因为客户端开发人员太懒了,没有正确地获取他们的xpath。他们的懒惰一直在回响,这意味着我们在这里需要一个类似的黑客……*/
其他回答
//这将为我们每个用户节省0.5秒,并取悦机器精神。
在很长的程序之前:)
try {
}
catch (SQLException ex) {
// Basically, without saying too much, you're screwed. Royally and totally.
}
catch(Exception ex)
{
//If you thought you were screwed before, boy have I news for you!!!
}
/* FIXME This must absolutely be removed before 4.0.7 release
* TODO really remove this */
我们已经发布了4.0.7,4.0.8,4.0.9和4.1版本…
我只是在我自己的代码中遇到了这个问题。它在一个用于类别选择的洋红色管理模板中:
/*
* OK; before you read the following code know what I am trying to do.
* I needed to get the list of child catagories from the root node so that
* the root node didn't appear in the selection box. But for some stupid
* fucking reason the stupid fucking DBA wont let me access the items using
* indicies and I instead have to use their stupid fucking Iterator
* implementation. So there.
*/
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
$nodes = $node->getChildren();
break; // wtf?
}
我要把语言从我们的旗舰产品中移除;但我记得我非常沮丧。如果我没有留下评论,我会试着修改它,但会遇到和以前一样的问题。
// TODO: Drive an ashen stake through the foul heart of this function.
这是一个糟糕的函数。直到今天我还在做噩梦。
推荐文章
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?
- 在Bash中创建多行注释的方法?