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


当前回答

一个名为monitoring.sh的文件的前两行:

#!/usr/bin/perl
# perl script disguised as a bash script

其他回答

一段时间前我在一个PHP CMS中添加的注释。

if (/*you*/ $_GET['action']) { //celebrate
 // WARNING!!!
 // Very perversive code ahead!

... about a 20 lines of "very perversive" code ...

// Now you can call your grandmother back. ;)

当我在一些网站上工作时,我在嵌入式JS的开始发现了这一点:

我觉得这么做很肮脏,但那家伙想在。net中实现它

// Bad Christian, No cookie

这里的Cookie不是指浏览器Cookie

为什么你不应该将你的软件开发外包的一个经典案例:

public class Contact
{
    //...    

    /// <summary>
    /// Gets or sets the name of the first.
    /// </summary>
    /// <value>The name of the first.</value>
    public string FirstName
    {
        get { return _firstName; }
        set { _firstName = value; }
    }
}