当你在写新功能时,你是不是总想在关键地方加几句注释,以便后续修改?
但是! 事实真的如你所愿么? 看看下面这些注释,我想你能找到自己的影子。
// Magic. Do not touch.
神奇的代码,请勿改动
// drunk, fix later
喝醉啦,迟些再弄
/*
* You may think you know what the following code does.
* But you dont Trust me.
* Fiddle with it, and you’ll 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
*/
你以为你了解下面这些代码,但是你不相信我,你将会在无尽的通宵中不断地咒骂自己为什么会认为自己聪明,聪明到可以优化这段代码。好了,现在请关闭这个文件去玩点别的吧。
double penetration; // ouch
狂插两下; //痛啊
// I am not sure why this works but it fixes the problem.
反正这个办法就修复了问题,我也不知道为什么会这样
// Dear future me. Please forgive me.
// I can’t even begin to express how sorry I am.
亲爱的未来的我自己,请原谅我。我有着难以表达的歉意。
// no comments for you
// it was hard to write
// so it should be hard to read
没有注释留给你,难写的代码必定难读
options.BatchSize = 300; //Madness? This is SPARTA!
疯了吗?欢迎来到斯巴达。
// I am not responsible of this code.// They made me write it.
我不对以下代码负责。是他们逼我写的。
你写过哪些奇葩的注释呢? 在评论区分享一下吧!
转载请注明: 文章转载自:爱思资源网 http://www.aseoe.com/show-63-1033-1.html