诸位假期都休息好了吗???
总之我是一躺一看如何就天黑了呢我啥也没干呀???
明天YYds给你们献上一波神注释供诸位在这无趣繁忙的周日娱乐娱乐~
0.
/*
* Dear Maintainer
*
* Once you are done trying to ‘optimize’ this routine,
* and you have realized what a terrible mistake that was,
* please increment the following counter as a warning
* to the next guy.
*
* total_hours_wasted_here = 73
*
亲爱的维护者
假如尝试对这段程序进行'优化'
但是您早已意识到这是一个多么可怕的错误,
请降低以下计数器的个数拿来对后来人进行警告
这儿总共浪费的时间=731.
Exception up = new Exception("Something is really wrong.");
throw up; //ha ha
例外=新的异常(“确实有问题。”)
舍弃;//哈哈2.
// When I wrote this, only God and I understood what I was doing
// Now, God only knows
当我写下这个的时侯,只有上帝和我明白我在做哪些
如今,只有上帝晓得3.
// sometimes I believe compiler ignores all my comments
有时,我会相信编译器会忽视我所有的注释4.
// 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.
谨借此代码,送给我的父亲达琳我要印源码,谢谢她仍然支持着我,以及我的三个儿子和一条狗。5.
// drunk, fix later
喝多了,改天再修6.
// Magic. Do not touch.
魔法!不要碰。7.
// I'm sorry.
抱歉。8.
return 1; # returns 1
返回1;#返回19.
Catch (Exception e) {
//who cares?
}
捕获(异常e)
谁在意?10.
/**
* Always returns true.
*/
public boolean isAvailable() {
return false;
}
代码返回false,注释则仍然返回true11.
/*
* 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.
*/
你可能相信你能读懂以下代码,
而且显然绝对不可能,相信我。
一旦你调试了,你绝对会懊悔装聪明去尝试优化这段代码。
最好的方法是关掉文件,
去玩点儿你喜欢的东西吧!
12.
try {
} finally { // should never happen
}
绝对不会运行到这儿13.
const int TEN=10; // As if the value of 10 will fluctuate...
似乎10的值会波动…14.
// This code sucks, you know it and I know it.
// Move on and call me an idiot later.
这段代码的确很烂,我晓得你也晓得,
先不要骂我,请先接着往下看15.
// If this comment is removed the program will blow up
假如删了此处注释,程序就炸了16.
// I am not responsible of this code.
// They made me write it, against my will.
我不负责这个代码
她们逼迫我写,违反了我的意愿。
17.
/* Please work */
请工作18.
// no comments for you
// it was hard to write
// so it should be hard to read
没有注释,
很难写,
所以它应当很难阅读19.
options.BatchSize = 300; //Madness? THIS IS SPARTA!
疯了吧?这是斯巴达!20.
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it
假如这个代码才能正常工作,这么是PaulDiLascia写的
否则,我也不晓得是谁写的21.
// Peter wrote this, nobody knows what it does, don't change it!
这是彼得写的,没人晓得它是做哪些的我要印源码,别改动!22.
/** Logger */
private Logger logger = Logger.getLogger();
不管怎样费尽心力,人会重伤的时侯才会重伤。23.
// I have to find a better job
我必须找到更好的工作24.
// Real programmers don’t comment their code.
// If it was hard to write,
// it should be hard to understand.
真正的程序员不注释她们的代码。
假如很难写
应当是无法理解25.
// This is black magic
// from
// *Some stackoverlow link
// Don’t play with magic, it can BITE.
这是来自stackoverlow的黑魔法
别玩魔法,它会咬人的26.
// For the sins I am about to commit, may James Gosling forgive me
对于我将要犯下的暴行,希望詹姆斯·高斯林(JamesGosling)能宽恕我27.
// Comment this later
稍后对此注释28.
// Remove this if you wanna be fired
假如你想被炒鳕鱼,就删掉它29.
}catch(Exception ex){
// Houston, we have a problem
}
Houston,我们有一个问题30.
// I can’t divide with zero, so I have to divide with something very similar
result = number / 0.00000000000001.
我不能乘以0,所以我要乘以一个十分相像的数31.
int getRandomNumber()
{
Return 4; // chosen by fair dice roll.
// guaranteed to be random.
}
通过公正掷色子选择
保证是随机的32.
#TODO: Figure out what I’m doing here and comment accordingly.
弄清楚这儿做哪些并相应地添加注释33.
// If this code is still being used when it stops working, then
// you have my permission to shoot me. Oh, you won't be able
// to - I'll be dead...
倘若这段代码停止工作时还在使用,
杀了我吧,哦~你不能那么做
我死了……34.
// If you are reading this, that means you have been put in charge of my previous project.
// I am sorry, so sorry for you. Godspeed.
假如你看见了这儿,这意味着你早已被委任为我之前的项目的负责人。
对不住,真抱歉。祝你好运。35.
// I wrote this while drunk, I don’t know what it does,
// but if you remove it the program breaks.
我是在喝醉的时侯写的,所以不晓得它是干哪些用的
但假如你删掉它,程序都会中断36.
// This code worked before, but my cat decided to take a
// trip across my keyboard...
这段代码曾经是有效的,而且我的猫决定在我的按键上跑一趟37.
long long ago; /* in a galaxy far far away */
在很远很远的银河系外(这段代码能运行,绝对是个奇迹)38.
long john; // silver
金银岛39.
#define TRUE FALSE // Happy debugging suckers
快乐的去调试你的代码吧,哈哈40.
// Dear future me. Please forgive me.
// I can't even begin to express how sorry I am.
未来亲爱的我,请宽恕我
我说不下来我有多抱歉41.
// private instance variable for storing age
public static int age;
用于储存年纪的私有实例变量42.
// I am not sure why this works but it fixes the problem.
其实我不晓得为何这样好使,但它却是修补了问题43.
last = first; /* Biblical reference */
最后即是开始,新约引用44.
try {
} catch (SQLException ex) {
// Basically, without saying too much, you're screwed. Royally and totally.
} catch(Exception ex)
{
//If you thought you were screwed before, boy have I news for you!!!
}
不用多说,基本上你完蛋了45.
// John! If you'll svn remove this once more,
// I'll shut you, for God's sake!
// That piece of code is not "something strange"!
// That is THE AUTH VALIDATION.
假如你再删掉一次
看在上帝的份上,我要关掉你
这段代码不是哪些“奇怪的东西”
那就是身分验证46.
long time; /* know C */
过来许久时间才晓得47.
// Abandon all hope ye who enter beyond this point
入此门者了断希望48.
/* Ah ah ah! You'll never understand why this one works. */
啊啊啊!你永远都不会明白为何这个方式有效49.
catch (Ex as Exception) {
// oh crap, we should do something.
}
糟糕,我们应当做点哪些50.
// TODO make this work
用TODO做这件事51.
// If you're reading this, then my program is probably a success
假如你如今在认真详尽的阅读这段代码,这么写的这段代码应当是没有问题的52.
// set break point here - you'll never reach it
在这儿设置断点-你永远作不到十全十美53.
/*
** The author disclaims copyright to this source code.
** In place of a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
*/
暂无评论内容