你遇到过的源代码中最好的注释是什么?
当前回答
//BELOW IS THE REAL CODE...JABRONI
//
// Yeah, but can you play the outtro to Bark At The Moon?
//
//|--------------------------------------------------|------------------------------------------------|
//|--------------------------------------------------|------------------------------------------------|
//|--17^16-16-16-17^16-17^16-16-16-17^16-17^16----16-|-19^16----16-19^16-19^16---16-19^16-19^16----17-|
//|--------------------------------------------19----|-------17----------------17---------------17----|
//|--------------------------------------------------|----------------------------------------------
其他回答
在为一家芬兰移动网络设备制造商工作期间,我深入研究了硬件抽象层,发现芬兰语单词“puukko”出现了100多次。
“puukko”是一种万能刀,每个芬兰人的工具箱里或家里都有。它被用于从剥土豆到电脑维修(我的观察)的所有事情。我相信在这个语境中,它相当于芬兰语中的“Hack”。
我的芬兰同事否认了这一点,并说这更像是“外科手术/干预”……我差点就相信了,直到我看到下面的评论:
/* Perkele ISO Puukko! */ -> Fucking Big Hack!
... 或者去死//婊子
我只是在我自己的代码中遇到了这个问题。它在一个用于类别选择的洋红色管理模板中:
/*
* 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?
}
我要把语言从我们的旗舰产品中移除;但我记得我非常沮丧。如果我没有留下评论,我会试着修改它,但会遇到和以前一样的问题。
在一堆糟糕的剪切和粘贴源代码的内容管理web应用程序:
// load image 1 - JPEG 240x320
img = f1.getImage();
if (check(img))
{
load(img, Constants.JPEG_240x320);
}
// load image 2 - JPEG 128x128
img = f2.getImage();
if (check(img))
{
load(img, Constants.JPEG_128x128);
}
...
// load image 13 - GIF 256x256
img = f13.getImage();
if (check(img))
{
load(img, Constants.GIF256x256);
}
// loaded all of the f**king images
注:大致翻译自意大利语:-)
// This condition can't happen. Call the police or something.
推荐文章
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?
- 在Bash中创建多行注释的方法?