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...

Patents

Here is a list of patents, in which I am one of the inventors.
http://www.faqs.org/patents/inv/155131

twhirl is a very fancy twitter client, however it does not have proxy settings.  Most of the people setup twitter API proxy on google appengine, however I failed to request an ID of google appengine. :(

After googling, I found a simple way to use proxy, and twhirl works for me every well, except a little slow.

HTTP_PROXY=xxx.xxx HTTP_PORT=80 ~/twhirl/bin/twhirl

Conforence

Recently, I google'ed some conferences about my work,

Automated Software Engineering Homepage http://www.ase-conferences.org/
International conference on Automated Software Engineering
http://soft.vub.ac.be/ase2010/program/workshops
International Symposium on Software Testing and Analysis http://selab.fbk.eu/issta2010/index.php
Internal conference on Software Engineering http://www.sbs.co.za/ICSE2010/
Workshop on Program Analysis for Software Tools and Engineering. http://cseweb.ucsd.edu/paste2010/program.html

Recently, we are writing paper for some conference.  In order to collaborate with other people, we choose Word as the editor, because it is easy to track changes and comments.  Finally, we decide to move to latex, some figures in Word should be 'ported' to latex.

Here is a process of port figures in Word to Latex easily,
1.  Print Word document to pdf file
2.  Convert PDF to PS.  In Linux, pdf2ps can do that,
3.  In tex file,

\begin{figure}
\includegraphics[trim = 0mm 110mm 0mm 60mm,width=3.5in,clip]{figure1.ps}
\caption{Implementation architecture}
\end{figure}

Then, the figure in Word is ported to latex.

MetaUML

By accident, I found MetaUML which can draw UML diagram in MetaPost way.  It is pretty cool...


It is simple and can be inserted in my latex paper easily.

PLDI 2010

First of all, my paper is NOT accepted in PLDI 2010.

I am excited to see that there are many Chinese authors in PLDI 2010, and one paper is from ICT.  I am proud of them.  I also find some paper is done by IBM research, proud of them also.

There are some paper interest to us,
Adversarial Memory For Detecting Destructive Races
Cormac Flanagan (University of California, Santa Cruz), Stephen N. Freund (Williams College)
Decoupled Lifeguards: Enabling Path Optimizations for Dynamic Correctness Checking Tools
Olatunji Ruwase (Carnegie Mellon University), Shimin Chen (Intel), Phillip Gibbons (Intel), Todd Mowry (Carnegie Mellon University)
Pacer: Proportional Detection of Data Races
Michael D. Bond (UT Austin), Katherine E. Coons (UT Austin), Kathryn S. McKinley (UT Austin)


You can see more paper in here


Got an error on IBM Jre,

Thread "main" java/lang/IllegalAccessError at Lock$Sync.get(Lock.java:4294967295)

However, I still don't know what is wrong in my instrumented code.  Then, I switch to Sun Jre,

Error occurred during initialization of VM
java.lang.IllegalAccessError: tried to access field IdImpl.ID from class Lock$Sync
        at Lock$Sync.get(Lock.java)


This error message is very clear, and easy to understand.  This error is cause by a copy/paste.

I write an ant script to update jar file, and it works well on Linux.  However, when I run that on Windows machine, I got a strange error "unable to rename old file".

My script is like this,
<jar destfile="foo.jar" basedir="${dest.dir}" includes="Provider.class" update="true"/>
<move file="foo.jar" tofile="bar.jar"/>

In this snip, I want to update foo.jar with Provider.class, and rename it to bar.jar.

After some search, I fix this problem in this way...
<jar destfile="bar.jar">
      <fileset dir="${dest.dir}" includes="Provider.class" />
       <zipfileset src="foo.jar"/>           
</jar>

Technorati Tags: ant


It is always difficult for me to remember so many system password.  I got such error messages when attempt to login to an AIX for 4 times,

3004-303 There have been too many unsuccessful login attempts; please see the system administrator

After some googling, I found it is a question frequently asked question.  Many other people can't remember password either, :)

Type the command below in shell as root,
root@aix:/ # /usr/sbin/lsuser -a unsuccessful_login_count <username>
username unsuccessful_login_count=4


Then reset the counter with chsec

root@aix:/ # /usr/bin/chsec -f /etc/security/lastlog -a unsuccessful_login_count=0 -s <username>

Technorati Tags:

After Fighting with "Windows Live Writer" nearly two days, I migrate to ScribeFire.  It is pretty cool.

SWTBot is a very good toolkit for SWT GUI testing, and we use it for some times. However, one trouble we encounter is about running SWTBot test cases by ant. Always got different kinds of errors.

One tip is remove org.junit_3.* from plugins folder of eclipse, so that force eclipse to launch test cases by Junit4.

Today, I write gnuplot scripts to generate some figure for my paper. 

set xtics ("Home_Page" 1)

I found that underline is not produced as I expected.   I add a "\" before "_" like this,

set xtics ("Home\_Page" 1)

but it still doesn't work.  Not found any glue on google on this problem.  I add another "\" and have a try.

set xtics ("Home\\_Page" 1)

It works! :)

Today, I am writing a presentation, and want to draw some fancy charts.  I find freemind by google.  Even freemind wiki page gives sufficient instructions on how to install freemind on Linux, I still couldn't find anything on yum installation.

Create freemind.repo in /etc/yum.repos.d

[freemind]
name=FreeMind
baseurl=http://eric.lavar.de/comp/linux/rpm/noarch
enabled=1
gpgcheck=0


Create jpackage.repo in /etc/yum.repos.d

[jpackage]
name=JPackage
baseurl=http://mirrors.dotsrc.org/jpackage/1.6/generic/free
enabled=1
gpgcheck=0


yum -y install freemind

Newer Posts Older Posts Home