你遇到过的源代码中最好的注释是什么?
当前回答
这似乎阻止了白痴搞砸我的代码…
// Autogenerated, do not edit. All changes will be undone.
其他回答
What do you think you're doing, Dave?
这不是严格意义上的评论,但是…
那是20世纪90年代中期,我正在进行一次大的迁移:小软件供应商,大客户,压力很大。我们有很多转移门柱的东西;这个项目很难控制。我是关键的开发人员,但对系统还不熟悉,而另一个开发人员是供应商的所有者/创始人。
在几个月没有按时完成任务,也没有让客户满意之后,公司的所有者/创始人找来了另一名远程工作的开发人员。(我可以大胆地说,新开发人员的技能和经验都不如我。)
好吧,这个新人对我已经做过的代码做了一些更改,然后一两个月后我又回到了代码的同一区域,其中有一些我以前没有见过的变量。他的名字叫StupidMark。
伙计,这是不对的。我的意思是,有团队合作方面的考虑,但是:在这个环境中,变量名可能会出现在运行时错误消息中。我只是说说而已。
在我看来,那个新人的代码并没有让我们更接近可交付的产品,这让侮辱变得更伤人了。
最近在我们的代码中发现了这一点(我们开发企业软件):
// Instance of excel
Excel excel = this.CreateExcelInstance();
excel.Open(stream); // how to close it?!
在此之前,我确信我们已经摆脱了这些“有趣的东西”,我们正在以正确的、意识形态正确的方式做这件事……
/* Mark: If there's one thing you learn from this code, it is this...
Never, ever fly Air France. Their customer service is absolutely
the worst. I've never heard the words "That's not my problem" as
many times as I have from their staff -- It should, without doubt
be their corporate motto if it isn't already. Don't bother giving
them business because you're just a pain in their side and they
will be sure to let you know the first time you speak to them.
If you ever want to make me happy just tell me that you, too, will
never fly Air France again either (in spite of their excellent
cuisine).
Update by oej: The merger with KLM has transferred this
behaviour to KLM as well.
Don't bother giving them business either...
Only if you want to travel randomly without luggage, you
might pick either of them.
*/
来自一个显然在看巨蟒剧团的小伙子:
> //现在,for something完全 > // different: 类theLarch {
推荐文章
- 在VS Code中禁用“Comments are not allowed In JSON”错误
- Swift:理解// MARK
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?