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


当前回答

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

A:很简单——就是那个帮我解决了我当时遇到的任何问题的人,而且有很多这样的人!

其次是那些帮助指导新开发避免已知陷阱的方法。

其他回答

很久以前,我遇到了一些连接脚本,虽然我不记得语法,但我记得注释,因为我是平克·弗洛伊德的粉丝。

//Attempt Handshake: Hello? This is London calling. Are we reaching you?


//Handshake Failed: I don't understand...he just hung up.
// now swap like a <explicative removed>

我在查看TVNZ网站早期迭代的HTML源代码时发现了这个宝藏(如果你在家玩的话,从571行开始):

<!-- Hopfully we can do this otherwise the nav is going to be pretty plain and Hong will go postal. -->
double penetration; // ouch
catch
{     
    // you’re fucked
    // write out the file somewhere and start screaming “Connection down! Connection down!”
}