2007年4月30日星期一

Last Day of the Iteation

Yesterday is the last day of an iteration on CIY. Nate was unhappy because we still had 4 stories uncompleted and they were not likely to be completed in a single day, but no one talked to him on this before. So we had a postmortem before the stand up meeting. Here is the result of our discussion:
  1. know when the iteration ends
  2. think about work, talk, set boundaries and enforeces
  3. standup is good time to realize features needed to be adjusted
  4. stand down meeting
  5. have intentional non pair work
  6. internal story controls (posties)

2007年4月27日星期五

SCIM

To get SCIM work correctly, these packages are needed:

$● as scim|grep ^i
i libscim8c2a - library for SCIM platform
i scim - smart common input method platform
i scim-chewing - Chewing IM engine module for SCIM
i scim-chinese - SCIM 的智能拼音输入引擎 (过渡包)
i scim-gtk2-immodule - GTK+2 input method module with SCIM as bac
i scim-modules-socket - socket modules for SCIM platform
i A scim-modules-table - generic tables IM engine module for SCIM p
i scim-pinyin - smart pinyin IM engine for SCIM platform
i scim-qtimm - SCIM context plugin for qt-immodule
i scim-tables-zh - Chinese input method data tables for SCIM

2007年4月25日星期三

failed to initialize HAL

I may have done something, but I couldn't remember. From last night, each time when I logged in, Ubuntu popped up an error dialog saying failed to initialize HAL.
After I searched on the web for sometime, I finally came up with a solution:
  1. cd /etc/init.d
  2. sudo ./dbus stop
  3. sudo ./dbus start
  4. sudo dpkg-reconfigure hal
Now it works.

PS: It doesn't work at all. The final solution is:
ls -l /etc/rc*.d/*dbus*
if there is any "S*dbus -> ../init.d/dbus" other than "S12dbus" under /etc/rc2.d/, delete it and recreate it:
cd /etc/rc2.d
sudo ln -s ../init.d/dbus /etc/rc2.d/S12dbus

2007年4月24日星期二

Benefits of Pair Programming

Without Nate, the number of programmers in the company is odd number, which means that there is always one person having to do solo programming. This misfortune fell on me since last Friday. I programmed alone for the most of the on last Friday and Yesterday, writing Selenium test. With no one to review my code all the times, every typo and misuse can only be found at run time, because there's no compiler to check my source code. Sometime such errors were very hard to find out all by myself and I wasted a lot of time on even very silly mistakes. Once I try to run Selenium tests, it reported errors. Then I tried very hard to understand the error message, until I found it impossible for me to figure it out, and I called Philip for help, only to find that I forgot to start the web server!
With no one on site to discuss, it was not easy to come up with a solution when I experienced some difficulties. Meanwhile, with no one to switch the keyboard back and forth, thinking and typing the code alone for 8 hours a day, I fell very tired. I drank a lot of coffee, and sometimes I had to put some cold water on my face to keep a clear mind.
After spending last 3 hours on Selenium tests, I finally completed that task. With Philip's pairing for about one hour, we eventually found out how to test the element generated by Ajax using XPath, which had been pending through the weekend. Two people working together is so full of ideas!
Then I moved to pair with Paul on the task about velocity tracking. After we implemented the functionality and passed all the tests, we started to refactor. There is a piece of code which can well exhibit the benefit of pair programming.
I am still not quite familiar with Rails, comparing I am with SQL, so I wrote that code like this (Let's called it code portion 1):

task_sessons = TaskSession.find_by_sql("select ts.work_date, ts.user_id from task_sessions ts, tasks t, stories s where ts.work_date between '#{start_date.to_time.to_s :db}' and '#{target_date.to_time.to_s :db}' and ts.task_id = t.id and t.story_id = s.id and s.project_id = #{project_id})

And followed by another piece of code which had been written by Paul (code portion 2):
unique_entry = Hash.new
for x in task_sessions do
unique_entry[[x.work_date, x.user_id]] = 'A'
end
puts "using hash: "+unique_entry.length.to_s
return unique_entry.length

It worked. And I was about to commit it. Because Paul had some errands, Philip came to pair with me instead. He thought that it was not good to put such a long SQL inside Rails. And I was eager to know how to rewrite it in Rails way. Then he showed me:
task_sessions = TaskSession.find(:all,
:select => "task_sessions.work_date, task_sessions.user_id",
:joins => "join tasks t on task_id = t.id join stories s on t.story_id = s.id",
:conditions => "work_date between '#{start_date.to_time.to_s :db}' and '#{target_date.to_time.to_s :db}' and s.project_id = #{project_id}")

And he also think code portion 2 smelled not good enough. So he suggested to use the class Set instead. Then he went away for some errands. I did some investigation on Set API, and rewrite the code portion 2 using Set. But it failed. Then Jordan came. He said that we did not need to use Set; Array had already had a method uniq to delete those duplicated element. Then we tried, it also failed. At this time, if he left, I might have continue to investigate Set and Array API to find out the problem. But then he suddenly came with a great idea. This is the result of code portion 1 & 2:
task_sessions = TaskSession.find(:all,
:select => "distinct task_sessions.work_date, task_sessions.user_id",
:joins => "join tasks t on task_id = t.id join stories s on t.story_id = s.id",
:conditions => "work_date between '#{start_date.to_time.to_s :db}' and '#{target_date.to_time.to_s :db}' and s.project_id = #{project_id}")
return task_sessions.size


It is much shorter then before, and it is more clear now.

2007年4月22日星期日

Install Ubuntu

The iso file should be downloaded first. Then it is important to do a md5 check. In Windows, winMD5Sum is needed to do the check, which can be downloaded from
http://www.nullriver.com/index/products/winmd5sum
I first planned to install from hard disk.
Since I have already had a grub installed. Here is the steps after enter grub command line:
grub> kernel (hd0,4)/vmlinuz root=/dev/ram ramdisk_size=32000 devfs=mount,dall

grub> initrd (hd0,4)/initrd.gz

grub> boot
See also:
http://my.opera.com/bloodmelon/blog/show.dml/284393
For more info about initrd and ramdisk, see
http://firenet.ik8.com/doc/rd.html
Ubuntu is strange; it did not let me to select iso file manually, instead, it scanned to hard disk automatically. However, it was not capable enough to find that image. So it prompted me to insert CD over and over again. I went insane.
So I burnt the CD. Start from the CD, I first chose to manually partition the disk, but later I found that I didn't know how to. So I exit and deleted the partition of Fedora using PQ Magic. Restart the installation again, and this time I found there was an option create partition on the largest continuous free space, so I chose it.

2007年4月21日星期六

grub

After entering
grub>

There are two commands need to install grub onto MBR

grub>root (hdX,Y)
grub>setup (hd0)

X and Y represent the disk and the partition where Linux is located.
setup install grub onto the first disk's MBR

NVIDIA GeForce 4 drive

NVIDIA has stopped supporting GeForce series graphic card in their new driver. We can only use the legacy drivers. There are 2 drivers needed, which are in livna repository: xorg-x11-drv-nvidia-96xx and kmod-nvidia-96xx. The latter depends the former

vi commands


run level

To change run level, edit /etc/inittab, using vi.

2007年4月6日星期五

"concern" about velocity

I made a mistake. The velocity is calculated in terms of stories, not tasks. I was quite concerned with the accuracy of velocity calculation, because there were always someone forgot to estimate tasks before starting them, and there were some tasks being marked as completed, but costing "no" time. I sent email to the administrative group saying that this will affect our velocity calculation. Later, with the reminder of Philip, I realized that they only affected the assessment of our estimation.
Philip told me about a suggestion from Nate. Nate said that we had to go off the computer to plan before we started coding. We had to think what we wanted to do, and then consider how the computer could help us, instead of writing a program first, and thinking how we could use it.

2007年4月4日星期三

Start to pay attention to management

I've got to start to pay attention to management now.
Nate has gone away for two days, so does our stand up meeting every morning.
AgilePlanner has become more mature, I can keep track of the progress from it. But there are still things not so desirable, perhaps I need to write down thing from the white board.
On planning game, we assign stories and tasks to engineers. But what should the engineer responsible for the story or the task do with the story or task? It is still a question worth investigation.

2007年4月2日星期一

Velocity

The velocity of last two weeks was much faster than before. One reason is that we worked on AP these 2 weeks. For most of us, except Nate and me, we worked out AP from scratch: we are more familiar with it. On the other hand, we switched pairs less frequently than before. One pair kept working together until their finished the task on hand. As a result, one spent less time in training his partner before the partner can do creative work.
For better tracing everyone's work, we make it a rule to write the story number, task number of the task and start and stop time every pair work on on white board, because there are always someone forget to enter their time to the google spreadsheet. Writing on the white board make it possible for others to enter to the spreadsheet instead.
A new release of AgilePlanner is deployed. The new release make it easy to keep track of the development velocity. I will pay more attention to it from now on