Chen Yangjian's Blog

Carpe diem - Seize the day

你会在你的软件里头加彩蛋么?

| Comments

我原先并不知晓复活节彩蛋,然而因为以前 Office 里头的胡万进印和 firefox 里头的 about:mozilla 圣经你也用 fx?点击一下看看吧,我对这一词汇并不陌生。即便我所理解的意思与它的本意可能天差地别。

如果给你那个机会,比如说假设你是一个很牛鼻的程序员,手头上刚好有个很牛鼻的项目,该项目将会引发业界地震,绝对是杀手级应用。你会在那个程序里头加彩蛋么

加彩蛋比较牛鼻的是像米开朗基罗那样,即使是顶风作案,也要给每个自己的创作签上自己的大名,虽然没有自恋到如蔡智恒,签满一卷卫生纸。效果可能也就是被人发现,然后乐呵一下。然而有个[关于 Apple ] 的彩蛋则结实地让彩蛋风光了一把。

有个米国本土山寨抄袭当时的苹果II代,抄得比较狠,很文档都照抄,甚至有的地方名字还是 Apple。Apple 愤而告之,该山寨抵赖,于是有观众上前说让他敲几个键就能见分晓。结果出来一 Apple© 标志。

8过今天比较晚了,我就不聒噪啦。我的态度比较倾向于 kaladorn 的回复 以及对该回复的回复:

Some of the responses in this thread make me think a lot of the folks responding either don’t do contract software development for a customer, don’t work on any sort of mission critical software, or aren’t terribly mature.

An easter egg is: a) extra code that could introduce a new bug (accidents happen, even in easter eggs - I’ve seen a screwed up easter egg crash a program and leave the machine locked up) b) something that is not part of requirements and if caught during client code reviews or after installation, would put your employer in a complicated position since your spending time on such an unallocated task could basically be considered a form of fraud if the client is paying for your services c) a sign of vanity - professionals do the job, do it well, and move on, not write silly-ass amateur crap just to amuse themselves and stroke their egos d) something some other poor software engineer might have to fix or remove and they might not find so darn funny

A professional should take satisfaction in a job done well.

Do civil or mechanical engineers leave easter eggs? Do nurses? Do doctors? Grow the hell up… people bitch about software folks never being given the same respect as other engineering fields and it is the attitude of the average programmer that has a sizable part in explaining this.

Would you want your doctor leaving an easter egg? Would you want your dentist? Or would you find it funny if your phone dialed random numbers on some developers birthday? Or if your traffic light flashed all green every summer solstice? I think not.

I suspect the gulf here between those respondents who manage programmers and deal with clients or who work in any form of mission critical software or professional services and those who write shrink-wrapped software or less critical applications when it comes to easter eggs is probably sizable. All it takes is seeing a co-worker having his ass kicked because a manager had his chewed off by an angry client to understand that, in professional environments, this kind of stuff doesn’t fly (and shouldn’t).

You’re not paid to be an artist. If you were, they’d cut one copy of your code and display it up in a museum. You’re paid to implement requirements as defined by your employer and possibly your customer. When you aren’t doing that, you’re basically screwing the pooch and exploiting your employer. Some may feel justified doing this, but that’s a crock. If you don’t like the job, GTFO. If you do like the job, be a professional and leave the high-school hijinks behind.

(And yes, I’ve worked for 15 years in mission critical software for the police, the military, air navigation training systems, cell phone portals, VOIP and call processors, HR systems, and so on, so it does colour my view on easter eggs…)

顺带一个笑话娱乐一下:

I worked with a text editor in college where upon triggering an unlikely error the user was prompted with the message:

“Are you A) Blind or B) Stupid?”

The user had to pick one to continue.

维基百科不适合学术界的四个理由

| Comments

说到维基百科大部分人都能想到自由、开放之类的词汇,少许人也许会对另一个更为实际的词汇较为熟悉 —— citation needed(请指明出处)。所以 MIT 的计算机科学家 Scott Aaronson 列举了如下关于维基百科不适合计算机理论科学研究学术界的 四个理由

‘we’re used to (1) putting our names on our stuff, (2) editorializing pretty freely, (3) using “original research” as a compliment and not an accusation, and (4) not having our prose rewritten or deleted by people calling themselves Duduyat, Raul654, and Prokonsul Piotrus,’

我们(搞研究的)喜欢:将自己的大名署到研究成果上,其一;编辑风格比较随意,其二; 将“original research(原创研究)”视作褒奖而非指摘,其三; 不让自己的成果被一些叫做阿猫阿狗的人更改、重写甚至删除,其四。

有评论建议:

One commenter suggests that professors should encourage students to improve the Wikipedia articles about topics they are studying. ‘This will help them understand the topic and at the same time improve Wikipedia.’

专家学者们应该鼓励学生们去提升他们正在修习的研究方向在维基上的相关条目的质量, “这将帮助他们理解自己的研究方向,同时也能够升华维基百科”。

夜杭州

| Comments

下午本来想去买 iTouch,被告之没有大陆行货了,只有港行,于是放弃。后来索性趁便去找九九杀时间,晚饭去公元大厦的外婆家奢靡一下,领班把我们的饭钱算错了。黄昏的时候在黄龙边上晃悠给人的感觉真是不错,最近这几天杭州的天空都很配合地蓝。茶足饭饱之后本来想回家,发现没零钱坐公交,工作了之后又变得抠门许多因此不想打的,于是又去找翔仔杀时间,顺便去摸摸他的吉他。当时我还在教工路口给俩温州老乡指路(天哪,路痴给人指路,你能想象么?),而翔仔家在文二路益乐路口那边。一时冲动,我决定走过去。久住三墩,文二文三的奢靡已经让我感慨万千。路径枫华府第时,看着屋顶那一排排风骚的灯,看着临街的许多即将开张与已经开张的商铺。使我深深地觉得嘲讽那些削尖脑袋往市区挤的人们的行为是多么可笑…… 他们确实有他们的动力。

而我呢?我的想法依然如旧,就是没有想法。一没钱二没娘们,愁房子干啥。PS:《弹指之间》ms是本还不错的书,有空还得上他那儿去拷教学录像。他的吉他太一般啦……

今天照旧贴个囧视频,造机器人的中国农民:

最近二三事

| Comments

这周在公司没干什么正经事,天天琢磨 flex 算是为新项目的开发做准备。厚客户端开发的难度就是 debug 比较困难,写 JavaScript 的时候除虫的方式要么 ws 如不停 alert(); 要么繁琐如加个调试用 div,正式发布的时候在注释掉。flex 的官方 IDE,基于 Eclipse 的 Flex Builder 支持 swf 调试,算是一个解脱。其实 JavaScript 的开发在 Chrome 与 Firefox 中都不算是难事了,前者 V8 自带了调试 Console,后者有个牛鼻到不行的插件 Firebug。Firebug、GreaseMonkey、Stylish 是我至今留着 Firefox 的三大理由。

说回到 flex,要在 Flex Builder 里头进行调试除了加断点写 trace() 之外,最终要的是需要安装支持调试版本的 flash player,官方都有的下的。我被这问题烦了一天多,最后的解决方式就是装这个+不要用 firefox 打开项目。

白天没干正事儿,晚上就琢磨吉他玩。自从上周妙子帮我调好了音并教了我 CDEFGAB 之后,我就能开始谈些熟记心中的儿歌了,比如两只老虎啦,比如叮叮当啦。为啥会熟记?因为去年这个时候偷得半日闲在家闲晃的时候我表妹教我弹钢琴,就记住了几首。在我记住的歌曲里头最入流的,就莫过于简化版本的祝你生日快乐。本周二的时候在吉他上也算是会弹了。

然而,弹弹儿歌只能哄小孩玩,要骗到花姑娘我还得加倍努力,所以我到处看视频到处研究教程,目前的第一个五天计划就是爬格子。

我的小拇指太短了…… 火起来以后不练吉他不玩 emacs。

[ping.fm]让世界知道你的郁闷

| Comments

我们生活在的年代如此神奇,就像悖论一般。我们消耗越来越多的时间在各种各样的社交网站上, 国外如 Twitter、Facebook、MySpace,国内如开心网、校内网、豆瓣 (你还觉得她只是书影音只是评论么?),yo2.cn 也一直在致力于将博客用户链接起来; 而我们又越来越因此宅在家里,更新自己在这个社交网络上的状态,评论朋友在另外一片天地的新动向。 Leonard 说他的交际圈太狭窄,Sheldon 很骄傲地说自己在 MySpace 上有 200 多个好友, Leonard 又说事实上你一个都没见过,Sheldon 又说,这正是她的美丽之处。

真的么?

不过我不想质疑不想探究,我只是在自己进一步泥足深陷之余请求菩萨原谅。 今天我花了两个钟头差不多的时间,用 ping.fm 把新玩意 Twitter 和老家伙 Facebook、Gtalk、 豆瓣串起来, 在那片摸不着的世界里头扎得更深了。Twitter 的广告说,对这个世界来说, 你不上 Twitter 你就是零,你也可能从来就没有存在过。广告如下:

Twitter 支持通过短信更新,她自己不收取费用,不过作为吸血大户之一的中移动收取的短信费就贵了, 一条一块钱。所以带着我一定要在这世界上留下什么的怨念我又注册了国内的饭否, 也能短信更新。这两个都属于微博客(microblog)的范畴。

那么关 ping.fm 什么事呢?引用 est 的 ping2douban 项目页面的翻译:

Ping.fm 是一个多(微)博客同步更新网站,能帮助用户快速更新自己的多个博客或微博客(microblog)。

所以,只要你注册了,将 ping.fm 的 Google Talk 机器人加到你的账号,将你的一干 SNS (Social Network Software/Service) 加到 ping.fm 的势力范围。跟机器人一说, 你就会有一种神奇的感觉,整个世界都在更新,整个世界都能知道你的喜怒哀乐。

只用键盘左手区块能打的最长的英语单词是什么?

| Comments

键盘左手区块是指 Qwerty 键盘布局的左手输入部分,即 T/G/B 三个字符(含)左手边的所有字符 ([asdfgqwertzxcvb])。以往的共识是最长能输入的是女管家们(女仆控不要慌),stewardesses。然后有个闲人用 grep 命令加 /usr/share/dict/words 暴力搜索,结果出来一个更长的 devertebrated。有意思的是,在 Chrome 的输入框单词检查中 devertebrated 被认为是错误的。感兴趣的可以试下:

grep ”[asdfgqwertzxcvb]{13,}$” /usr/share/dict/words

也有好事者试了下 Dvorak 布局的键盘最长单词。

grep -i ’[pyaoeuiqjkx]{14,}$’ /usr/share/dict/words

终于有个脑子清醒的说了句人话

[Microsoft]原来曙光跑的是 Windows 啊

| Comments

曙光我所知不多,以前在初中社会科学书上、高中计算机课本上ms有所接触,讲完 Clay 巨型机就讲到tg现有的巨型机曙光某某之类。刚才去该网站上看了眼,不小心看到丫助纣为虐并洋洋自得:

Arming the “Golden Shield” project with comprehensive IT technology

不过人为财死鸟为食亡嘛,揾食啫,前几天看都市快报说丫进了 超级计算机 08(Super Computer 08)的前十名,敬陪末座,很是了得。还是很为它开心的。不过今天有在 Slashdot 上看到消息说丫跑的原来是 Windows HPC Server 2008。虽然没有当时我就震惊了那么夸张,还是小惊讶了一下。以前常有玩笑说配一16核玩扫雷合适,这新闻也让我幻想在该神机上玩蜘蛛纸牌会不会流畅一点。

其实我对微软没啥特比抵触情绪,最近在铂程斋看到一篇对微软亚洲研究院的赞美,也会悠然神往。这年头,号称民族企业、更懂中文的鸟公司都靠不住,多个外国公司让你盗版只是偶尔吓唬你一下也就无所谓了。

[firefox]Mozilla 基金会与 Google 又签了三年

| Comments

Mozilla 靠着 W3C 撑场面很久了,以年收 6kw 美刀的业绩来说,确实不容易。而这 6kw 中 88% 来自现在的 Chrome 发布者 Google。合作伙伴变竞争对手,倒是没有反目。最近大佬 Google 给了小老弟 Mozilla 一个大拥抱,三年合约,2011 年 11 月到期。所以最近有发布了中国特别版百度搜索谋智火狐浏览器,简称山寨火狐的 Mozilla 基金会又多了三年不必担心到哪揾食。我特有一种 Sheldon 嘲讽 Leonard 的感觉,“I’m throwing you a bone. And you’re welcome.”

[Google]Lively 年终将关张

| Comments

Lively 是 Google 新近推出不久的一项 3D 虚拟交际世界, 我的理解就是网游版 second life。该业务开放不久就有负面新闻说,色情聊天室横行。 今天在 Slashdot 上看到消息说 Google 在 Lively 的 官方网站博客 上发布了即将关停的消息。