你遇到过的源代码中最好的注释是什么?


当前回答

//FIXME: fix this before the 1.0 release

他们在第4版

其他回答

/* Please work */

我的一个老老板总是说我们必须在内部使用我们自己的产品。“吃我们自己的狗粮……”

许多年后,我发现嵌入在一个临时同事所做的源代码中,他触及的每个函数都被标记为:

/* NOT FIT FOR HUMAN CONSUMPTION */

我只是在我自己的代码中遇到了这个问题。它在一个用于类别选择的洋红色管理模板中:

        /*
         * 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?
        }

我要把语言从我们的旗舰产品中移除;但我记得我非常沮丧。如果我没有留下评论,我会试着修改它,但会遇到和以前一样的问题。

// (c) 2000 Applied Magic, Inc.
// Unauthorized use punishable by torture, mutilation, and vivisection.

啊,我一直很喜欢这个……