Eurovision 2006

The monster rockers from Finland won the Eurovision song contest 2006 in Athens. As always, I couldn't help but think that the tele-voting has a tendency to favour neighbouring countries. To figure out just how real this tendency is I set out to adjust the scores according to the distance between the countries.


The graph above shows the official score for the top five participating countries and two alternative scores. The first alternative uses normalisation based on the distance between the capitals of the country voting and the country receiving the vote. The second alternative is more extreme in that it gives a weight of zero to countries that share land borders. Please note that it is only the relations between the countries within each alternative that are valid – the fact that Russia received different amount of points for the different alternatives is thus not relevant.

In other words, the normalisation means that an icelandic vote for Greece is more valuable than if Albania would vote for Greece.

As can be seen Lordi won even more impressively taken distances into account.

In my eyes tele-voting by country takes away too much of the musical aspect of the competition. The purist in me would like to get the proper jurys back but since we seem to be stuck with tele-voting I think it should be done with just one big “jury” and the song that gets the most votes wins.

I attach the spreadsheet if you want to check how I have done the calculations or modify it further.


Computers Linux Windows

Linux screen resolution issues in Virtual PC

Virtual PC is great for setting up testbeds but the support for Linux is less than optimal. When installing standard Linux distributions under Virtual PC it may be impossible to set the resolution to anything higher than 800×600 or even to get any image at all.

Edit the sections for Monitor, Device and Screen in the file /etc/X11/xorg.conf to look like this:

Section "Monitor"
    Identifier  "Monitor0"     VendorName  "Monitor Vendor"     ModelName    "General Laptop Display Panel 1280x768"     HorizSync    31.5 - 90.0     VertRefresh  59.0 - 75.0     Option     "dpms" EndSection
Section "Device"
    Identifier  "Videocard0"
    Driver      "vesa"
    VendorName  "Videocard vendor"
    BoardName   "VESA driver (generic)"
    VideoRam    8192
Section "Screen"
    Identifier "Screen0"
    Device     "Videocard0"
    Monitor    "Monitor0"
    DefaultDepth     16
    SubSection "Display"
        Viewport   0 0
        Depth     16
        Modes    "1280x768" "1024x768" "800x600" "640x480"

The above works for Fedora Core 5 under Virtual PC 5.3.582.27. If you are unable to get any image then boot from the rescue CD and use 'nano' or 'vi' to edit the file.

Computers Windows


UsbAutorun is an application that enables autostarting of applications upon insertion of USB memory cards in Windows. Autostarting of applications when inserting new media is generally used for CDs and triggered by a file called autorun.inf in the root of the disk. This function is not supported for USB memories in the base OS although Windows XP sp2 introduced some support for it.

This application is provided as-is and is free for any use provided that it is not resold or included in any commercial offering.


To install this application:

  1. Extract the application (UsbAutorun.exe) to your disk.
    Open a command promt window and change directory to where the application was extracted
  2. Type usbautorun /install
  3. Type usbautorun /password {password} (with a password of sufficiently high entropy)
  4. Type usbautorun


As long as the application is running it will react on device insertions and use the autorun.inf file in the root of the USB memory to start any application indicated in the file. The autorun.inf file needs to have a new segment named UsbAutoRun which gives details on what to do when the USB memory is inserted. It also provides a password which must match the password configured in the computer itself. If the passwords don't match, the application will silently disregard the insertion of the USB memory. Below is an example of an autorun.inf file.



Running usbautorun /install writes data to the registry at HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Run to make the application autostart when the current user is logged on. After it is installed the application must not be moved as the path is written to the registry. For more information on command line parameters, type usbautorun -? at the command promt.

Note: Is is highly recommended to use a password as the ability to run an application on the computer just by inserting a USB memory card otherwise may be misused as a way to spread viruses.


Computers Gadgets

Misbehaving Netgear WGPS606

To avoid having to run cables I have used a Netgear WGPS606 to wirelessly connect computers on my desktop with my broadband connection. When checking the log files on my Linux box I noticed that the Netgear unit was causing my log to fill up with DHCPDISCOVER/DHCPOFFER:

Jun 20 23:21:21 xxx dhcpd: DHCPDISCOVER from <mac>(WGPS606) via eth0
Jun 20 23:21:21 xxx dhcpd: DHCPOFFER on to <mac>(WGPS606) via eth0
Jun 20 23:21:41 xxx dhcpd: DHCPDISCOVER from <mac> (WGPS606) via eth0
Jun 20 23:21:41 xxx dhcpd: DHCPOFFER on to <mac> (WGPS606) via eth0
Jun 20 23:22:01 xxx dhcpd: DHCPDISCOVER from <mac> (WGPS606) via eth0
Jun 20 23:22:01 xxx dhcpd: DHCPOFFER on to <mac> (WGPS606) via eth0

It is all very strange since the MAC address for which the DHCP discover is sent is the wireless NIC. But the wireless NIC has a static IP address and should not need to request a DHCP address in the first place. Furthemore, the DHCP server is on the LAN side of the Netgear box.

Netgear support has been unable to assist so in the end I had to blacklist the WGSP606 using the following few lines in dhcpd.conf:

host wgps606 {
        hardware ethernet <mac>;
        ignore booting;
        ignore bootp;

Apart from this the WGPS606 has been doing a great job for now almost a year.


Standard connectors, please!

Over the past ten years I have had a number of mobile phones from a couple of manufactures. In the process I have gathered an impressive (although my wife would tell you otherwise) collection of chargers, sync cables and headphones, most of which are incompatible with each other.

I understand the manufacturers' interest in making easy money on the after-market by flogging substandard equipment at a premium price but I would rather see they made my life easier.

I already have a set of headphones that are better than anything they would ever make me able to connect to their phone. I don't want to spoil a small phone by having to drag along a set of accessories and if I need to charge my phone when I am at a friend's place I want to use whatever charger is available. And I most certainly don't want a dongle that is sure to get lost anyway to connect a standard set of headphones to some proprietary connector.

So please:

  • Use Mini-USB to connect the phone with a computer and make it possible to charge via the same connector
  • Provide a 3.5″ audio connector directly on the phone
Computers Windows

How to save a Real audio stream using only freeware

On more than one occassion I have found myself with a need to save a Real audio stream from a web site. Each time I have had to browse through multiple web sites to find a working solution. This is how I managed to do it last time around.

  1. Download and install FlashGet (
  2. Copy audio stream URL (ending with .ram) from the web browser
  3. Create a new download in FlashGet using the URL taken from the previous step
  4. Run the download job to get the Real audio file
  5. Download and install Switch (
  6. Use Switch to convert the Real audio file to the desired format

If required, use an application such as Mp3splt ( to split the file into manageable parts.

All of the above applications are free to download and use.

Computers Windows


SimpleSocket is a COM DLL server that wraps basic UDP send/receive functionality. It is quite simple to use from all major Windows programming environments (C++, C#, VB, VBScript etc).

This application is provided as-is and is free for any use provided that it is not resold or included in any commercial offering.

The DLL must be registered prior to use. Although this can be done in many ways, one simple way is:

  1. Extract the File SimpleSocket.dll to a suitable folder
  2. Press the start button and select “Run…”
  3. Type cmd and press OK
  4. Type regsvr32 followed by the full path to the DLL

Although the exact usage varies depending on programming environment, the following sample should be able to serve as a guide. It includes a sending and a receiving application. Put each of these code segments in a file with the suffix .vbs, then run them both.


Set socket=WScript.CreateObject("SimpleSocket.Udp", "event_")
Sub event_OnReceive(data)
    WScript.Echo "Received: " & data
End Sub

socket.Listen "", 10000


Set socket=WScript.CreateObject("SimpleSocket.Udp")
socket.Send "", 10000, "Data sent from the client"


The following methods are supported

  • Listen {ip}, {port} – Starts listening for incoming data on the ip and port.
  • Abort – Stops listening for data.
  • Send {ip}, {port}, {data} – Sends the data to the peer using the ip and port. The data must be provided in text format.
  • OnReceive – Callback method for asynchronous notification of incoming data.


  1. Press the start button and select “Run…”
  2. Type cmd and press OK
  3. Type regsvr32 -u followed by the full path to the DLL


Computers Windows


Descript provides for an easy way to stop specific VBScripts. VBScripts running under either WScript.exe or CScript.exe, the two script hosts in Windows, turn up with just the name of the script host in the task manager and it can be difficult to know which process to kill.


By using this application the scripts are distinguished by the name of the actual script file.


This application works on Windows XP and later only. This application is provided as-is and is free for any use provided that it is not resold or included in any commercial offering.

To install this application:

  1. Extract the application to your disk
  2. Run descript.exe

Right-click on the icon in the notification area (system tray) and select Stop. A list of scripts, if any, is shown. By selecting a script it is terminated. As an alternative, all scripts can be stopped in one operation. The icons to the left of the script names indicates if the script is running under WScript.exe or CScript.exe.