已不是我(中)

人总要学会审视自己。我给了自己一个月的时间,完全忘记之前开始写这个的初衷,然后现在重新回来读读一个月前的文字,重新回忆后来的日子。7 说名人都喜欢写回忆录,我还不够那个级别;罗永浩说年轻的时候错把创作的热情当作了创作的才华,我也不想让谁误以为我文化自恋。还是那句话,写点东西给一个月之后的我看。扯远了。上回说改变我一生的计划,其实是出国读书。不敢用“留学”这个词,因为这个词太泛滥,没什么内容。

于是在我高中三年级的时候,也就是 99 年的秋天,我又辍学了。我和哥哥离开了深圳的家,去了一个叫做加拿大的小地方。加拿大离另外一个稍微大一点叫做美国的地方很近,因此生活……真正独立的生活,也更加多彩。读了一年加拿大的高中,很用功。一年间也发生了很多很多事情,但不是我现在要说的。也许那天真正名人了一把,再把那些事情写到回忆录里去吧。

不过,有一件事情要提一下。那段时间大家都是家里面送出来的小格格小阿哥,又是成人的转折阶段,所以很多人都在性格上因为环境的影响发生了一定的改变。特别是我,不知出于什么心理喜欢下载一些没有什么技术含量的后门工具加在别人的电脑上。当时用的是 Sub7 ,再配合一些什么 QQ 端口扫描工具,可以很容易地查找出来同一个宿舍里同学们的 QQ 号码。然后作了几次恶作剧,把女孩子们忽悠的一上一下的。在这里我要真诚地道歉,那时候可能真的事心情太乱了,就用传统的男孩子的方法,通过欺负弱小来逃避自己。千万别把这跟黑客挂上钩,用别人写好的工具来耍人,现在想起来都自耻。

后来报大学,也没有什么心情。可能更没有的是信心吧,于是就报了街口拐角的一间大学。想进科学系,但是托福不够。后来来回跑了很多趟系办公室,才勉强过了门槛。大一的课不难,但是隐隐约约感觉到人生好坏也就是这几年就定性了,所以再没有了之前的那种吊儿郎当。全仰仗自小逃课玩计算机的能耐,计算机课期末的时候竟然拿了一个不错的成绩。虽然现在看来,那种计算机入门课简直小儿,但是也让我头一次作了一回尖子生。另外一个原因,也可能跟我那年迷恋上了 Linux  有关。

2001 年,Linus 发布了2.4 版的内核。那时候用的是 Redhat 7,安装在一台从 Seven 的叔叔那里买来的旧康柏上。(借光感慨一下,IT 业界斗转星移,还有谁记得当年的康柏、贺氏这些曾经的名牌?)不过要说第一次接触 Linux 的时候应该是 97 年上高中的时候在某个杂志后面摸出了一张 Turbo Linux 的碟。当时启动以后进入了一个只有 X 光标的奇怪界面,于是便退出了。从大一开始,对 Linux 的热爱便一发不可收拾。什么时候跟同学谈话,只要谈到这个,基本上都会看到对方很不耐烦地表情,因为我总会滔滔不绝。那时候把这个当成梦想,当成信仰,却不知道自己其实在技术上只是一肤浅水。直到很多年后我才知道,真正的梦想和信仰应该是怎样的。

在科学系读了一年大一,我和一个叫做的同学叛逃去了工程系,就读软件工程科。当时的理由很现实:听说读工程系好找工作。实际上一直到毕业,才弄清楚软件工程和计算机科学的区别,不过这是后话。顺便说一下,穗哥是个做事比较认真的人。我得到了很多来自他的帮助,包括参考作业。读书人,没有抄作业一说,大家都是光明正大地互相参考。(孔同学在这个问题上比较有研究,要是有兴趣可以问他。)说实话,大学期间能有几个可以臭味相投的人确实不错,除了穗哥还有 Peter 钱,都经常在我疑惑的时候给与了无数次有质有量的解答。在此谢过。

大二暑假,因为平常自己玩过一些实时 Linux 的东西,所以被一个教授选中在暑假做索尼机器狗 ERS-220 的控制软件。机器狗的硬件是索尼提供的,我的任务只是负责去写一个跟现有商业软件同样功能的可以控制这只机器狗的平台,然后在这个过程中发掘这个机器的教学潜力。当时夏热炎炎,懒得做饭,所以经常以麦当劳的巨无霸;加上大学的缩写又是 MAC,所以我给这条狗起名 Big Mac,中文大麦。反过来读也就是大学的中文简名。后来又得到了新一代的机器狗 ERS-7,负责把写好的代码移植上去(看来我和 7 很有缘分啊)。逐渐地,我感觉到这种平台为本的软件开发模式实在是太浪费人力了。很多组件因为硬件平台不同、语言不同、指令集不同,都要重写。但是基于虚拟机技术的 Java 在语言的选择性上又很单一,所以没有一个暂时的解决方案。那个时候我也注意到了微软的 .Net,但是因为所谓的“信仰”,一直没有正眼看过。

But, something good will eventually happen. (、中、

Why I am not Neo

I just played a first person shooting game. I came across its website, download it and played on several servers set up by users. It was not new for this kind of games. I guess there are hundreds of first shooting games like this all over the Internet. So the name of the game is not important. It’s just the virtual world experience important. I logged on one server which has not only human players, but also bot players. You know what, these bots are so fast, that you can’t catch them at all. They are always chasing you and picking up the nearby weapons.

It just reminds me of one of my favorite movie, The Matrix. It’s just like you are in a world that software are human shaped, you are your-digital-self. How is it possible to fight against a piece of code that is designed to play with you, or kill you in its world I should say. I always imagine myself as Neo in the movie and used to set the screen saver to be those falling characters shamelessly. Apparently I’m not, unless I know the bug of the code and find a way to hack it somehow. Human beings have defects. That are why there are bugs in the software designed by human. If we think about it further that the code is designed by code, then it’s really hard to imagine what will happen if the story of Matrix comes true. How are we gonna win in the machine’s world? A world designed by machines, where the designer machines were designed their parent machines and so on?

Fortunately these haven’t come true yet. It requires hard mathematical proves to show a code designing its child code is possible. For now, it only proves that Neo is not human being in the film. That’s my understanding of the story, that Neo is actually another piece of code to balance the machine world. That gives us the new hope. We are not fast; we are not accurate. How are we going to fight against those bots in the game? One thing and the only thing we can do to win the game, is to design another bot using the so called SDK. We can make it with more robust algorithms, so it’s even faster than the enemies. Hey, we are human, we are famous of making tools, to compensate what we are naturally lacking of.

Actually this is already happening. Think about computer virus and anti-virus software. How are we supposed read the binaries byte by byte to find out which one is bad? Of course not. I am less worry now, even I am not Neo. Here comes my favorite picture of the movie.

没有装字典软件么?

上海的 Windows Live 国际产品组最近正在测试基于微软自己的 Windows Live Agent 平台的 Live Messenger 英汉字典机器人。只要在 Live Messenger 添加 en-cn@hotmail.com 为好友就可以了。这样比我每次都要去某个搜索网站打“fy someword”要方便很多。因为还在测试,所以功能只有翻译一项。如果以后能加入其它的功能,比如输入拼音返回中文,就会更酷了。反馈地址在  http://feedback.live.com/?mkt=zh-cn

找骂

一篇话题很简单的日志,老中看不懂,老洋读不通,你丫中英混着写就高档次了么?要时刻自我批评,警惕浮华主义的滋生。

例子:

一篇话题很简单的日志(Blog),老中看不懂,老洋读不通,你丫中英混着写就高档次(Modern)了么?要时刻自我批评(Self-Criticizing),警惕浮华主义(Ostentationism)的滋生。

如果臭虫数量是表现一个软件的质量的话

刚刚看到驱动之家的一则新闻,说今年一月份以来“家庭服务器版 Windows 发现 2400 个 bug ”。其中 15% 的 Bug 已修正,也就是说有大概还有 2000 个 Bug 未修正。因为我本身就是个 SDET,所以对新闻的真实度不表示怀疑。这个报道也很中立,没有对事情本身做太多评价。基于对事实的尊重,下面是三个开源软件公司及组织的 Bug 数据库地址,分别为 Redhat, Mozilla 和 OpenOffice.org :

  1. http://www.openoffice.org/issues/query.cgi
  2. https://bugzilla.redhat.com/bugzilla/query.cgi?format=advanced
  3. https://bugzilla.mozilla.org/query.cgi?format=advanced

各位看官也不要闲着,请在“ Only bugs changed between: ”下面的起始栏里面填上“ 2007-01-30 ”(月底也算一月份,对吧?),然后在截至栏填上今天的日期。还有,要记得不要把已修复(Resolved)和已关闭(Closed)的 Bug 算在内哦。然后点 Search 按钮,看看返回多少 Bug。我在此不做任何评价。

Let PowerShell to summarize your IM history

(March 25, 2007) Update: Thanks to James Manning for the -passthru parameter to simply the command.

Windows PowerShell, also known as “Monad”, is a cool shell environment to replace old CMD shell under Windows. It is an object oriented shell and it allow easy manipulation of different types of objects interactively. Another advantage is the support of various data structures and formats, such as XML. Just like other good old shells, it also supports piping. The difference is that, instead of text stream, it sends objects through the pipes.

I always want to find out some information about my Live Messenger history. Now let’s see what PowerShell can do with it. In most cases, Live Messenger history is saved under “My Received Files\<Live ID with some numbers>\History” in your Document folder. Now let’s boot into PowerShell and “Set-Location” or ”cd” to this folder. If you type “Get-ChildItem” or “dir” you will see a bunch of .xml files listed.

Alright, let’s first try to find the top 10 friends with most letters:

Get-ChildItem | Sort-Object Length -descending | Select-Object -first 10

At this point, I assume you are already familiar with the concept of piping. Here it gets a list of files, sort it and display the first 10. That’s not too difficult to understand.

Actually those files are in XML format. That’s why it ends with .xml extension. One important XML element in these files is the message. Each message element corresponds to a sentence sent between me and my friend. Let’s see how PowerShell deals with XML files in this case. The following command lists the top 10 friends with most messages:

Get-ChildItem |
ForEach-Object {
    $_ |
    Add-Member noteproperty -name count -value ([XML] (Get-Content $_ -Encoding UTF8)).Log.Message.Count -passthru
} |
Sort-Object -property count -descending |
Select-Object -first 10 |
Format-Table count,Name

It first gets a list of files. For each file, it creates a new object $o. Then it adds the count of messages from the XML file as a property of $o, as well as the name of each file. Finally, it sorts the object based on number of messages and displays the top 10.

Another interesting XML element of Live Messenger history file is LastSessionID. I guess It is the number of chat sessions established by either me or my friend. With a little modification to the previous command, I can know the top 10 friends with most sessions:

Get-ChildItem |
ForEach-Object {
    $_ |
    Add-Member noteproperty -name count -value ([Int32] ([XML] (Get-Content $_ -Encoding UTF8)).Log.LastSessionID) -passthru
} |
Sort-Object -property count -descending |
Select-Object -first 10 |
Format-Table count,Name

A small change is that LastSessionsID is read as a string. So we have to convert it to a integer number using [Int32].

Other XML elements, such as Date, Time and even text in each message, are very informative too, as long as you can explorer them in a good way. Right now, there are other more information I can think of out of my head, e.g. the top 10 longest message you received, the first 10 person talked with you, the longest 10 chat sessions in your IM history and so on.

For updated information and tricks on PowerShell, here is a good resource. If you have used Live Messenger on two or more computers, you might also want to consider this history merger.

Guess who sends the most smiles to me? 🙂

Be confident

This is either a big or a small problem. But it is no problem to understand that confidence is important for one to survive in its group, its industry and even in its life. Some people finds itself lack of confidence but others are not. I am for sure not the latter case. So I want to put myself a little note here to summarize what I brainstormed. and get ready for other suggestions.

So, it all comes to 3 simple questions as follows.

  • What is confidence?

Without directly looking into my good old Oxford dictionary, the first interpretation of confidence that comes out of my head is that you believe in yourself when you speak and behave. You know what you are doing is right and what you are saying is correct. Lacking of confidence, in this case, is that you are afraid to talk and act because the uncertainty exists in your mind. It can be that you are involved in a challenging workplace and everyone seems to be smarter than you. So you are more convinced by others instead of convincing others. I guess this is my current situation.

  • Why need confidence?

You want to grow. Growing needs confidence. With confidence you can ask questions in depth, do certain give-it-a-try works and eventually gain knowledge on what you have heard and seen. Meanwhile, growing means getting familiar with the area you are in, so you will be convincing others more often. The biggest side effect of this is that you get to be even more confident, so the question becomes an answer to itself. It’s like investment that you invest your current amount of money to earn more.

  • How to establish confidence?

One often finds itself confidence in particular area after some milestone it reached in its past. Such milestone can be a diplomas, a certificate or any remarkable award. It proves the skills the holder had in some ways. But that’s not always really true. I just had my road test for driving license last month, but now I am still not sure if I can take a car and give a ride on the express way. It seems like experience plays a more important role in establishing the confidence. Alrite, you take a deep breath and get your feet wet. That’s where experience starts from. Once you are comfortable with it, which means you have a minimum confidence, then invest it. Keep growing it until someone tells you you are over confident. Well, that’s another issue.