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 (http://www.microsoft.com/windows/virtualpc/downloads/sp1.mspx) and Xen (http://www.xensource.com/), 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 del.icio.us or script.aculo.us 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 "del.icio.us" 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.

Wednesday, July 26, 2006

Two articles that prove that Linux is here to stay

... and why Windows will eventually but gradually meet it's demise :-)

http://www.kroah.com/log/linux/ols_2006_keynote.html
http://pcmag.com/category2/0,1738,3574,00.asp

Wednesday, July 19, 2006

job candidate interview and car alarm troubles

I was asked to meet someone for lunch yesterday. He is a candidate for a programming job at Solution Grove. Caroline sums him up as geeky and I tend to agree. He's had teaching experience, java experience and more importantly a willingness to learn someting new like OpenACS.

We met at Italianni's. I was hoping it was going to be quiet as it's a tuesday. Boy, was I wrong. It was jampacked filled with people by the time we finished.

A few minutes after the meeting, as I was on my way to the parking lot, I fumbled for the car alarm remote and was shocked. The screw may have somehow slipped and the mechanism inside the plastic casing was gone.

It was extremely embarrassing. I had to prove to the guard that the car was mine. I showed him the keys and the car park ticket. I was able to stop the sound by opening the hood and disconnecting a wire but that did not allow me to start the car. Fortunately, a nice gentlemen knew how to disarm the system and did so for me. I offered him a reward for his trouble but he declined. Very nice fellow.

The first thing I did afterwards was to replace the whole alarm system. There was no way to get a new remote as the current system does not support programmable frequencies. Even worse, if someone had gotten the mechanism from the original remote then they would have been able to open my car.

The new system cost me about P2300 but it seems worth it. It uses a very bright blue LED, nicer remote and best of all it has an emergency disarming feature. If I had lost the remote but if I still had the key, I could disarm the system by (1) opening the car with my key (2) press the brake pedal as I did the following (3) put key in ignition on ACC (4) turn it from OFF to ON 10 times.

I now keep that manual in the glove compartment of the car ...

Lesson learned :-)

Sunday, July 16, 2006

Free Guitar Tabs

One of my fondest memories of high school was with a guitar.

I remember it quite vividly but not vividly enough to remember the song, the day or all the exact details, just that it was practice for mass.

I graduated from a catholic high school. We have mass every now and then to celebrate certain events in the church calendar. Again, I can't seem to remember what it was.

A class was usually picked to host a mass. I beleive our class was chosen. It was my 3rd year in high school. Being host meant our class made the preparations, chose the songs, lead the readings and, of course, the singing. This particular celebration was particularly important, it seems, because our values ed teacher gave us the period free to practice the songs.

One song was written with chalk on the blackboard already.

I remember looking out the window that day. In my minds eye I can see the grasses in the vacant lot on the other street, they were brown and dry, it must've been a hot, sunny and lazy afternoon. The weather was probably getting to everyone because no one was practicing.

I must have been crazy because I asked a friend to play the song on the blackboard with the guitar with me. He was hesitant at first but after some convincing he agreed. It was a crazy idea because I am not exactly a very good guitar player. I knew the chords but strumming was all I could do.

Luckily, that was all the song called for, strumming.

I just started playing the chords with him. I do not know why and I can't exactly remember how but I found myself strumming the chords and singing in tune ... and everyone in the room was singing with me. My writing probably could not do justice to what I felt while I was in that moment. I remember the feeling well because my best friend at the time was smiling at me and loooking at me like I've never seen him look at me before, as if I was doing something incredibly different or amazing. Probably the better description is something "out of character".

Sometime during that, I had wished that the song did not end but when it did, I remember that it ended loud and everyone was happy.

Anyway, we did not have the internet back then. We had to get the tablatures and chords from magazines and song hits. Today, in the age of informaiton, they are freely available and downloadable from the internet.

the concept of an "Unconference", and I did not misspell

The single most important variable to the equation that will make this a success is when passionate and knowledgable people who have something in common come together and meet. It's almost natural. It's amazing.

Saturday, July 15, 2006

my Athlon X2 is now officially yesterday's big news

Just barely six months after I got myself an X2, Intel decides to ship dual cores that beat the crap out of them. Sigh ....

Vmware and Ubuntu, my virtual cpu is losing ticks

I have been having problems with Ubuntu 6 on vmware recently.

I run a virtual machine where all my current web development projects are installed and running. The web files are exported to this virtual machine thru NFS.

Just this week the NFS client on my virtual machine would complain that the server has stopped responding and connection is timing out. This caused my web applications to hang and the web server to just stop serving pages.

I noticed 2 things.

(1) the date and time on the virtual machine kept getting out of sync with my host operating system

(2) I saw a weird log entry that said that my "...CPU is losing ticks, checking if CPU frequency has changed"

Almost everytime my web applications hung, it woud be because NFS stopped connecting and in almost all cases I saw both symptoms.

After losing some hours over this, I found an article over at the VMware knowledge base about it.

What ended up fixing it for me was:

(1) make sure vmware-tools was syncing time with my host operating system

(2) added the "clock=pit" to the kernel bootup parameters.

I run Ubuntu 6.06 with a server kernel. I meant this virtual machine to be a server so no X-windows or any such GUI is installed. That turned out to be a problem with configuring vmware-tools to sync time with the host OS.

It seems the solution to that one was to edit the .vmx file for the virtual machine and setting tools.syncTime to "TRUE".

Update : Interestingly, technologies like speedstep and cool n' quiet can also cause this problem. Check this article out. Try turning off speedstep and/or cool n' quiet from the BIOS and see how it works.

Time for new headphones

My head phones of 1 year and a half have snapped, literally.




It's a labtec worth P1000.00. Does anyone have any idea on how to salvage them ?
The mic and headphones still work great. Its just that I can't put them on my head anymore.

New DSL Modem

My old modem was a speedstream. The new one seems only to be branded PLDT (my service provider). Underneath I read Model No. PL-DSL2.




This is what my old modem looked like.


My worst nightmare came true ... dial-up.

My worst nightmare came true this week. I went back to using dial up internet.

It was the wind. There was a lot of rain too. The real culprit, however, were the power fluctuations. Since last week friday up until the middle of this week, we've had at least one power outage a day.

Last saturday, there was one in the morning. I was not at home when the power came back. I was at the new V-mall shopping center at greenhills buying a telephone set (more on this on my next blog).

My brother turned on the power strip and the UPS. The router turned on, my pc was brought back to life but the modem remained off. My brother called me on the cell and told me the bad news.

I asked him ....

Did you try a different power outlet ?

Did you turn on the switch ?

Did you make sure the power cord is plugged in right on both the modem and outlet ?
... but to no avail.

When I got home, I checked the device again myself. As if to resuscitate the dead, I shook it and tried all the things I had asked my brother to do over the phone, but to no avail.

Henceforth I was on dial up and my worst nightmare had come true.

Sunday, July 02, 2006

To watch or not to watch ? that is the P350 question.

It's a long weekend in the United States, they're celebrating independence day. My Boss is out camping and I'm guessing with the lack of support tickets since friday evening, most of our clients are out too, making the most of it.

So what to do on a long hopefully uneventful and quiet weekend. My first choice was to hop myself over to the recently opened SM Mall of Asia and watch Superman Returns on Imax.

The mall is just 30 minutes away from the house via the coastal road. I've been there thrice. While it seemed humongous on my first visit, it somehow did not feel that way on my subsequent trips. Maybe it's because you start to remember where all the shops are, where to go and how to get there.

As it turns out, tickets for the IMAX experience is P350 per person. Stingy as I was, I asked "what's so special that I have to pay P350 for a movie ?". Apparently, you get to sit on a lazy boy and some 3D glasses. What ? No free pop corn :-) This blogger thought it was worth it, though.

Sunday, June 11, 2006

HOW TO: Build your memory by 'Pegging'

This is a great in-depth article on an effective memorization system called pegging. The first thing that you need to do in order to learn how to peg, is to memorise the basic phonetic sounds that will be used to represent the numbers 0-9. To speed up your mastery of this number/letter code, I have offered a few memory aids.

It's extremely cool and unbelievably easy. I am trying to get the 100 common peg words into memory but I think it will take a fair amount of practice to automatically transform a series of numbers into images and commit them to memory.

read more | digg story

Mark Shuttleworth almost strip searched by US customs

"When Ubuntu founder Mark Shuttleworth recently traveled to the US, he was declined entry and almost strip searched! (He refused, and they relented). Furthermore, he now has to fill out a visa application form for "people with a criminal record" every time he wishes to travel to the US."

Obviously the customs people do not use Ubuntu :-)

Seriously, though, I find this a rather large coincidence. I am applying for a B1/B2 (for those who don't know, a tourist/business visa) from our local embassy. I'm not worried anymore about getting declined on the interview, now I'm worried that I'll get rejected right at the airport when I arrive.

read more | digg story

Working in the US

Read the comments.

It is fascinating to read the comments that people have about foreigners working in the United States, about the h-1b visa, about how the system supposedly protects local workers and how it is sometimes abused by US companies.

I consider my self blessed because I work for a company in the US and yet I have not had to set one foot in US soil. All of my work is done online thru e-mail, instant messaging and ssh. I doubt that my salary is at par with US software engineers because that is my edge, living in the Philippines. It is, however, competitive when compared against local salaries. There are no health benefits and things like that, but I do get to work at home and time is pretty flexible.

Thursday, May 18, 2006

Finally 64-bit Dual Core Laptops

Now I am happy that I did not jump the gun and buy a macbook pro.

Wednesday, May 17, 2006

AOLServer, XoTCL and Comet

Before the buzzword COMET was coined there was xotcl, a patched aolserver and Gustaf Neumann's background delivery and streaming modes.

http://www.openacs.org/forums/message-view?message_id=389271

Now I have got to find the time to play with this !!!!!