你遇到过的源代码中最好的注释是什么?
当前回答
这实际上是我在实现原型转换为实际代码时所做的:
// Abandon all hope you who needs to debug this
是的,有比我聪明的人在之后重构了代码(它必须有一个好的结局)。
其他回答
# There is a bug in the next line. $searchParameters != {} will always return true, because {} is creating
# a new hash reference on the fly, and the inequality operater is comparing the memory location of it
# to the memory location of $searchParameters, and they will always be different.
# This means that the following code will always get executed as long as $nodes is defined.
# I'm leaving it there because it has always been there, and although I'm sure it was originally meant to
# mean %$searchParameters (essentially "is this hash not empty"), I'm afraid to change it.
if ( $nodes && $searchParameters != {} )
{
def format_ticket_content(text, recursive = true)
if text.is_a?(TicketNote)
note = text
text = note.content
else
note = nil
end
## Safety pig has arrived!
text = h(text)
## _
## _._ _..._ .-', _.._(`))
## '-. ` ' /-._.-' ',/
## ) \ '.
## / _ _ | \
## | a a / |
## \ .-. ;
## '-('' ).-' ,' ;
## '-; | .'
## \ \ /
## | 7 .__ _.-\ \
## | | | ``/ /` /
## /,_| | /,_/ /
## /,_/ '`-'
##
// John! If you'll svn remove this once more,
// I'll shut you, for God's sake!
// That piece of code is not “something strange”!
// That is THE AUTH VALIDATION.
你怎么看?下面的代码是安全的“svn删除”。
/*
* Wirzenius wrote this portably, Torvalds fucked it up :-)
*/
大学时代:
//why the f*** we have to move this here to make it work
当我们和教授一起复习的时候,它在印刷资料中被突出了。
原因是:一些与缓冲区溢出相关的严重错误,影响了代码中其他位置的文件处理程序中不相关的变量。移动变量将使它再次工作。
推荐文章
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?
- 在Bash中创建多行注释的方法?
- 如何评论在Vim的配置文件:“。vimrc”?
- 如何为多行命令放一行注释
- 我如何向包添加注释。Json用于NPM安装?