程序代码里的幽默精神

标签: 程序代码 幽默 精神 | 发表时间:2011-11-02 18:05 | 作者:zen禅 Qiuwan
出处:http://www.yeeyan.org

译者 zen禅

程序代码里的幽默精神

《科学美国人》(Scientific American) 2011.11.1

作者:大卫·伯格 (David Pogue)

译者:zen禅

  
In Google Maps, the distance-measuring tool offers a choice of three unit systems: Metric, English or “I’m Feeling Geeky.” If you click the third one, you’re offered a long list of, ahem, somewhat uncommon measurement units, including parsecs, Persian cubits, and Olympic swimming pools.

  在使用谷歌地图的测距工具时,你有三种选择:公制,英制,或者“我想极客一把”(I'm feeling geeky)。如果你选择了第三个选项,将会出现一系列测距单位供你选择,其中一些很少用到,比如:秒差距( parsecs 一种天文距离单位), 波斯腕尺(Persian cubits), 还有水立方游池(Olympic swimming pools)。   


  
Mac OS X’s text-to-speech feature, meanwhile, lets you endow your Mac with any of dozens of different human voices. Each speaks a funny sample sentence. The Fred voice says, “I sure like being inside this fancy computer.” The quaking, semihysterical Deranged voice says, “I need to go on a really long vacation.” The alien-sounding Trinoids voice says, “We cannot communicate with these carbon units.”

  苹果OS X系统的文本到语音(text-to-speech)功能,有几十种不同的声音可供你选择。每一种声音都配有一句风趣的范例对话。如果你选择弗莱德的声音(The Fred voice),听到的会是:“这台电脑这么棒,我当然愿意呆在里面了。”而精神病人的声音(The Deranged voice)听上去则是颤抖的歇斯底里:“我要好好放个假。”连外星人(The Trinoids voice)也来凑热闹:“我们无法和这些碳基生命交流。”


On YouTube, if you pause a video and hold down the up and left arrow keys, you trigger a secret game of Snake. Try to guide the increasingly long snake’s body around the screen with your arrow keys without tripping over yourself.

  在YouTube看视频的时候,如果你按暂停键,然后按住键盘左方向键,就会发现视频中央的缓冲圆圈变成了一条贪吃蛇。用方向键操控贪吃蛇追逐光点越吃越大吧,小心不要碰到自己的身体。


In each of these cases, some programmer deep inside these megalithic corporations exhibited a sense of humor—a display that somehow made it past committee, through the lawyers and out into the world.

  在上面这些例子里,大公司的程序员们向我们展现了他们幽默的一面。

In the olden days—10 or 20 years ago—this sort of playfulness in software was more common. Software engineers took pride in embedding into their code all manner of jokes, whimsy and Easter eggs (hidden surprises triggered by unlikely sequences of keystrokes).

  在过去——10年或20年前——像这样在软件中加入玩笑元素的例子要更普遍。软件工程师在代码中插入各种笑料,怪想或复活节彩蛋(Easter eggs 藏在程序中的小惊喜,需要特定的场景或操作才能触发),并引以为傲。

Some of it was simple pride. Easter eggs often took the form of programming credits; after all, programmers usually don’t get any public recognition, not even in the user guide.

  这样做的部分原因,仅仅是出于自豪之情。要知道,程序员们常常是不为公众所知的,即使在软件的用户指南里也找不到他们的名字。所以,他们常会在复活节彩蛋中写下程序开发组的人员名单。

Often the buried humor in software consisted of elaborate inside jokes. In the original system software for the Palm Pilot, for example, programmer Ron Marianetti created an animated taxicab, resembling a fat Volkswagen Beetle, programmed to race across the screen at random times—a tribute to the Pilot’s original proposed name, the Taxi.

  有些彩蛋的由来,还有一段有趣的历史。比如,在奔迈飞行员(Palm Pilot,一款早期掌上电脑)的原系统中,程序员罗恩(Ron Marianetti )就创建了一辆类似大众甲壳虫的黄色出租车,会随机的在屏幕上驶过——这是为了纪念这款掌上电脑原本计划的名字,奔迈计程车(Palm Taxi)。


Across the hall, fellow engineer Chris Raff embedded an Easter egg of his own. If you held down your stylus in the lower right corner of the handwriting-practice game screen and then pressed a scroll button, a photo of himself with a buddy, tuxedoed at Palm’s annual Christmas party, would inexplicably appear.

  他的同事克里斯(Chirs Raff)则在程序中藏匿了一个关于自己的彩蛋。用触控笔戳手写区屏幕右下角,并按下拉按钮,他和朋友身着燕尾服,参加公司圣诞派对的照片就会神奇的跳出来。


In time, though, Silicon Valley’s corporate bosses began to frown on the practice of burying jokes in software. Part of the reason was quality control: by definition, an Easter egg is an untested feature. It’s a loose cannon that could, in theory, interfere with other, more important parts of the program. It made the overlords nervous.

  但好景不长,一段时间后,硅谷的公司老板们开始禁止程序设计师这样做。原因有三,第一个原因,是出于质量控制考虑:严格说来,彩蛋是一段未经测试的程序,理论上来讲,它可能会对整个程序中其他重要的功能代码产生影响。彩蛋是程序中的不安定因素,这让老板们心存担忧。

Another problem was employee retention. When programmers buried their own names into their work, they were, in essence, advertising their own skills. Their names were clearly displayed for inspection by headhunters at rival software companies.

  另一个原因,则是为了留住雇员。程序员在彩蛋里留下自己的名字,实际上是在给自己的代码能力做广告,竞争对手的猎头很容易就能得到程序员的个人信息。

Finally, there’s the simple matter of corporate image. An Apple or a Microsoft or a Palm may spend millions to create a certain public image of professionalism. The last thing its image meisters want is some rogue animation of a taxi driving across the screen during an important public demo. (Which actually happened to Palm. The taxi Easter egg was removed shortly thereafter.)

  最后一个原因,是出于公司整体形象的考量。不管是苹果,微软或是奔迈,为了创造一个专业的公众形象,都可能要花费数百万美元。 在一场重要的产品发布会上,一辆不知所谓的出租车从屏幕上晃晃悠悠穿过,这可不是公司愿意看到的。(这事还真让奔迈公司给碰上了。在那之后不久,出租车彩蛋就被删除了。)

These days, the spirit of in-jokes and whimsy lives on, but it has moved to new addresses: video games and movies—especially movies on DVD. Software jokes still live on in mainstream apps, but they’re less ambitious, and most of them seem to come from Apple and, especially, Google.

  现如今,玩笑和搞怪精神犹在,但我们更多的是在电子游戏和电影DVD中见到这些彩蛋。在一些主流应用程序中,我们还能发现隐藏的小惊喜,但相比之前,已经收敛了许多。而这些有幽默精神的软件,大部分出自苹果和谷歌。

Inside jokes lurk on the icon for Apple’s TextEdit, for example (view the icon at the largest possible size). Or turn on the Mac’s Speech Recognition feature and say to your computer, “Tell me a joke.”

  把苹果的TextEdit图标放大,你看到了什么?(文本内容是苹果1997年的著名电视广告,Think Different)或者打开Mac的语音识别,对你的电脑说,“给我讲个笑话。”(Tell me a joke)


Or search Google for “recursion” and click the “Did you mean?” suggestion. Or call up the Sydney Opera House in Google Earth and then spin around to the waterfront side; a late, great TV celebrity waits for you there. Or ask Google Maps to give you the directions from Japan to China and marvel at Google’s suggestion for getting across the Pacific (step number 42).

  你也可以在谷歌上搜索“递归”(recursion),然后点击搜索框下面的“你要搜索的是?”(谷歌会建议你搜索“递归”,点击建议链接后,你又会得到同样的结果,如此周而复始。)

  或者在谷歌地球中找到悉尼歌剧院,调整视觉角度,来到滨水的一边,你会发现,一位已故的电视明星在那里等你呢(已故的野生动物专家和冒险家Steve Irwin正与鳄鱼搏斗)。

  当然,你还可以向谷歌地图提问,让它告诉你怎么从日本去中国,看到它给出的如何横渡太平洋的建议,可不要过于吃惊。(Jet ski across the Pacific Ocean 摩托艇横渡太平洋)


  
Thank you, anonymous programmers; keep it up. You’ve made it clear that software can do more than make us productive—it can also make us happy.

  谢谢你们,那些不知名的程序员,请继续保持幽默精神。你们已经证明了,软件不但能提高我们的工作效率——还能为我们带来欢乐。

相关 [程序代码 幽默 精神] 推荐:

程序代码里的幽默精神

- Qiuwan - 译言-每日精品译文推荐
《科学美国人》(Scientific American) 2011.11.1. 作者:大卫·伯格 (David Pogue).   在使用谷歌地图的测距工具时,你有三种选择:公制,英制,或者“我想极客一把”(I'm feeling geeky). 如果你选择了第三个选项,将会出现一系列测距单位供你选择,其中一些很少用到,比如:秒差距( parsecs 一种天文距离单位), 波斯腕尺(Persian cubits), 还有水立方游池(Olympic swimming pools).

住精神病院不是因为笨 [幽默笑话]

- yuanxinz - 经典网文_来福岛爆笑娱乐网
  有一个货车司机送货到精神病院,当他卸完货准备回家时,忽然发现有一个轮胎爆胎了…….   于是他将那个爆掉的轮胎拿下来,正准备换上备胎时,一个不小心,将固定轮胎的四个螺丝帽掉到水沟裡了,怎么捡也捡不到…….   货车司机不知如何是好………….   此时,正好有一个精神病患经过,就问司机怎么了.   司机想,反正也没有别的事可做,于是就把事情经过告诉他.

冯式幽默

- Justin - 左岸读书_blog
“尊敬的各位领导,各位朋友,各位来宾,Ladies and 乡亲们,想死你们了. ”一听到这话,大家就知道谁上台了,没错,这正是冯巩的口头禅. 如果有人这一生是为笑声而活着,那么冯巩算一个. 至于有人期待他能少装一点,我想是挺难的,真要在大台面上冷嘲热讽,那估计是找“死”. 下面转一点冯式的幽默(下面的一些语段可能出自其他名家,大家不要纠结哟),我坚信懂幽默的人都是在细致体验生活的人——尽管细致生活的人不一定幽默.

android开发异常信息收集程序代码

- - CSDN博客移动开发推荐文章
首先创建全局的Application ,此Application全局通用. CrashHandler crashHandler = CrashHandler.getInstance();//这是收集异常信息的单例类,具体代码请看下文. crashHandler.init(getApplicationContext());//初始化.

365天的幽默哲学

- 石 - 有意思吧
Chow Hon Lam又名Flying Mouse,是一位来自马来西亚的天才T恤设计师兼插画家. Chow以诙谐幽默的方式完成了个人作品集Flying Mouse 365,该作品集每日设计一幅作品,连续365天. 他希望自己的作品能为这个世界带来一些微笑. (编者:春分君也分享了该文,缘分呐...).

校园幽默笑话

- leeong - 河蟹娱乐
老师问学生:“怎么解释‘与人分担痛苦,会使痛苦减半呢’. 小伦回答说:“如果我爸爸揍我,我就揍他的猫. 老师布置了一道题:请用四个字概括自己的长相. 批判主义派的答案有:偶尔正确、惨不忍睹、我恨苍天、我想来世等. 写实主义派的答安有:两栖动物、猩猩他哥、人猿盗版,返祖现象等. 现代派的有:鬼斧神工、问我老婆等.

幽默风趣图片集

- oksing - 译言-每日精品译文推荐
Photography has always been a challenging job and when it comes to humor photography, it gets even more challenging, yet rewarding if done properly. In humor photography, you have to take photographs with correct timing and perspectiv,so that you can create the best shot of the day.

Xbox 360 出现在 Win 8 程序代码里,两人在搞什么暧昧?

- 夕沫 - Engadget 中国版
微软打算将 Xbox Live 做进 Windows 8 里已经不是什么秘密,但「XBOX_360_SYSTEM_CRASH」的字样出现在 Windows 8 的 Kernel Code 里又是怎么一回事. 目前最主要的揣测,是 Windows 8 或许会有某种玩 Xbox 360 游戏的能力,但 Xbox 360 用的是 IBM 客制化的 PowerPC 核心 CPU,所以这点是否能成真还是个大问号.

短小精悍的幽默语录

- Dequan - 译言-每日精品译文推荐
来源The Best Short Funny Quotes Collection Ever. 狗是地球上唯一爱你胜过你爱自己的动物. 一个女人要在生活中爱过一个或两个坏男人,才会庆幸找到了一个好男人. 两种罪恶之中,我总是选择没有尝试过的那个. 首先掌握事实,然后你才能随心所欲地扭曲事实. 上帝可以在六天内创造世界,因为他不必兼容以前的版本.

2011最近出炉的幽默语句

- Dequan - 乐淘吧
讽刺就是即便你甘心当人家的厕纸,人家还嫌你纸软,弄脏了手指,纸硬,擦伤了屁股…. 2、不要总说烂泥翻不上墙,因为即便你是混凝土,没人跟你翻,你还得在地上,有人翻了,不管泥再烂,还是会在墙上粘点模样的…. 3、把你的老板看作婴儿,然后把自己当作奶 子,多给自己点压力,挤出点奶儿,因为婴儿是还不懂得欣赏不会产奶的奶 子的….