你遇到过的源代码中最好的注释是什么?
当前回答
when :orientation
## Avoid matching gay people with straight people - they hate it, they do, they really do.
query_parameter = "(users.orientation = 'Bi' OR (users.orientation = 'Straight' AND users.gender IN ('#{user.opposite_genders.join('\',\'')}')) OR (users.orientation = 'Gay' AND users.gender IN ('#{user.same_genders.join('\',\'')}')))"
从一个约会网站…
其他回答
// human madable inconvenient. Way too sucks.
我仍然没有完全理解它的含义,但我发现它对于许多代码来说是非常正确的。
我在我发布的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.
*/
我经常发现这个
// fix it!
// if the resultMap size is less than or equal to zero
// then the product is added
if (resultMap.size() <= 0)
为了保护有罪的人,价值观被改变了
这是一个承包商留下的,他一直在做一段负责测试电子邮件登录的代码。我们不相信,所以我们试了一下,这是一个有效的登录到他的个人帐户;我们再次检查了修订历史,他有两个签入来编辑它:一个是添加代码,另一个是注释掉它。
我们只添加了美术内容,而不去管其他内容;另一名开发人员认为,用未来的自己给他发电子邮件(游戏邦注:比如《The Office》)会很有趣,他说,在登录停止之前,他每天都要发两周的电子邮件。
' ROFL:ROFL:LOL:ROFL:ROFL
' ______/|\____
' L / [] \
' LOL===_ ROFL \_
' L \_______________]
' I I
' /---------------/
'TODO: REMOVE MY INFO AND REPLACE WITH USER CREDENTIALS
'Private TEST_LoginName As String = "DurgshA@Exmaple.org"
'Private TEST_Password As String = "Humsal892"
'Private TEST_Server As String = "imap.secureserver.net"
我最喜欢的部分不是他做了这件事,也不是他不小心把它留在原地等待签到——而是当他再次看到它时,他只是把它注释掉了,而不是删除它。如果我们不知道它在那里,我们就不会去看原始版本:-D
推荐文章
- Swift:理解// MARK
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?