- The Beijing Olympics began on the 8th.
- I came back from Tallinn on the 11th and was pretty much a busy bee till now.
- I bought my Trek 7.3FX on the 24th and has been cycling like a mad man since.
- I have started playing badminton again and its really fun.
- Another big change in Malaysian politics on the 26th: Anwar Ibrahim wins the Permatang Pauh by-election and gets back into Parliament after almost a decade.
- There was a company birthday party on the 29th (actual birthday is supposed to be 31st, which is incidently Malaysia's Independence day).
- And I fell for someone on the 31st.
Daily Routine: Music and Podcast over iPod, Mandarin over the Toilet Bowl and Exercise over Stairs
Random Thoughts, ExowebI've sort of created a routine lately while in Tallinn. Obviously, most of my time is spent hacking and doing some computer related stuff so that hasn't really changed much.
But since I am in Tallinn by myself, I've been spending more time listening to music and podcasts using my iPod. In fact I've been more routinely watching video podcasts such as Geekbrief, Rocketboom and Macbreak. I watch them during intermissions and I get to maximize my time while walking to the office or waiting for food. And in Tallinn, you wait for food.
I am quite happy that FLOSS weekly (or some they claim) is back more regularly and able to hear lots of interesting open source related stories. On the other hand it was sad to hear that Lugradio has ended. Lugradio guys are really funny.
And while in the washroom, I find myself reading my book about chinese characters. I have been learning a bit more (and forgetting) chinese characters. So another good way to spend your time. My favourite character so far is fen 分 radical, which means "divide". There are many words that uses that radical like 吩 (instruct, order), 纷 (disorderly, confused) and 份 (portion, share) and its pretty simple to remember these words by breaking it down to its different components, such as 口 (mouth), 丝 (silk) and 人 (people). It was really enlightening.
And another thing that I've been doing a lot more is climbing the stairs. I moved to a new apartment recently and this building's elevator will be turned off at midnight. And because I've been going hone a bit late, I have to climb up 17 floors. Yes 17 floors! And I did that for like 1-2 weeks before I came to Tallinn and I've been mostly climbing stairs since. I have turned this punishment for going home late to be something beneficial to myself: A bit of exercise every day, in sort of a not so intrusive way. And it only takes 2-3 minutes to climb up 17 floors. Okay I climb 2 steps at a time and I am kinda always racing for time. But life is more fun that way! ![]()
Almost 2 weeks ago I was in Vilnius to attend EuroPython 2008. It was my first time in Vilnius and first time to attend a conference about Python, which is the main programming language that I've been using for the past 2 years of work at Exoweb.
It was interesting to meet so many people that are also using Python everyday in their work and projects. In the conference, I met up with Greg and Tomasz, who's Greg's partner in crime in the software business. They are part of Enpoka that is doing outsource software development. I also met up with Tobias, who drove all the way from Tromsø to Vilnius so that he can fix his car in Riga, its more than 2000+ kilometres, pretty crazy!
I attended some talks on Jython and PyPy. I have to say I am pretty impressed with how far Jython has come (and only recently realised the state of development of the JVM in the dynamic languages world) and the grandiose plans for PyPy.
The day ended with Guido's keynote but it was done through video conferencing and I guess it wasn't to the best effect. It was regarding Python 3000 which I've heard at least twice so far.
The next day started with a talk on a tool to visualise relationships between Python objects and duplicate code finder a.k.a CloneDigger. I listened to a talk on LEAN software development by Steve Alexander of Canonical but it was a bit too vague to me, although I thought his approach of using photographed stickies as slides was cool. There were some good talks of Python's more advanced topics (descriptors) and the internals of some of the standard data structures we use everyday like lists, dicts and sets.
I attended the Cython talk but I was getting distracted hacking away with Greg on using greenlets with twisted. Both of us were not so happy with the deferred style of coding asynchronous servers in twisted and wanted to find a more manageable approach. We have a pretty simple prototype and I would want to apply the same idea to a larger code base
.
The day ended with a keynote by Hans Rosling, who I admire quite a bit due to his great TED talk he gave. He is more impressive live and I truly enjoyed his talk although it wasn't much about Python. There were some lightning talks before the keynote and the one that I can remember very clearly is gSym, which is a python editor that visualises your code in different ways such as mathematical formulas and lisp style.
For the last day, one of the highlights was a talk about hacking your dna with the amazon cloud. I talked a bit with Mike the DNA hacker and learned quite a bit about his travels in South East Asia which were pretty cool. After the hacking on greenlets and twisted, Greg decided to hold an unconference session on it to discuss about it. Tommi, who knows quite a bit about twisted gave some good insights on the greenlet+twisted approach which is that although it works its dangerous.
There is a lot of material that I would like to catch up on but I haven't found the time to really dig into it. I really enjoyed the conference and thought it was a good chance to learn a few things and meet similar minded people.
I managed to meet briefly with some Django contributors and Jim Baker who's working hard pushing out Jython 2.5. He says he'll be in China in September, maybe he'll come over and give a talk on Python and Jython. I am kinda interested in Jython myself and have been submitting some bug reports, hopefully its useful for them
. I was not really ready for the Django sprint and spent a bit of time looking into Django new forms admin. At least I learnt a bit about the new branch that will go into 1.0 soon.
I have bookmarked some of the more interesting stuff I learned from the conference in del.icio.us and also took some pictures while sightseeing.
I have more to say, ok maybe not. Over! ![]()
It would be so much easier to use "bridged" networking but sometimes it doesn't work properly with some wireless setups and we have to use NAT instead. But one problem I had was to configure the setup so that the host machine can access the guest machine easily.
I don't do this very often and I remember that I have to spend quite a bit of time searching the web to find the answers I am looking for. So I am going to write a bit about this so that it might help someone (or even myself) in the future.
At Exoweb, we do a lot of our development on the Debian distro so I have a VMWare Fusion virtual machine running Debian Etch. I want ssh access to the machine but how am I going to connect to it? You need to configure the natd that is running on your host machine, (in my case its the Macbook Pro) so that you can connect (ssh) to the guest machine that is connected to a virtual network created by VMWare Fusion.
Run the following command in Terminal, and you should get some similar output:
silviana:~ cheeming$ ps aux | grep vmnet-natd
cheeming 43558 0.2 0.0 75492 392 s001 R+ 12:54PM 0:00.00 grep vmnet-natd
root 38501 0.0 0.0 75924 312 ?? Ss Fri05PM 0:04.05 /Library/Application Support/VMware Fusion/vmnet-natd -c /Library/Application Support/VMware Fusion/vmnet8/nat.conf -m /Library/Application Support/VMware Fusion/vmnet8/nat.mac -d /var/run/vmnet-natd-vmnet8.pid vmnet8
You need to edit the configuration file that is used by vmnet-natd and in my machine its /Library/Application Support/VMware Fusion/vmnet8/nat.conf. Open the file in your favourite editor and check the [incomingtcp] section. There should be some comments about SSH, you can add a line that looks like the following:
... [incomingtcp] ... # lots of comments ... 8889 = 192.168.102.128:22 ...
What is config means is that for port 8889 on host machine point it to IP address 192.168.102.128 (insert your guest machine IP address here) at port 22. Save the file and then restart the VMWare networking stuff with the following command:
silviana:~ cheeming$ sudo "/Library/Application Support/VMWare Fusion/boot.sh" --restart
Once that is done, try the following:
silviana:~ cheeming$ ssh -p 8889 -X localhost
And you should be able to access to your guest machine from your host machine's terminal.
You'd notice that I included a "-X" option because I wanted to run some GUI apps as well. I also had some issues with it and initially thought it was due to the firewall but it wasn't.
After I posted this article, Martin, a fellow Exomate, wrote an e-mail to me explaining a proper way to do this and after that I did a few more experiments and realised that I didn't need to configure anything at all. I don't know what I did earlier to fix it but I am pretty sure I had problems the first time around. Instead of using ssh's -X command line. Its better to use -Y as such ssh -p 8889 -Y localhost. Here are some tips that Martin gave me: Before connecting to the remote host, try and run xlogo. It should work.
If it doesn't check the DISPLAY environment variable. On my machine it looks something like this: /tmp/launch-7t2bMS/:0. So then ssh into the remote machine as indicated before and then try and run xlogo again. And again it should work. If it doesn't then something is up, try checking the DISPLAY environment variable. It will look something like this: localhost:10.0.
Also, the method that I outlined below is not encrypted and should be avoided unless you know what you're doing. Many thanks Martin for clearing this up. But I am still not sure what happened to my setup earlier. Why didn't it work before?
The following section till the end has been deprecated:
I've been playing around with git and wanted to run gitk in VMWare Fusion but I got the following error:
cheeming@ccmdebianetch:~/trunk-git$ gitk
Application initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "image"
while executing
"image create bitmap tri-rt -background black -foreground blue -data {
#define tri-rt_width 13
#define tri-rt_height 13
static unsigned cha..."
(file "/usr/bin/gitk" line 1185)
I am not too familiar with X11 configs but I remember from attending an ExoForum that Russell had to run some commands to make things work properly and that memory actually helped me configured things quite easily with out needing to RTFM.
First, I had to set the DISPLAY environment variable to my host machines' IP (this it the IP address as seen by the guest machine in the virtual network created by VMWare, check ifconfig and look for vmnet8 device) like this:
cheeming@ccmdebianetch:~/trunk-git$ export DISPLAY=192.168.102.1:0
cheeming@ccmdebianetch:~/trunk-git$ gitk
Xlib: connection to "192.168.102.1:0.0" refused by server
Xlib: No protocol specified
Application initialization failed: couldn't connect to display "192.168.102.1:0"
Error in startup script: invalid command name "image"
while executing
"image create bitmap tri-rt -background black -foreground blue -data {
#define tri-rt_width 13
#define tri-rt_height 13
static unsigned cha..."
(file "/usr/bin/gitk" line 1185)
Hmm, something is still up. And I did the following (on the host machine), again based on what I remembered from ExoForum, but this time had to use the man a bit.
silviana:~ cheeming$ xhost 192.168.102.128 192.168.102.128 being added to access control list
I tried running gitk again and it worked. Hope this has been helpful.
I received a call yesterday at 8:30am and it woke me up. It was Monica, my cousin from the US. I was delighted to hear from her. It has been 12 years since we last seen each other in Malaysia. She is heading off to the Badaling Great Wall for the day and wanted to meet up somehow.
I woke up, got ready and toyed with the idea that I will go to Badaling to meet up with her. I definitely should do it, I told myself and I went online to do some research.
I knew I could go from Tiananmen but I wanted a shorter and faster way. Miya was online and I asked her and she suggested taking a 419 and then a 919 at "qing he xiao ying qiao nan" and that is what I ended up doing.
I arrived at "qing he xiao ying qiao nan" and I didn't see any 919 bus stop. I asked around and no one knew. So I was walking around and I saw atleast two 919s passing on the "qing he xiao ying qiao". Oh no! I must be at the wrong stop!
So I walked towards the "qing he" station, which I guessed must be where those 919s were coming from, and suddenly another 919 appears and passes me. I didn't think much and I gave chase. I see that it didn't stop at that "qing he xiao ying qiao nan" and it was resting due to the red traffic light. I was still running and I stopped to ask a passerby about the location of a 919 stop and he said its just ahead. So I continued to run for about 100-200 metres till I reached the next stop.
I remember seeing on the sign board that there are two 919 routes but I didn't think much about it then and boarded the bus. I paid for my ticket and sat down and was proud of myself for a bit.
I fired off a few text messages to Monica to tell her I'm on the way. I was thinking that I should have enough time until I saw a sign post that indicated that Badaling Great Wall is still another 45 kilometres away. I asked the staff in the bus and she said its another 2 hours, which is at least 30 minutes too late as Monica will leave and head towards Tianjin.
I couldn't understand why and then a bit later, over the PA, I heard that this is actually a "man che" (slow car) which kind of explains everything. Maybe that is why there are two 919 routes? One fast and one slow?
I was in a dilemma. What do I do now?
I alighted the bus at the next stop and wanted to catch a cab back to the city. I am about at least 1 hour away from the city by bus and I have no idea where I am and it was definitely the worst place to get a taxi. 15 minutes has gone by and nothing in sight. A few taxis passed by but was filled with passengers. One taxi did slowed down but didn't want to go back to the city.
One shady guy in a hatchback did stop and asked if I wanted a ride for a price to wherever I am going. I told him I wanted to go to Badaling and his opening price was RMB200 and it would take an hour. I said its too expensive and there's no point anyway since I needed to be there in 30 minutes to make it worthwhile. I asked about going back to the city and he said RMB150. I thought it was pretty outrageous and told him no. He left and I waited a bit more and when I least expect it an empty taxi came by and stopped.
I got in and told him where I wanted to go and he said okay at first and after a while he started complaining that its too far and would not be worth his effort. He suggested taking me to the subway and I had no problems with that. He took me to the Longze subway station and I went back to Dongzhimen.
It is now noon. I didn't really have breakfast and I am starting to feel hungry. I grabbed a set meal at McDonald's and downed it in a few minutes while toying the idea of going to Tianjin. I know it would probably be much less effort than going to Badaling Great Wall. I texted Monica and told her that I would meet her in Tianjin. She's an exchange student in Nan Kai University now and that is where I'll be meeting up with her.
I tried to take the subway to the Beijing station but it proved more tricky than I initially thought. I was kind of engrossed with reading Freakonomics that I didn't really pay attention to any announcements in the subway.
I totally didn't realise it and I was already in Qianmen. I was pretty sure I didn't hear the Bejing station announcement. So I got off at Qianmen and took a train going towards the other direction. Oh it was one of those spanking new trains, which is very clean and comfortable.
Right before reaching Chongwenmen, a voice over the PA indicated that this train will pass by the Beijing station but not stopping. I was wondering maybe its because its a new train so I came out in the Chongwenmen station. I waited for a few more minutes and another came train and I hopped into it. Right after I entered a manly voice boomed over the PA and said that this train does not stop at Beijing station. What is going on here? Am I so unlucky today that I managed to get into 2 trains that don't go to Beijing station.
I got off and started to ask a nearby security guard and she told me that no trains go to Beijing station. Its a recent ruling and she has no idea why but she did say that its possible to walk there from Chongwenmen. My Beijing geography is not very good for those places that I seldom go to so it was a good surprise for me.
After a few minutes, I arrived in Beijing station and I got the tickets to go to Tianjin and back. Finally things are going back to normalcy and nothing too exciting happened. I got a short nap in the train and I have to say that the 1st class seats in the "dong che" is great.
I eventually met Monica at Nan Kai University, had dinner with her and chatted till I had to leave at about 9:30pm. My train left Tianjin at about 10:17pm. I arrived back in Beijing at about 11:20pm (I think) and took a taxi back home. I arrived back in the apartment just a few minutes too late and had to walk 17 floors up to where I stay.
What a way to end the day and I am tired of writing now. I think this post is already longer than I wanted it to be and I am a bit too lazy to edit it further. (In fact when reading this post over another time to check for typos before I post it I fell asleep and again I got awoken by the mobile in the morning but this time its not Monica....)

Recent Comments