Temporary Redirection Plugin for WordPress

When people visit His Story with URL www.wangxiaohu.com, I always want it automatically goes to wangxiaohu.com in order to be consistent. So I wrote this plugin for personal use.

It redirects the current URL to another URL with desired domain name. The source code is here:

The plugin first checks if HTTP_HOST equals $target_host (In my case, it’s “wangxiaohu.com“). If it doesn’t, the plugin simply replaces HTTP_HOST with $target_host and provides a 307 header for temporary redirection.

To install,

  1. Give $target_host a new value
  2. Rename the file to extension .php
  3. Upload it to WordPress wp-content/plugins directory.

WARNING: This plugin is not guaranteed to be problem free. Use it at your own risk.

机器犬大麦

刚刚上网就受到上面发过来的今天 Hamilton Spectator 的一个版面。大麦,机器犬大麦,上了头条。更多的照片在这里感谢摄影师 Peter
大麦的官方名字叫做 AIBO Entertainment Robot,是 SONY 在 1999 年推出的产品。虽然大麦的“身体(hardware)”全是购买的,但是里面的“思想(software)”是我一行一行写出来的。

我是从 2003 年大二结束后的那个夏天开始创造大麦的思想。那时候因为很喜欢麦当劳的 Big Mac,而且麦大简称又叫 MAC,再加上“麦大”反过来也是 Big Mac 的直译。所以大麦这个名字就是在那个时候想到的。那个夏天只是学习如何设计机器犬内部马达的控制,并且初步设计了它行走、站立、坐下的动作。

2004年的夏天,又给大麦加上了视频和音频的传送。虽然它可能不知道自己看到的是什么,但是能够在本地计算机看到大麦看到的东西,对当时的我也是很兴奋的事情。

再后来我大四,然后读了研究生,没有太多时间在大麦身上做更多的改进。不过我时常带着大麦给其他人做了很多演示。包括附近的高中生、一年级的学生和一些朋友。

我知道大麦的功能和很多其他大学同样的 Project 相比,实在是逊色很多。但是因为大麦,我学到了很多别人没有学到的东西,比如 PID Control Theory、音频视频的网络传输、软件的模块化等等。同时也让我认识到我所掌握的东西,确实有很多的不足。大麦可以扩展的功能实在是太多了。希望以后如果有机会,可以有一个更出色的人来照顾它。

昨天的演示,是最后一次带大麦出来。

再见,大麦。

QR Code

If you’ve seen this several times but you don’t what it is, then you should take a look at Windows Live Barcode.

This QR code contains my contact information.

It’s actual name is Quick Response Code or QR Code in short. A QR Code is a grid of black and white blocks and it encapsulates a piece of text information by arranging the blocks into some unique pattern. Then it is convenient to exchange this piece of information by reading it using a QR Code scanner, instead of typing the text manually.

What does the above QR Code say? Copy the URL of it and find it out.

* QR Code® is a registered trademark of Denso Wave Inc.

对《如何准备软件工程师的面试》的补充

参见:http://googlechinablog.com/2006/10/blog-post_13.html

1.使用相同的工具(如铅笔和纸张)和时间限制(例如半个小时)模拟面试训练

模拟面试这样的准备是必要的,但绝对不是充分的。中国有四个字:纸上谈兵。对于没有打过仗的士兵最好的准备就是去打一场仗。对于面试的准备就是面试本身。很多应届毕业生第一次面试,初生牛犊不怕虎,期望值很大,对于大公司的面试思想负担过重。正常的心态应该是,多参加这类大公司的面试,把每一次面试的心得总结成经验。任何面试都是你下一个面试的准备。身经百战,求职沙场上才能得心应手。

2.在面试过程中不要对细小错误耿耿于怀

同意这一点。不过,犯过的错误不等于不要管它。面试中的问题和现实中遇到的问题大同小异。一个公司项目管理中一定会犯各种各样的错误,所谓不怕犯错,就怕不知道怎么弥补。告诉面试你的人,当某种错误出现的时候,什么才是最快的补救措施,什么才是最有效的预防下一次同类错误的办法,一定能给你在面试官的心目中加分。

3.在面试过程中不要失礼

非常同意,但是相反来说不要过分拘谨。《硅谷海盗》就有个人去苹果公司面试一个程序员的职位。他的谈话显然充满了婉转和客套,生怕每一句话都会得罪面试官。然后刚刚创建公司的 Steve Jobs 直接走进面试的房间把光脚丫子放在他面前,问那个人:“Are you virgin?”。有时候过度的客气和礼貌可能会让人感觉到虚伪。软件开发是枯燥的,大的 IT 公司最需要看到的是有活力,甚至有一些 Sense of humour 的应聘者。

4.不要在面试中喧宾夺主

这一点要看怎么理解了。我知道有很多面试官不喜欢一问一答,而是喜欢把面试看成是一种朋友间的聊天。面试是双向的,对方在面试你的才华,而你是在面试对象公司的需要。把你的意见和看法真实的表达出来,掌握面试的主动权,向面试官阐述你对编写代码的激情,或者对某个软件解决方法的不同看法,比那些战战兢兢的书呆子更容易获得面试官的笑容。我试过打断过一个正在介绍测试方法的面试官,很激动地叫他给我一个机会让我把这个测试方法说完,结果我们两个沉浸在这个话题许久。当然,一个 Hello, World 你也要解释半个小时,确实会让人受不了。

5.在回答需要具体答案的问题之时,记得首先要有总括性的发言

同意,而且这是任何情景下发言和谈话的第一要求。需要补充一下的就是,当你发现自己夸夸其谈的时候,尝试每一个间隔都总结一下自己当前所阐述的是之前提到的哪个论点、哪个子主题。你可以谈话很大声,可以很有激情,但是绝对不要忘记自己所阐述的思路和主线。把你的谈话和之前总结的主题相对应,会让人觉得你在谈话方面很有组织能力。

6.(不是特别重要)在面试中要衣着得体,舒适的商务便装是最佳的选择

看不同的公司文化了。微软从大老板创业那个时代就是 T-Shirt 加 Pizza 了,你要是穿的很商务去面试一个 SDE 或者 SDET 的职位,最好自己想一下是不是真的喜欢穿成这样。有人提到 IBM……那是一个商业公司,你说呢?

Stupid Me

Just found that the blocking list in my hotmail account is full of many non-spam email addresses and some of them are even from my friends. I don’t remember why their email addresses are blocked and I am pretty sure it’s really accidental. If you’ve sent any email and heard no reply from me because of this, please let me know and I give you permission to kick my butt for free.

Comments on Microsoft and H1-B Visa

By reading Priya’s post [Technical Careers @ Microsoft] today, it seems that the quota on H1-B visa for working in U.S. this is getting this software giant more head ache. Actually on May 25, 2006, its chairman Bill Gates had already made a statement regarding this issue. I suspect there are many other U.S. companies which are highly demanding on technology professionals are suffering from this problem too.

While there are many talented attorneys at Microsoft are working very hard on many petitions, I am wondering if Microsoft has ever thought about an alternative solution to get smart people without restricted by limitations such as visa quota. Inspired by the fact that Microsoft has settled R&D departments in China and India, an idea has came to me: Why not set up another R&D department in Vancouver, BC, Canada?

By checking a map, we see that it is only 2~3 hours driving from Redmond to Vancouver. This is very different from other R&D departments far away from United States, that the advantage of distance can make the corporate communication very tight. Yes, you are right that Microsoft is well known of long distance collaboration and there are many cases that the developers in Shanghai and Redmond working together seamlessly. But what is suggested here is more of an extension to the headquarter rather than another subsidairy company.

The most important point is that, obtaining a working visa in Canada is much less time consuming than doing the same thing in U.S., which make it a solution to the current visa quota. Intuitively, such change is going to accelerate the overall product development with no doubt. There are many products out there are develop to help the collaborative development, such as its own product Live Meeting.

I believe there must be some other people share the similar idea with me, but certainly I am not familiar with laws and other limitation involved in this idea . So, correct me if I am wrong. =)

Hyper Level Domain

I use del.icio.us a lot. It’s convenient for saving my bookmarks using tags. While there are several other websites provide the same service, such as Windows Live Favorites and Yahoo Bookmarks, one thing of del.icio.us that attracts me is its domain name. The trick is that the word delicious is separated by dots and ended with .us, the country code top level domain (ccTLD) of United States. Its actual domain is icio.us, and it comes with a prefix del.

What is cool?

While they were a huge amount of demands on getting a domain ended with .com, .net, .org and etc, del.icio.us has chosen the naming strategy different from others. There are many other domains like this, such as yan.se, a Shanghai based company that provides services on photo printing. The phrase yan se (颜色) in Chinese means colour, which is exactly what the company has to do with.

In general, domains like these does not care what the suffix domain is originally set for. They are heavily language specific. So let us simply call it Hyper Level Domain. A hyper level domain is not really a domain pattern per se. It is often named based on Top Level Domain (TLD) and might even be Second Level Domain (SLD) based possibly.

What is the market?

Since the concept of Web 2.0 was coined in 2004, people have tried and found many labels for it from different aspects, such as AJAX, Wiki, Tags, Simplicity and so on, and many of them are intended to be eye-grabbing. What hyper level domain can provide, is that it starts grabbing eyes from users by the stage of entering the URL in their favorite browsers. And I really want a domain name of wangxiao.hu !

What is the problem?

To register a hyper level domain, some condition is usually applied. Since the suffix of a hyper level domain can be a ccTLD to a particular country, and thus one needs to go to the domain registration companies of that country for it. The problem is, the domain registration policies in most countries require one to provide an actual address in that country. So I cannot register for my wangxiao.hu unless I have an address in Hungary. By checking yan.se in any WHOIS service, you will find it is actually registered with an address in Sweden.

Another problem is that, when more and more hyper level domains are registered, the ccTLD will probably lose its significance. This is also why the address of the domain owner is required in problem above.

Wh.at hyp.er lev.el doma.in na.me c.an y.ou thi.nk of? 🙂