Wednesday, January 21, 2009

OOP: Chinese New Year

In my first company, when employees were on leave or for some reason not at work, they would set up their email auto responder with a subject line of "OOP: Annual leave" or something like that. The acronym "OOP" stands for "Out Of Plant" was more of a legacy because that company had (and still has) a strong manufacturing background. There are some minor details in life that you will suddenly recall in some unexpected times. :)

I am going back home for Chinese New Year (first day will be on Monday, Jan 26). No promise on blog update, hopefully I can resume in early February.

On an unrelated note, a relationship is a bi-lateral affair. I am hoping for responses beyond blank emails...

Sunday, January 18, 2009

Using Static IP Address With Vista ICS

I have been trying to figure out a way to access Internet via Vista ICS from my OpenSolaris box. Since my OS box is a file server, it doesn't make sense to use a DHCP or else it will get a different IP address upon each boot up which is not convenient.

After some time of experimenting with it, I managed to get the static IP assigned to the OS box, and here are the steps.

For ease of naming, I will call the Vista host as 'H', this is the computer with ICS turned on that will connect to the outside world. The client computer that wishes to use ICS we shall call as 'C', and in my case it is running OpenSolaris snv_101b.

  • Make sure both H and C are connected somehow, either wired or wireless is entirely up to you. The bottom line is they must be connected. The most time-wasting mistake is to try troubleshooting a network connectivity at software level while the root-cause is due to unplugged cable(s).
  • There is nothing to configure at H side once ICS is up and running
  • To make sure ICS really works, you may want to enable DHCP at C to see if it can talk to the outside world
  • Once C is working with DHCP, disable the auto configuration by unchecking the "Configure network automatically' box.


  • Set the following parameter

    IP address: 192.168.0. x where x is between 2 and 254, inclusive

    Subnet mask: 255.255.255.0

    Gateway address: 192.168.0.1 (this address is fixed by M$)


  • Check /etc/resolv.conf and make sure the following lines are there:


    domain mshome.net
    nameserver 192.168.0.1



  • Open and edit /etc/nsswitch.conf (root privilege required), search for the following lines:


    hosts: files

    ipnodes: files



    Change the above lines to:

    hosts: files dns

    ipnodes: files dns
Now C should be able to access the Internet normally while having a static private IP. Have fun. :)

Saturday, January 17, 2009

OpenSolaris Kernel Building (Part 1)

Building the kernel for open-source OS is the rite of passage for any self-respecting nerds. I have ample of experience in compiling Linux kernels, for the x86 platform and a couple of ARM platforms, and today I tried my hands on OpenSolaris kernel.

It seems the process is not straight forward, and until now I still can't get it done.

The problem lies in the documentation and the kernel source code don't come in one clean package. The relatively weak package management system also exacerbates the situation as I need to run around to hunt for dependencies. Another issue that I face is the poor documentation, not the lack of it, but there are contradicting documents on Sun's website to the extent I am not sure which document is up-to-date and usable.

After digging through the web and some careful investigations, the following sites seem credible:

I have most of the needed packages in place, and I figure the next thing I need to do is to follow the instructions closely to get my kernel compiled. However I am still very new to Solaris and need more time to figure out the overall system architecture.

Wednesday, January 14, 2009

Work for Things That You Love

My office computer just arrived, and as usual for office computers, it is the usual cheapo: Dell Optiplex 360. What really amazes me is this darn thing doesn't come with reset button, so anything wrong I will have to long-press the power button to shut it down, then hit the button again to start it. What a piece of junk, no wonder Dell's finance in such a mess.

The first thing that I did when I got the machine was to install Ubuntu and all the essential packages that I need and love. However I found out ALL my colleagues are actually doing Linux development under Windows, and they test their work by running Linux under Vmware. My initial reaction went like "What!?!", one of them told me he just hates Linux and Linux just doesn't work for him. The rest of the guys echoed similar sentiments. It is darn odd to be the only guy in the group who likes and enjoys using Linux. (Disclosure: now I am typing this blog under OpenSolaris, and I think OpenSolaris has a bright future). I keep my laptop running Vista not because I like it, but because so far there is no driver for my dual graphic cards and I have no time to develop one.

My colleague's remark keeps me thinking about the meaning of work. How happy can you be when you are working something that you hate? Just like a cook who doesn't enjoy good food and a mechanic who hates driving. All these people are just spending most of their waking hours in unhappiness.

From my experience, when a product is developed by people who don't use it, there will be a lot of problems. My first job was developing and testing of software drivers for network processors. Once there was a very obvious defect in USB, but it passed through the regression tests and system tests. Finally uncovered by a customer. He just questioned my manager "How the hell you guys tested your software?". The reason was simple, the developers only talked about women, handphones, cars, and movies, they didn't like the product and no one ever bothered to do any pet projects with those chips (these chips are actually quite powerful and versatile). The next job was on walkie-talkies, again the developers never actually carried one and used it, and as expected, the product gave a lot of issues after few hours of use.

I am happy after years of struggle, I get paid to do things that I will do anyway when I am free. Although there is deadline hanging on my head, nevertheless I still feel good about going to work every morning when I wake up.

Monday, January 12, 2009

Using Vista as a Router

Cuppa got himself a desktop for development work, and it is not unexpected the OS of choice is OpenSolaris. Mainly for the safe-keeping of the data.

I do aware there are Internet-based storage services like dropbox, however I feel much safer and can sleep better knowing my data just sit by my side, instead of sitting thousand miles in data centers that I don't know.

During the setup of my desktop I learned the importance of utilizing resources that I have. The case in point is only my laptop (running Vista) has wireless capability, while my OpenSolaris box doesn't. Initially I was thinking to get a wireless interface or a wireless-to-wired device. However it is not very efficient and I don't want to shell out more money just to get myself connected. I figured maybe Internet isn't very important, I can download everything using Windows and throw them to the Solaris box. While I stared at my laptop, it dawned to me I could use the Vista laptop just as a bridge. Bingo! part of the solution resolved.

Next, how should I connect those two? I recall I have a switch with my friend, but that means I gotta wait until weekend to get it back. While taking shower, I asked myself why I needed the switch and thought about straight and cross cables. Suddenly the word 'PHY' crossed my mind and I remember for most modern Ethernet PHYs, the types of cable no longer matter. This is one of the advantages of working in small companies where I am exposed to different aspect of engineering, I learned that modern PHYs actually have abilities to detect the cable type and do the swap internally. In fact, you can now just use straight or cross cables where you please. I pulled out a straight cable and paired the two devices up. Now all my computers are networked and I don't have to spend an extra dime, PLUS I have a solid OpenSolaris with the trusted ZFS for all my files.

Friday, January 09, 2009

New Job New Job

I decide to shift my focus on my new job for the mean while as this area seems more exciting.

Indeed this company everyone is playful and my job responsibilities have grown from merely software development to PCB design. I guess this is a good opportunity for me to learn the product development end-to-end. :)

Monday, January 05, 2009

Office Musings

Today was my second day on my new job.

This company is relatively small, with less than 20 people, inclusive of the CEO. Beside the CEO, a finance guy and two administrative assistants, the rest are all MALE engineers. Well, I am used to it.

I didn't have any computer to use for most of the day and I spent quite sometime sitting idly looking around. Looking forward to something to do tomorrow....

What did I have in mind throughout the day? Well, I tried to figure out when I will have a family. Not really desperate, but just can't understand why two people who care for each other will have to be in non-talking-terms for so long. Wait, if in non-talking-term, do they actually care for each other? Dunno...

What things that I should have done but I didn't (barring that nite we had dinner together)? What things I should be doing now, short of flying to her place?

MK, you tell me.

Friday, January 02, 2009

New Year, New Job

Cuppa have changed to a new job, but for now that company shall remain nameless in my blog.

I spoke to my new colleagues and most of them have work experiences ranging from 5 to 20 years.

The guy with 20 years of experience spent the first 16 years in a company renown for products with fruit on it. He told me generally he liked the company, but not the last few years of his stay. I guess it would be in the ballpark of 2003.

When asked, he said the counterparts in US used to be competitive, open, and friendly. However the burst of dotcom bubble, post-911 trauma, and the rush of US companies to outsource operations to Asian countries caused those counterparts to become paranoid about their own job security. They started to politick, back-stab, and withhold vital business information from the Singapore site. Finally that guy was fed up and resigned.

I believe this kind of behaviour will be even more pronounced now. However I don't blame those US people, it is just human nature and I can't deny I may have done that if put into their shoes. What I can do to avoid this type of friction is not to work in a company with multiple sites, and keep moving myself up the value-chain (food chain?)

I guess this will keep me sane in this insane era.