Week of 06/15/2008 - 00:00 to 06/21/2008 - 23:59

Authors and Programmers

I was just doing some math and here's some interesting tidbits:

My recent PHP project that I'm about 80% done with has 57,237 lines of code.
My largest PHP project has over 120,000 lines of code, of which I wrote 99% personally.

An average novel has less than 8,000 lines, and my PHP lines are much wider than your average novel.

Make one typo in a novel, and nobody really cares.

Make one typo in a program, and everyone complains!

So the next time you scoff at a programmer, think about that. She's probably written a lot more than your favorite novelist, done it a lot more accurately, and gotten paid a lot less.

KVM and Windows XP Under Ubuntu 8.04 64 Bit

Setting up KVM for virtual machines in Ubuntu 8.04 is easy!

A few simple steps will get you up and running. First, install the packages with your favorite package manager, or at a console type:

sudo apt-get install kvm libvirt-bin virt-manager virt-viewer qemu

I also found I needed to add myself to the kvm group:

sudo adduser `id -un` kvm
sudo adduser `id -un` libvirtd


You must add yourself to libvirtd for networking to function :-)

Here's one of the few situations where rebooting linux is probably easier for most people than trying to manually start everything, so give her a boot and log back in.

Under your Applications menu in "System Tools" you'll find "Virtual Machine Manager". Connect to the qemu "localhost" setup that is already there by right clicking on it. After it says you are connected, click New at the bottom of the window to create a new virtual machine instance. Follow the wizard to configure your install.

I found that after installing XP, when it rebooted to complete the install that kvm didn't remount the cd-rom image I was installing from, so I had to manually edit the virtual machine setup and add a storage device pointed at the Windows XP cd-rom. Then installation finished normally.

The first thing I noticed was that install took about 45 minutes total, which seemed a bit long to me. It could be the setup I chose. I'm running a dual-core AMD 64 on a 64 bit Ubuntu install, and chose to run a 2 processor 32 bit virtual machine for the install.