注释也可以很有爱——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
除了冰冷的代码,我们还可以有些别的。
号召同行们,把注释变成艺术