电子说
什么是代码注释,如何在代码中添加注释,相信每一位了解编程的人并不陌生。注释里往往有很多有趣的脑洞和「真心话」。今天我们一起去看看那些6到飞起,被玩坏了的幽默注释吧。
信息量太大的注释系列——
// I am not sure if we need this, but too scared to delete. ... ...
中文:个人不确认是不是需要,但是实在不敢删除
// I am not responsible of this code. // They made me write it, against my will.
中文:个人不负责这块的质量,因为他们逼迫我违心的写了这段代码
options.BatchSize = 300; //Madness? THIS IS SPARTA!
中文:疯了吧?这是斯巴达!
Catch (Exception e) { //who cares? }
中文:谁在意?
/** * Always returns true. */ public boolean isAvailable() { return false; }
中文:返回为true
/* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */
中文:你可能相信你能看懂以下代码,但是其实绝对不可能,相信我。一旦你调试了,你绝对会后悔装聪明去尝试优化这段代码。最好的方式是关闭文件,去玩点儿你喜欢的东西吧
try { } finally { // should never happen }
中文:绝对不会运行到这里
//This code sucks, you know it and I know it. //Move on and call me an idiot later.
中文:这段代码的确很挫,我知道你也知道,先不要骂我2B,请先接着往下看
long long ago; /* in a galaxy far far away */
中文:在很远很远的银河系外 (这段代码能运行,绝对是个奇迹)
double penetration; // ouch
中文:我擦!(注:简单来说,double penetration 代表一种「体位姿势」,大家自行百度or谷歌吧~)
# To understand recursion, see the bottom of this file At the bottom of the file: # To understand recursion, see the top of this file
中文: #如果想了解递归,请看最下面的注释 ... #如果想了解递归,请看最上面的注释
(a != b) ? b : a //和老婆意见不一致的时候听她的,意见一致的时候听我的。
这里还没有完善,先去下WC,如果你看到了,可以帮忙补上相关代码,谢谢!
/* Please work harder*/
从WC回来看到这样一行注释的我,已哭晕在电脑前……
逼格满满的注释:
不聊了,BUG太多,我要抓紧加班改BUG去了!
全部0条评论
快来发表一下你的评论吧 !