在很多不熟悉程序员的群体中,可能都认为程序员是沉闷一次的代表,但其实不然,很多程序员都是非常幽默有趣且都有一颗非常闷骚的心。这尤其体现在他们呢好玩的代码注释上面,我找了一写奇趣的代码注释类型,小伙伴们可以感受一下。
镇码神兽类(好吧!谁都希望BUG退散!)
1.和谐马
2.佛祖保佑
3.单身必备神兽
破罐子破摔型
/*** * When I wrote this,only God and I understood what I was doing * Now,God only knows *//*** * 写这段代码的时候,只有上帝和我知道再写什么 * 现在,只有上帝知道 */
洒脱型
//drunk,fix later//喝醉了,晚点来修复
看的出这是一个非常负责的程序员
Catch(Exception e){//who cares?//谁又在意呢?}
一个不羁放纵爱自由的程序员形象跃然于纸上。
有爱型
// 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.//仅以此代码献给我的妻子
一对夫妇,三个孩子和一只人来疯的狗,非常有爱幸福的一家
/* * 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. */ /* * 你可能会认为你读得懂以下的代码。但是你不会懂的,相信我吧。 * 要是你尝试玩弄这段代码的话,你将会在无尽的通宵中不断地咒骂自己为什么会认为自 己聪明到可以优化这段代码。 * 现在请关闭这个文件去玩点别的吧。 */
来自前辈非常中肯的建议
细思极恐型
//sometimes I believe compiler ignores all my comments//有时候我相信编译器忽略了我所有的注释
笑死人不偿命型
/*** * 程序员1(于2010年6月7日):在这个坑临时加入一些调料 * 程序员2(于2011年5月22日):临你个屁啊 * 程序员3(于2012年7月23日):楼上都是狗屎,鉴定完毕 * 程序员4(于2013年8月2日):fuck 楼上,三年了,这坑还在!!! * 程序员5(于2014年8月21日):哈哈哈,这坑居然坑了这么多人,幸好我也不用填了,系统终止运行了,you're died */
/*** * 这个公司没有年终奖的,兄弟别指望了,也别来了,我准备辞职了 * 另外这个项目有很多*Bug* 你坚持不了多久的,拜拜! */
/*** * 1只羊 == one sheep * 2只羊 == two sheeps * 3只羊 == three sheeps * 4只羊 == four sheeps * 5只羊 == five sheeps * 6只羊 == six sheeps * 7只羊 == seven sheeps * 8只羊 == eight sheeps * 9只羊 == nine sheeps * 10只羊 == ten sheeps * 11只羊 == eleven sheeps * 12只羊 == twelve sheeps * 13只羊 == thirteen sheeps * 14只羊 == fourteen sheeps * 15只羊 == fifteen sheeps * 16只羊 == sixteen sheeps * 17只羊 == seventeen sheeps * 18只羊 == eighteen sheeps * 19只羊 == nineteen sheeps * 20只羊 == twenty sheeps * 21只羊 == twenty one sheeps * 22只羊 == twenty two sheeps * 23只羊 == twenty three sheeps * 24只羊 == twenty four sheeps * 25只羊 == twenty five sheeps * 26只羊 == twenty six sheeps * 27只羊 == twenty seven sheeps * 28只羊 == twenty eight sheeps * 29只羊 == twenty nine sheeps * 30只羊 == thirty sheeps * 现在瞌睡了吧,好了,不要再改下面的代码了,睡觉咯~~ */
/*** * somedev1 - 6/7/02 Adding temporary tracking of Login screen * somedev2 - 5/22/07 Temporary my ass */
/*** * 一些修改1 - 2002/6/7 增加临时的跟踪登录界面 * 一些修改2 - 2007/5/22 我临时的犯傻 */
文章转自知乎:https://www.zhihu.com/question/29962541