Thursday, August 31, 2006

Virtualize and be Productive ...

One of the best things that VMware has done in recent memory is to release VMWare Server free of charge for anyone to download, setup and use with no license restrictions whatsover. We may have the likes of Microsoft ( and Xen (, both having their own virtualization products, to thank for that ingenious (perhaps calculated) move.

I've been using VMware server since it was released. Here are the top 5 things I really like about virtualization with VMware server in particular.

  1. Compartmentalize. I can create virtual machines for a specific project or for a group of projects. This is nice because it does not mess up the install on my host computer. If the project requires additional software, I can install it, worry free, inside the virtual machine where the project resides. If I completely mess up and break the project, I can delete the entire virtual machine and start from scratch without worry.
  2. Reuse. Each virtual machine can be different from the other but if you're working on projects with pretty much the same setup, you can create one virtual machine and create clones of it for each of the projects that you have.
  3. Remote Access. VMware has 2 additional software that allows you to monitor and connect to a virtual machine in a VMWare server. The VMware server console and MUI. The VMware server console is almost like VNC, only but better because in addition to interacting with the OS, you can also set and edit the preferences of a virtual machine. MUI, on the other hand, gives you control over the virtual machines on the server. It basically allows you to suspend, run or power down a virtual machine thru a web interface.
  4. Pause. This is probably the feature that I like the most. I can literally pause an entire virtual machine and turn off the computer at the end of the day. On the next working day when I power up my machine, I can start right where I left off by.
It's not all a bed of roses, though. I maxed out my RAM to 2GB and got myself an Athlon 64 dual core processor before I felt that I could comfortably use VMware server on my machine. Then again I run 2-5 virtual machines at the same time so you may not need as powerful a rig as that. However, newer computers come with more powerful processors, faster memory and hard disks in the hundreds of gigabytes, so this could be a non-issue on newer hardware.

Update : Seems I forgot reason number 5, it's here

Friday, August 25, 2006

shortcut to delicious and scriptculous

I just discovered the darndest thing today. I have always had a difficult time typing or on the address bar because I could never pin point where the "." should go in the url.

Well, today, I said to hell with it and typed the whole word "delicious" instead of "" on the Firefox address bar. Guess what, it redirected me to the correct site. Seems to work on Internet Explorer too.

Postgresql Tip : Resizing Varchar Columns

As great as postgresql is, there are little things that you wish could be easier to do. On version 7 of Postgresql, changing some of the column attributes meant that you had to either dump, modify and restore or drop a column and recreate it.

It's because there is no straight forward sql statement to do it. I found this hack that shows you how to resize a varchar column.

Tuesday, August 22, 2006

Guy Reviews the Honda Fit (it's the Jazz to us here in the Philippines)

I just love gadgets. Who doesn't ? When you talk of gadgets, what usually comes to mind is a nifty watch, cellphone or PDA but seldom a car. Imagine my surprise that Guy's first gadget is the Honda Jazz :-)

In the Philippines, the Honda Fit is known as the Honda Jazz. Don't ask me about the name change. My guess is as good as any, but I have a feeling it has more to do with marketing than anything else.

What Guy failed to highlight in the review, and I think this is really important given the rising prices of gasoline, is the fuel efficiency and mileage.

A big oil firm, Petron, in the Philippines ran a promotion touting their unleaded gasoline as the most economical giving the customer more miles in one full tank than any other fuel. Their car of choice was the Honda Jazz. I'll let you guys in on an insider secret .... it's not the fuel.... it's the car !!!

Anybody who owns a Honda will swear by it's fuel efficiency. I drive a year 2000 1.6 Liter Honda Civic and I consistently get somewhere between 10 to 12 kilometers per litre.

Honda really makes great cars.

Sunday, August 20, 2006

Unobtrusive Ajax with Fallback

I found myself trying to remember on which project and which feature I implemented unobtrusive ajax with fallback. So I'm writing it here in case I forget again.

One of our recent clients requested implementing ajax and some nice effects on their blog comments.

I thought it was an excellent exercise to see if it was possible to keep the old way the system added comments, which is to submit a form, and to use ajax whenever the browser supports it.

I was able to accomplish this by using the events library in YUI (Yahoo User Interface).

I used the addlistener function to add the javascript that performs the ajax call that adds the comment.

I pretty much left the original form intact, meaning there is still a method and action attribute. I prevented the default behavior from firing by using Event.preventDefault().

The beauty of YUI is that if javascript is turned off, the form will do a normal submit to add the comment instead of calling the ajax function.