神级注释

注释,是为了给后来的代码阅读者提供更好的指引。但是程序员是不喜欢写注释的,所以要么是不写,要么写的是一些神级的注释,我们的代码里边就有拉丁文注释,搜索了一下才知道出自《圣经》,对这些注释比较感兴趣,所以从网上收集了一些神级的注释。

1
2
3
4
/**
* 这个公司没有年终奖的,兄弟别指望了,也别来了,我准备辞职了
* 另外这个项目有很多*Bug* 你坚持不了多久的,拜拜!
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
* 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.
*/
/**
* 你可能会认为你读得懂以下的代码。但是你不会懂的,相信我吧。
* 要是你尝试玩弄这段代码的话,你将会在无尽的通宵中不断地咒骂自己为什么会认为自己聪明到可以优化这段代码。
* 现在请关闭这个文件去玩点别的吧。
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/
/**
* 致终于来到这里的勇敢的人:
* 你是被上帝选中的人,是英勇的、不敌辛苦的、不眠不休的来修改我们这最棘手的代码的编程骑士。
* 你,我们的救世主,人中之龙,我要对你说:永远不要放弃,永远不要对自己失望,永远不要逃走,辜负了自己,
* 永远不要哭啼,永远不要说再见,永远不要说谎来伤害自己。
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

/**
* Dear maintainer:
*
* Once you are done trying to 'optimize' this routine,
* and have realized what a terrible mistake that was,
* please increment the following counter as a warning
* to the next guy:
*
* total_hours_wasted_here = 42
*/
/**
* 亲爱的维护者:
*
* 如果你尝试了对这段程序进行'优化'
* 下面这个计数器的个数用来对后来人进行警告
*
* 浪费在这里的总时间 = 42h
*/
1
2
3
4
5
6
7
8
/**
* When I wrote this, only God and I understood what I was doing
* Now, God only knows
*/
/**
* 写这段代码的时候,只有上帝和我知道它是干嘛的
* 现在,只有上帝知道
*/

有神级注释怎么能少魔性图呢?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**                                                                          
* .,:,,, .::,,,::.
* .::::,,;;, .,;;:,,....:i:
* :i,.::::,;i:. ....,,:::::::::,.... .;i:,. ......;i.
* :;..:::;::::i;,,:::;:,,,,,,,,,,..,.,,:::iri:. .,:irsr:,.;i.
* ;;..,::::;;;;ri,,,. ..,,:;s1s1ssrr;,.;r,
* :;. ,::;ii;:, . ................... .;iirri;;;,,;i,
* ,i. .;ri:. ... ............................ .,,:;:,,,;i:
* :s,.;r:... ....................................... .::;::s;
* ,1r::. .............,,,.,,:,,........................,;iir;
* ,s;........... ..::.,;:,,. ...............,;1s
* :i,..,. .,:,,::,. .......... .......;1,
* ir,....:rrssr;:, ,,.,::. .r5S9989398G95hr;. ....,.:s,
* ;r,..,s9855513XHAG3i .,,,,,,,. ,S931,.,,.;s;s&BHHA8s.,..,..:r:
* :r;..rGGh, :SAG;;G@BS:.,,,,,,,,,.r83: hHH1sXMBHHHM3..,,,,.ir.
* ,si,.1GS, sBMAAX&MBMB5,,,,,,:,,.:&8 3@HXHBMBHBBH#X,.,,,,,,rr
* ;1:,,SH: .A@&&B#&8H#BS,,,,,,,,,.,5XS, 3@MHABM&59M#As..,,,,:,is,
* .rr,,,;9&1 hBHHBB&8AMGr,,,,,,,,,,,:h&&9s; r9&BMHBHMB9: . .,,,,;ri.
* :1:....:5&XSi;r8BMBHHA9r:,......,,,,:ii19GG88899XHHH&GSr. ...,:rs.
* ;s. .:sS8G8GG889hi. ....,,:;:,.:irssrriii:,. ...,,i1,
* ;1, ..,....,,isssi;, .,,. ....,.i1,
* ;h: i9HHBMBBHAX9: . ...,,,rs,
* ,1i.. :A#MBBBBMHB##s ....,,,;si.
* .r1,.. ,..;3BMBBBHBB#Bh. .. ....,,,,,i1;
* :h;.. .,..;,1XBMMMMBXs,.,, .. :: ,. ....,,,,,,ss.
* ih: .. .;;;, ;;:s58A3i,.. ,. ,.:,,. ...,,,,,:,s1,
* .s1,.... .,;sh, ,iSAXs;. ,. ,,.i85 ...,,,,,,:i1;
* .rh: ... rXG9XBBM#M#MHAX3hss13&&HHXr .....,,,,,,,ih;
* .s5: ..... i598X&&A&AAAAAA&XG851r: ........,,,,:,,sh;
* . ihr, ... . .. ........,,,,,;11:.
* ,s1i. ... ..,,,..,,,.,,.,,.,.. ........,,.,,.;s5i.
* .:s1r,...................... ..............;shs,
* . .:shr:. .... ..............,ishs.
* .,issr;,... ...........................,is1s;.
* .,is1si;:,....................,:;ir1sr;,
* ..:isssssrrii;::::::;;iirsssssr;:..
* .,::iiirsssssssssrri;;:.
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**                                                                    
* .,, .,:;;iiiiiiiii;;:,,. .,,
* rGB##HS,.;iirrrrriiiiiiiiiirrrrri;,s&##MAS,
* r5s;:r3AH5iiiii;;;;;;;;;;;;;;;;iiirXHGSsiih1,
* .;i;;s91;;;;;;::::::::::::;;;;iS5;;;ii:
* :rsriii;;r::::::::::::::::::::::;;,;;iiirsi,
* .,iri;;::::;;;;;;::,,,,,,,,,,,,,..,,;;;;;;;;iiri,,.
* ,9BM&, .,:;;:,,,,,,,,,,,hXA8: ..,,,.
* ,;&@@#r:;;;;;::::,,. ,r,,,,,,,,,,iA@@@s,,:::;;;::,,. .;.
* :ih1iii;;;;;::::;;;;;;;:,,,,,,,,,,;i55r;;;;;;;;;iiirrrr,..
* .ir;;iiiiiiiiii;;;;::::::,,,,,,,:::::,,:;;;iiiiiiiiiiiiri
* iriiiiiiiiiiiiiiii;;;::::::::::::::::;;;iiiiiiiiiiiiiiiir;
* ,riii;;;;;;;;;;;;;:::::::::::::::::::::::;;;;;;;;;;;;;;iiir.
* iri;;;::::,,,,,,,,,,:::::::::::::::::::::::::,::,,::::;;iir:
* .rii;;::::,,,,,,,,,,,,:::::::::::::::::,,,,,,,,,,,,,::::;;iri
* ,rii;;;::,,,,,,,,,,,,,:::::::::::,:::::,,,,,,,,,,,,,:::;;;iir.
* ,rii;;i::,,,,,,,,,,,,,:::::::::::::::::,,,,,,,,,,,,,,::i;;iir.
* ,rii;;r::,,,,,,,,,,,,,:,:::::,:,:::::::,,,,,,,,,,,,,::;r;;iir.
* .rii;;rr,:,,,,,,,,,,,,,,:::::::::::::::,,,,,,,,,,,,,:,si;;iri
* ;rii;:1i,,,,,,,,,,,,,,,,,,:::::::::,,,,,,,,,,,,,,,:,ss:;iir:
* .rii;;;5r,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,sh:;;iri
* ;rii;:;51,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.:hh:;;iir,
* irii;::hSr,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,sSs:;;iir:
* irii;;:iSSs:.,,,,,,,,,,,,,,,,,,,,,,,,,,,..:135;:;;iir:
* ;rii;;:,r535r:...,,,,,,,,,,,,,,,,,,..,;sS35i,;;iirr:
* :rrii;;:,;1S3Shs;:,............,:is533Ss:,;;;iiri,
* .;rrii;;;:,;rhS393S55hh11hh5S3393Shr:,:;;;iirr:
* .;rriii;;;::,:;is1h555555h1si;:,::;;;iirri:.
* .:irrrii;;;;;:::,,,,,,,,:::;;;;iiirrr;,
* .:irrrriiiiii;;;;;;;;iiiiiirrrr;,.
* .,:;iirrrrrrrrrrrrrrrrri;:.
* ..,:::;;;;:::,,.
*/
1
2
3
4
5
6
7
8
9
10
11
/**
* 佛曰:
* 写字楼里写字间,写字间里程序员;
* 程序人员写程序,又拿程序换酒钱。
* 酒醒只在网上坐,酒醉还来网下眠;
* 酒醉酒醒日复日,网上网下年复年。
* 但愿老死电脑间,不愿鞠躬老板前;
* 奔驰宝马贵者趣,公交自行程序员。
* 别人笑我忒疯癫,我笑自己命太贱;
* 不见满街漂亮妹,哪个归得程序员?
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* .::::.
* .::::::::.
* ::::::::::: FUCK YOU
* ..:::::::::::'
* '::::::::::::'
* .::::::::::
* '::::::::::::::..
* ..::::::::::::.
* ``::::::::::::::::
* ::::``:::::::::' .:::.
* ::::' ':::::' .::::::::.
* .::::' :::: .:::::::'::::.
* .:::' ::::: .:::::::::' ':::::.
* .::' :::::.:::::::::' ':::::.
* .::' ::::::::::::::' ``::::.
* ...::: ::::::::::::' ``::.
* ```` ':. ':::::::::' ::::..
* '.:::::' ':'````..
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* ┌─┐ ┌─┐ + +
* ┌──┘ ┴───────┘ ┴──┐++
*
* ─── ++ + + +
* ███████───███████ +
* +
* ─┴─
*
* └───┐ ┌───┘
*
* + +
*
* └──────────────┐
*
* ├─┐
* ┌─┘
*
* └─┐ ┌───────┬──┐ ┌──┘ + + + +
* ─┤ ─┤ ─┤ ─┤
* └──┴──┘ └──┴──┘ + + + +
* 神兽保佑
* 代码无BUG!
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* d*##$.
* zP"""""$e. $" $o
* 4$ '$ $" $
* '$ '$ J$ $F
* 'b $k $> $
* $k $r J$ d$
* '$ $ $" $~
* '$ "$ '$E $
* $ $L $" $F ...
* $. 4B $ $$$*"""*b
* '$ $. $$ $$ $F
* "$ R$ $F $" $
* $k ?$ u* dF .$
* ^$. $$" z$ u$$$$e
* #$b $E.dW@e$" ?$
* #$ .o$$# d$$$$c ?F
* $ .d$$#" . zo$> #$r .uF
* $L .u$*" $&$$$k .$$d$$F
* $$" ""^"$$$P"$P9$
* JP .o$$$$u:$P $$
* $ ..ue$" "" $"
* d$ $F $
* $$ ....udE 4B
* #$ """"` $r @$
* ^$L '$ $F
* RN 4N $
* *$b d$
* $$k $F
* $$b $F
* $"" $F
* '$ $
* $L $
* '$ $
* $ $
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* ,----------------, ,---------,
* ,-----------------------, ," ,"|
* ," ,"| ," ," |
* +-----------------------+ | ," ," |
* | .-----------------. | | +---------+ |
* | | | | | | -==----'| |
* | | I LOVE DOS! | | | | | |
* | | Bad command or | | |/----|`---= | |
* | | C:\>_ | | | ,/|==== ooo | ;
* | | | | | // |(((( [33]| ,"
* | `-----------------' |," .;'| |(((( | ,"
* +-----------------------+ ;; | | |,"
* /_)______________(_/ //' | +---------+
* ___________________________/___ `,
* / oooooooooooooooo .o. oooo /, \,"-----------
* / ==ooooooooooooooo==.o. ooo= // ,`\--{)B ,"
* /_==__==========__==_ooo__ooo=_/' /___________,"
*
*/

最后,再来一个,愿代码永无BUG

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* _ooOoo_
* o8888888o
* 88" . "88
* (| -_- |)
* O\ = /O
* ____/`---'\____
* . ' \\| |// `.
* / \\||| : |||// \
* / _||||| -:- |||||- \
* | | \\\ - /// | |
* | \_| ''\---/'' | |
* \ .-\__ `-` ___/-. /
* ___`. .' /--.--\ `. . __
* ."" '< `.___\_<|>_/___.' >'"".
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
* \ \ `-. \_ __\ /__ _/ .-` / /
* ======`-.____`-.___\_____/___.-`____.-'======
* `=---='
*
* .............................................
* 佛祖保佑 永无BUG
*/

醒醒吧,不可能滴^_^!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
* _ooOoo_
* o8888888o
* 88" . "88
* (| -_- |)
* O\ = /O
* ___/`---'\____
* . ' \\| |// `.
* / \\||| : |||// \
* / _||||| -:- |||||- \
* | | \\\ - /// | |
* | \_| ''\---/'' | |
* \ .-\__ `-` ___/-. /
* ___`. .' /--.--\ `. . __
* ."" '< `.___\_<|>_/___.' >'"".
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
* \ \ `-. \_ __\ /__ _/ .-` / /
* ======`-.____`-.___\_____/___.-`____.-'======
* `=---='
* .............................................
* 佛曰:bug泛滥,我已瘫痪!
*/

文章目录
|
c