你遇到过的源代码中最好的注释是什么?
当前回答
在编写MAPPER应用程序时,我们有一些标准,其中之一就是在整个套件中使用的标准变量列表。其中一个“V43”总是用来表示姓氏。所以,想象一下,当我被要求修复一大块MAPPER代码中唯一的注释是:
Here V43 contains the Surname
其他回答
//把这个放在这里的人是个白痴…这根本不管用!
但是代码还在那里……
//This code sucks, you know it and I know it.
//Move on and call me an idiot later.
'NO COMMENT
public int hashCode() {
//sucks, but what're you gonna do
/*
int hash = 7;
for (int i = 0; i < array.length; i++)
hash = hash * 31 * (null == array[i] ? 0 : array[i].hashCode());
return hash;
*/
return 0;
}
我在我发布的WordPress模板中发布了这个“许可声明”。不管怎样,我觉得这很有趣。
/* The License:
You (from this point on referred to as The You) are hereby
granted by me (from this point on referred to as The Me)
license to knock yourself silly with this template.
By using this template The You implicitly accepts this
license and pledges solemnly to never claim creative
ownership of any graphics, code, concepts, eggs, bacon, ideas,
colors, shapes, hypertext-transfer protocols or other conduits
of the visual splendor thatis this template.
The Me, in turn, pledges equally solemnly to be far too
lazy to ever check up on you, so if you do manage to pull
some chicks The Me won't have a cow.
However The Me would be sorely disappointed if The You
were to try and sell or distribute this work without
acknowledging The Me. Seriously. The Me will come down on
The You like a large quantitiy of hard and heavy objects
that in large quantities may be harmful and possibly even
lethal to The You; So don't even think about it, The Buster.
*/
推荐文章
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?
- 在Bash中创建多行注释的方法?