We changed the URL of our svn server recently to a new domain. SVN provides a seperate `relocate' command for that, but `git svn' doesn't has such command. After searching on google for a while, many people get this problem before. Method listed here (http://therightstuff.de/CommentView,guid,22ecab83-b7d1-4b48-84d3-2ad7b0cdbc35.aspx) is quite useuful, and I switch to my new svn URL easily.

去年的昨天,我离开了工作四年的IBM,带着少许的遗憾(那个Master Inventor Award 吧)加入了codesourcery,一个我在2006年就崇拜的公司。工作刹那之间发生了巨大的变化,从一名java system developer 到一名真正的toolchain developer。后来发现,巨变的不只是工作,还有我的肚子 :)

要离开的那段时间,被问的最多的问题是当然就是问什么要离开。那个时候,信心满满的说,因为“跟随内心和直觉的勇气”。因为我觉得我在那个时候,对这句话的理解十分透彻。后来发现,我还不怎么理解这句话。这句话是乔布斯说过的,也许只有他那样经历过那么多坎坷的人,才能够明白“跟随内心和直觉的勇气”到底是什么。在后来的工作中,我有高潮也有低谷,一次,偶然的机会,我在低谷中想到了那句话。我重新走出来,好像觉得又明白了那句话。这一年中,有很多时候,我都在思考这句话。

换了新工作后,被问的最多的问题的是,在家办公有多么爽。在家办公,有如下好处,
1 时间自由,
2 衣着随便,

也有不好的地方,
1 十分寂寞孤独。
2 缺乏运动,容易发胖 (比如我)
3 白天在家,经常会收到 “北京中级人民法院传票等骚扰电话”
4 如果不会 work/life balance,很糟糕。你会发现,你没有生活了,因为你就在你原先生活的地方工作。

这一年里边,认识了很多朋友,因为都是一起在开源软件,也很有意思。可能是一年的在家工作,让我和别人交流的机会变少了,现在特别喜欢和别人交流我做的东西。

过去这一年,干了很多第一次的事情,比如写了第一个gcc的patch,或者gdb的patch,第一次去美国,第一次见到了那么多global maintainer,第一次公司被收购等等。

在家办公还有一个好处,就是把你自己处在一个相对封闭的环境里边,人肯能更容易被激发出“思考自己”的动力。在IBM的时候,很少从自己的角度思考,反而容易从别人的角度思考。What should I do if I want to be a band 7/8/9/10?我想这个问题可能在很多人的脑子里边出现的频率和时间都不少。但是,如果在一个在家办公的环境,可能更多的问题是问给自己的,What should I do if I want to make myself happy? 想前一个问题,带来了很多烦恼,想后一个问题,带来的是无限的快乐。

总之,现在看来,一年前那个决定不算是一个糟糕的决定。希望一年比一年好!

I am pretty sure I don't have to express how important and useful of git-svn again. I started to play with it some weeks ago, and git-svn did a good job on everything except checking into svn repository.


In my work flow, usually, I am working on several different stuff in parallel, and my local git tree carries five to six patches. I only send one of them, which I am comfortable with, for review. Once review is done, I will commit this patch to svn repository. git-svn has dcommit command to commit to svn repository, however, I don't find any option to choose a certain commit. So, my painful process is 1) git format-patches, 2) apply approved patch to svn working dir, 3) svn commit 4) git svn rebase in git tree.

I do believe my process is wrong, or at least inefficient. Today, I find something new to make me more comfortable on committing patches to svn repository in git svn.

Usually, all my work is in branch `work', and branch `master' is clean. When one patch/commit is ready to go to svn repository, I can use `git cherry-pick' to pick up the certain commit I'd like to check in. For example, `git cherry-pick work', which will pick the last commit in `work' tree to `master'. Then, this commit jumps to mater tree. Before commit, as required by GNU project, ChangeLog should be updated as well. When it is done, we should merge these two commits into one, otherwise, there are two commits to svn instead of one. `git rebase -i master~2' will help on this, and I can squash the 2nd patch into the 1st one.

Finally, `git svn dcommit' will commit a single commit to svn repository. By the way, if you are not sure what `git svn dcommit' will do, please use `--dry-run' option, which will doesn't nothing except printing out revisions plan to commit.

The question "what optimizations gcc performed on different levels?" has been asked time and time again.

We can check this in this way,
$ gcc -c -Q -O3 --help=optimizers > 3.log
$ gcc -c -Q -O2 --help=optimizers > 2.log
$ diff -u 2.log 3.log
--- 2.log    2010-08-20 13:48:57.000000000 +0800
+++ 3.log    2010-08-20 13:48:51.000000000 +0800
@@ -37,7 +37,7 @@
   -ffloat-store                       [disabled]
   -fforward-propagate                 [enabled]
   -fgcse                              [enabled]
-  -fgcse-after-reload                 [disabled]
+  -fgcse-after-reload                 [enabled]
....

As the "clean room" policy proposed by my wife, I bought a USB wireless card for my machine, and cost me nearly 4 days to set it up under Ubuntu.

After a long time googling, this post helps me a lot...
http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=218120&start=15

After followed steps in this post above, it still doesn't work. Then, I upgrade my ubuntu 9.04 o 9.10. Everything works well.

skype on Linux

After fight with skype on Linux for one day, I can talk with someone else over skype.

Add source in /etc/apt/source.list

deb http://download.skype.com/linux/repos/debian/ stable non-free

sudo apt-get install skype

Then, I can log in and chat over skype however, the skype doesn't work well with mic. After a long time googling,

http://ubuntuforums.org/showthread.php?t=1416539

This fix the problem of voice.

It is surprise to me that Gmail can show sender's connections on linkedin.  It is funny...

Older Posts