`

搞笑代码注释

 
阅读更多
来源:
http://cobaia.net/2010/09/top-funny-source-code-comments/

Top funny source code comments


by Vinícius Krolow on setembro 14th, 2010

<!--end post header-->

 




1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * 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
 * indices 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?
}


 



1
// if i ever see this again i'm going to start bringing guns to work


 



1
//hack for ie browser (assuming that ie is a browser)


 



1
2
3
4
5
6
7
8
/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/


 



1
2
3
4
5
6
7
8
9
10
// 
// Dear maintainer:

// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 16
//


 



1
// TODO: Fix this. Fix what?


 



1
2
3
// no comments for you
// it was hard to write
// so it should be hard to read


 



1
// I will give you two of my seventy-two virgins if you can fix this.


 



1
options.BatchSize = 300; //Madness? THIS IS SPARTA!


 



1
2
// I am not responsible of this code.
// They made me write it, against my will.


 



1
2
//Dear future me. Please forgive me.
//I can't even begin to express how sorry I am.


 



1
double penetration; // ouch


 



1
# To understand recursion, see the bottom of this file.


At the bottom file:



1
# To understand recursion, see the top of this file.


 



1
//I am not sure why this works but it fixes the problem.


 



1
2
//somedev1 - 6/7/02 Adding temporary tracking of Logic screen

//somedev2 - 5/22/07 Temporary my ass


 



1
2
3
4
5
6
7
/*
 * You may think you know what the following code does.
 * But you dont. Trust me
 * Fiddle with me, and youll spend many a sleppless
 * night cursing the moment you thought you be clever 
 * enough to "optimize" the code below.
 * Now close this file and go play with something else.


 



1
// drunk, fix later


 



1
// Magic. Do not touch.


 



1
2
3
// I dedicate all this code, all my work, to my wife, Darlene, who will
// have to support me and our three children and the dog once it gets
// released into the public


 



1
2

Exception up = new Exception("Something is really wrong.");
throw up; //ha ha



1
2
//When I wrote this, only God and I understood that I was doing
//Now, God only knows
分享到:
评论

相关推荐

    11个程序员幽默代码注释

    11个程序员幽默代码注释

    c代码-瞬移的小人(so 搞笑)(把注释掉了的地方不注释就成了走路的小人)

    c代码-瞬移的小人(so 搞笑)(把注释掉了的地方不注释就成了走路的小人)

    javascript vvorld 在线加密破解方法

    //注释:网友的力量是强大的 for(i=1;i&lt;10;i++){ for(j=1;j&lt;=i;j++){ str+=i+”*”+j+”=”+i*j+” “; if(i==j){str+=”\n”}; } } alert&#40;str&#41;; [removed]不知道小秦用了什么办法,我是用了自制的...

    C语言FAQ 常见问题列表

    o 7.8 我遇到一些 ``搞笑" 的代码, 包含 5["abcdef"] 这样的 ``表达式"。 这为什么是合法的 C 表达式呢 ? o 7.9 既然数组引用会蜕化为指针, 如果 arr 是数组, 那么 arr 和 &arr 又有什么区别呢 ? o 7.10 我如何...

    springboot整合dubbo简易的demo

    springboot整合dubbo简易的demo,包含zookeeper搭建,dubbo管理平台搭建,以及dubbo整合springboot工程,简单明了的需求:学生模块与教师模块的相互调用,代码简单易懂明了全注释。 下载后直接使用IDEA 打开;

    你必须知道的495个C语言问题

    6.11 我看到一些“搞笑”的代码,包含5["abcdef"]这样的“表达式”。这为什么是合法的C语言表达式呢? 数组的指针 6.12 既然数组引用会退化为指针,如果array是数组,那么array和&array又有什么区别呢? 6.13 ...

    《你必须知道的495个C语言问题》

    书中列出了C用户经常问的400多个经典问题,涵盖了初始化、数组、指针、字符串、内存分配、库函数、C预处理器等各个方面的主题,并分别给出了解答,而且结合代码示例阐明要点。 《你必须知道的495个C语言问题》结构...

    你必须知道的495个C语言问题(PDF)

    = ’nn’) 的代码⋯⋯ . . . . . . . . . . . . . . . . . . 14 3.7 我怎样才能理解复杂表达式?“序列点” 是什么? . . . . . . . . . 15 3.8 那么, 对于a[i] = i++; 我们不知道a[] 的哪一个分量会被改写,但i 的确...

Global site tag (gtag.js) - Google Analytics