注释也可以很有爱——Top funny source code comments

/*
 * 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
 * f.u.c.king reason the stupid f.u.c.king DBA wont let me access the items using
 * indices and I instead have to use their stupid f.u.c.king Iterator
 * implementation. So there.
 */
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
    $nodes = $node->getChildren();
    break;                // wtf?
}

 见识过日本人的过滤所有小写字母的代码,if(xx != 'a' && xx != 'b'.... != 'z') ,应该把这段注释加上去!

 

 

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

 献给所有跟IE较劲的战友们

 

// 
// 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
//

 本人曾经在一段Shell里注释,“3 hours for this stupid bug"

 

// Magic. Do not touch.

 恩...不少设计糟糕的的项目里,该有这句注释

 

// 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

 除了冰冷的代码,我们还可以有些别的。

 

 

号召同行们,把注释变成艺术

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值