Friday 23 October 2009

Forays into Linux on VMware

For years I've been using an old Athlon 700 PC with Windows 2000 installed which served me well, but finally this year I decided to buy a new machine and opted for a laptop (a Dell XPS M1530)...with Vista installed...and wished I hadn't. And only having suffered Vista for a short while, I'm now considering switching over to Linux (paying £80 for a service pack, a.k.a Windows 7, is a hard pill to swallow). But before I take the leap and trash my Vista installation, I thought the prudent step would be to see how I get on with Linux first.

One option would be to do a dual boot installation, but I've read this sometimes causes issues with Vista and requires hard drive re-partitioning, so I opted for a less invasive approach which was to use VMware instead. For this trial I've chosen to use Debian (version 5.03) as it requires less hand holding than say Ubuntu and I'd like to believe that I'm fairly technically minded. It's also considered to be very stable, though the software installed with the distribution may lag behind some of the more bleeding edge distros.

If you're not sure what flavour of Linux is right for you, then DistroWatch gives a good run down of how the major distributions compare. The rest of this post describes how to get Debian up and running and the steps I followed.

First of all, download the Debian CD or DVD images (.iso files) from the Debian download page. For 32bit Windows you'll need the i386 version, for 64bit, the ia64 version. You only need to download the first CD/DVD image unless you know there are packages (software/applications) on the other ones that you require (refer here to find out which CD/DVD contains which package), though these can be downloaded using Debian's package manager (apt), once the installation is complete.

Next download and install VMware Server (I'm using version 2.01). This software is free but you'll need to register to get a license key. Once installed, open the VMware Server application. This will open in your browser and require you to log in using your Vista username and password.

Once open, click on the Create Virtual Machine link which will display a wizard that will take you through the following steps:
  1. Name and Location - Give your VM a name and select the location (usually somewhere on your C: drive) where it should be created.
  2. Guest Operating System - choose Linux and select "Debian GNU/Linux 4 (32 bit)
  3. Memory and Processors - choose what is most suitable for the hardware your running on
  4. Hard Disk - click on Create a New Virtual Disk and choose a capacity that is most suitable for the size of your hard drive
  5. Network Adapter - click on Add a Network Adapter and select either:
    • Bridged - guest looks like just another PC on your network and is visible to other machines
    • NAT - guest is hidden from other PCs on your network, but can get out to the network (and others can reach specific services on your guest via port forwarding)
    • Host-Only - host and guest connected over a private network where the guest has no connection to the rest of the network, and no other PCs can reach your guest (internet access requires further configuration)
  6. CD/DVD Drive - click on Use an ISO Image then click Browse to select the first ISO downloaded previously (this will need to reside in the C:/Virtual Machines directory created during the install process)
  7. Floppy Drive  - this option is fairly redundant in today's world
  8. USB Controller - click Add a USB Controller
  9. Click Finish
Here's how my configuration looked:



Now the next stage is to install Debian onto the VM. First of all, make sure your new VM is selected in the Inventory navigation panel and then click the Console tab. You should see a big play icon which when clicked will power on your VM. Once powered on, click the screen again to open up the console in a new window and you should be presented with the Debian Installer Boot Menu:



Click on the console window with your mouse, then select the Graphical install using your keyboard arrow keys and hit Enter (note: to exit out of the console back to Vista, you need to press Ctrl and Alt together).

Follow the installation process which is fairly self-explanatory. Be sure to configure the package manager to use a network mirror as this will enable you to download the latest software packages from the internet using apt. Once the installation is complete and the system has booted you should be presented with the login screen. Enter the username and password that you created during the install (not the root user) and then all being well, the GNOME desktop environment should start up and you should see the following:



At this point it's wise to take a snapshot of your newly created VM. Within VMware Server, click on the Virtual Machine menu option, then select Take Snapshot. Snapshots enable you to save the state of your virtual system before you make risky changes like installing applications, adding a new patch, or making a configuration change, though unfortunately, VMware Server only lets you take one snapshot per guest (on my to do list is to check out VirtualBox, Sun's free virtualisation product, which allows multiple snapshots to be taken).

Now the first thing I noticed on my installation was that the screen resolution needed a bit of tinkering as it's set to 800x600 and my laptops default resolution is 1280x800. There also appeared to be an issue with the sound control, but the good news was that I connected wirelessly to the Internet without a hitch using Iceweasel (Firefox rebranded for Debian).

In future posts I let you know how my dalliance with Linux progresses and what (if any) hurdles I had to overcome.

Saturday 3 October 2009

Excel Worksheet Diff Tool

As part of my day job, I sometimes have to test the output from reporting systems is as expected.

To speed up this process, I wrote this simple tool to compare the data in two Excel worksheets and highlight the differences. Now VBA is definitely not my first programming language and this was a very quick and dirty job so don't expect bells and whistles, but it seems to work ok.


To use it, just paste the two sets of data you want to compare in sheets 1 & 2 respectively, then click on the Compare menu item (under Add-Ins in Excel 2007) and select Run. Macros will need to be enabled for it to work.

The tool expects the data in both worksheets to be in the same column order (hidden columns are ignored), though row order isn't important and the first column is used to match records between the two datasets (i.e. this column should contain your primary key field). Duplicate row entries are not handled as yet.

Friday 2 October 2009

Have You Seen the Tape Measure? (or Things My Wife and I Have Argued About: Part 1)


"Darling, have you seen the tape measure? It was by the fridge."
"No."
"Are you sure you haven't moved it? I definitely remember seeing it there."
"No, I haven't moved it. Have you looked in the kitchen drawer?"
The kitchen drawer was the first place I'd checked. It's directly below the work surface where I'd seen the tape measure and where it normally resides.
"Yes, it's not there. You definitely haven't moved it...?"
"No, I haven't touched the tape measure! Why do you always blame me when things go missing?"
The conversation was starting to get a bit heated at this point.
"Because you're always the one who moves things to places I can't find them and I'm sure I didn't move it!"

So as not to rile my wife even further, I resigned myself to go hunting for the bloody thing. First of all I rechecked the kitchen drawer, just to make sure I wasn't losing my mind and it was there all along. No luck. Next I checked the dining room sideboard. Not there either. Maybe it had found its way into the toolbox? Nope. What about the drawers in our bedroom? Zilch.

In the end I searched every room in the house but to no avail and by now my temperament was definitely becoming Fawltyesque, though there was one place I hadn't looked...the garden shed. Now a search of our garden shed is not to be undertaken likely. All manner of sharp implements wait to impale the unwary, but off up the garden path I went, muttering all sorts of expletives along the way...and guess what, no sign of the wretched thing (though no serious bodily harm done either).

Back to the kitchen I go, contemplating a trip to B&Q, and what scene awaits me on my return...? My wife with tape measure in hand and a smug look on her face.
"Well you didn't look very far."
No, just over the entire bloody house.
"Where was it?"
"Under this pile of washing."
The pile of washing in question was about 2 feet from where I'd seen the tape measure.
"Why'd you put it there?"
"Well I must have moved it while I had the washing in my hands." Said with no hint of remorse.
"So why didn't you just put it back in the drawer which would have been the logical thing to do?"

By trying to understand my wife's actions, my brain at this point started to experience a divide by zero error. This often occurs during our arguments, and at these times I often think of the quote from As Good as It Gets where Jack Nicholson, who plays an author, is asked by a fan "How do you write women so well?", to which he replies "I think of a man, and I take away reason and accountability!".

Anyway, here comes the killer rebuke...
"Well if you did the washing, then I wouldn't have had to move it at all!"

Damn it. No matter what the argument, it always comes down to being my fault for not doing my fair share of the housework. There's maybe a grain of truth in that statement, but in my wife's eyes gardening (of which I do it all) is classed as a hobby and so doesn't count towards my share.

But the true lesson of this tale is not to argue with your wife, you'll never win. Unfortunately, it's a lesson that I'm still in the process of learning.

Wednesday 30 September 2009

Faulty Cooker Top Tip

If your cooker suddenly stops working, before calling out a cooker repairman, check to make sure you've not accidently switched it on to the timer setting (which is easily done with older cookers, especially a Hygena Turbo De Lux if you use the switch as a place to hang your oven gloves).

This could save you the pleasure of being charged (£30 in my case) for making a complete idiot out of yourself!

Sunday 27 September 2009

What's in a name...

Welcome to my blog.

It was going to be called Arch Stanton's Blog, but maybe I was being a bit naive to think that the name on the grave next to where the gold is buried in the climax to The Good, The Bad and The Ugly would be available to use for the address.

As I wanted to keep this blog anonymous (it's bad enough writing a load of waffle let alone having it be attributable to me) I thought the chances of this name being taken, one that for some strange reason or other had stuck in my memory, would be slim. Think again ...

That's the problem with the Internet having a global user base - what you believe to be improbable normally turns out to be highly likely. Though on the flip side, there is a chance that amongst all the waffle, somebody, somewhere, might find something that I write on here of interest.

Oh well, I had to resort to nicking one of the ship names from an Iain M. Banks novel instead...

(readers may have already come to the conclusion that I err on the side of geekishness - hope this doesn't put you off)