Working Abroad - Taxi Tips 

No Comments

If you’re working overseas and you are planning to use taxis to get from the hotel to the office and back, create a taxi card.

  • Use your favourite word processor to print the hotel address and the office address on a single sheet of A4 or letter-size paper.
  • Use landscape mode and select a bold sans serif font at 36 point or more (the length of the address will determine the largest font size you can use - bigger is better).
  • Arrange the addresses so that when you fold the paper in half longways there is one on each side.
  • Print 3 or 4 copies (in case a driver inadvertently keeps one).

Now when you get in a taxi it’s easy to communicate your destination, even if the driver doesn’t have his or her reading glasses handy :-)

FogBugz World Tour Comes To London 

1 Comment

I attended the FogBugz 6.0 World Tour presentation this morning at the British Library in Euston Road, London. Joel Spolsky was the speaker and he made an excellent job of describing some of the funky new features in FogBugz 6.0.

The Evidence Based Scheduling (EBS) is sufficiently similar to witchcraft to warrant further investigation :-) Joel has a good explanation here - it’s a long article but well worth reading.

I’ll attempt a summary here, in case you can’t follow the link above. EBS tracks developer estimates of time required to complete code and compares this to the actual time used. From this data it can work out how effective your estimating skills are. It doesn’t matter if your estimates are inaccurate, but if you are consistently inaccurate (say, you always underestimate by 100%) this can be taken in to account quite easily. A bigger problem is inconsistently poor estimates, where sometimes the estimate is 12 times too small, other times it’s twice as big as it needs to be.

FogBugz collects all this data and uses the information to produce a probability curve of your likelihood of shipping code on a particular date.

Check the link for more details with pretty graphs and everything :-)

Crucial things to know are:

  1. You can sign up for a free 45-day evaluation of FogBugz on the website.
  2. There is a (not yet publicised) Student and Startups edition (for up to 2 users) which is free. Hurrah!

Beware the Mint Card! 

No Comments

I’ve had a Mint credit card for sometime now, but I haven’t used it until recently.

I paid the deposit for our wedding with it, and looking at this month’s statement I’m shocked and surprised!

The balance bought forward is 1,802.17. The minimum payment from last month was 40.00. The interest this month is 47.10 and the payment protection this month is 15.01.

So the current balance is 1,824.28.

I have not used the card at all last month, but the balance is increasing! So if I only ever pay the minimum amount I will get further and further in debt every month, and I will never pay off the balance.

It seems monumentally irresponsible of Mint to set the minimum payment to be less that the monthly charges.

Remotely Controlling Your Music Player 

2 Comments

I have recently programmed my Nokia N95 phone to control my music player (the rather marvellous snackAmp) remotely.

SnackAmp sits on my Linux-based server box. It has a remote control feature (details here) which accepts control strings from a TCP socket. I wrote a Python script which runs on the phone to open a Wi-Fi connection to my music server and send simple commands to control it.

I was pleasantly surprised at just how easy all this turned out to be :-)

First, I installed Python. This is available from the Nokia Opensource site. The N95 uses the 3rd edition of the S60 operating system, so I downloaded these files:

  • PythonForS60_1_4_1_3rdEd.SIS
  • PythonScriptShell_1_4_1_3rdEd.sis

Then I wrote a small Python script to open a TCP socket on the music server and send the appropriate text strings to control the music player.

The script (see below) first defines some handy functions. send_command actually sends the specified command to the music player. play, pause, stop, next and prev call the send_command function with the appropriate command text.

The main section of the script first checks if there are any command line parameters. If there are, it tries to immediately send the appropriate command and then exits.

If not, it discovers which operating system it is running on, and uses that information to execute one of two sections. The S60 section uses a standard Nokia list GUI widget to enable the user to select a command. The script sends the command and exits. Note that the Nokia GUI requires you to specify all strings as Unicode. Python does this by prefixing each string with ‘u’ - for example, u’Pause’.

The Linux section uses the standard Python Tkinter GUI library to generate a small X-windows based window with push buttons to select commands. This part of the script uses a loop to allow multiple commands to be sent. The window is active until you select the Quit option.

Here is the script:

#!/usr/bin/python
import socket
import sys
import string

def send_command(command):
        # opens a socket to snackAmp, sends the appropriate command and
        # closes the socket.

        # create a socket
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        # connect to server
        host = '192.168.1.20' # server address - bletchley is 192.168.1.20
        port = 8775 # server port
        s.connect((host, port))

        s.send(command) # send command

        # close the connection
        s.close()

def prev():
        print 'previous...'
        send_command('xmms_remote_playlist_prev')

def pause():
        print 'pause...'
        send_command('xmms_remote_pause')

def play():
        print 'play...'
        send_command('xmms_remote_play')

def stop():
        print 'stop...'
        send_command('xmms_remote_stop')

def next():
        print 'next...'
        send_command('xmms_remote_playlist_next')

args = sys.argv[1:]     # don’t keep the program name
if len(args) > 0:
        for a in args:
                found = 0
                a = string.lower(a)
                if a == ‘pause’:
                        found = 1
                        pause()
                if a == ‘prev’:
                        found = 1
                        prev()
                if a == ‘play’:
                        found = 1
                        play()
                if a == ’stop’:
                        found = 1
                        stop()
                if a == ‘next’:
                        found = 1
                        next()
                if found == 0:
                        print “Command not recognised. Currently implemented are pause, prev, play, stop, next.”
else:
        if sys.platform == ’symbian_s60′:
                # we are running on a Nokia phone
                import appuifw  # access to the user interface framework
                menu = [u'Pause', u'Prev', u'Next', u'Play', u'Stop']
                index = appuifw.selection_list(choices=menu, search_field=0)

                if index == 0:
                        pause()

                if index == 1:
                        prev()

                if index == 2:
                        next()

                if index == 3:
                        play()

                if index == 4:
                        stop()
        else:
                # we are running on a standard computer (i.e. not a phone)
                from Tkinter import *

                class Application(Frame):
                        def __init__(self, master=None):
                                Frame.__init__(self, master)
                                self.grid()
                                self.createWidgets()

                        def createWidgets(self):
                                self.pauseButton = Button (self, text=”Pause”, underline = 0, command=pause)
                                self.pauseButton.grid(row=0, column=0, columnspan=4, sticky=E+W)
                                self.prevButton = Button (self, text=”Prev”, underline = 1, command=prev)
                                self.prevButton.grid(row=1, column=0)
                                self.playButton = Button (self, text=”Go”, underline = 0, command=play)
                                self.playButton.grid(row=1, column=1)
                                self.stopButton = Button (self, text=”Stop”, underline = 0, command=stop)
                                self.stopButton.grid(row=1, column=2)
                                self.nextButton = Button (self, text=”Next”, underline = 0, command=next)
                                self.nextButton.grid(row=1, column=3)
                                self.quitButton = Button (self, text=”Quit”, underline = 0, command=self.quit)
                                self.quitButton.grid(row=2, column=0, columnspan=4, sticky=E+W)

                app = Application()
                app.master.title(”snackAmp Control”)
                app.mainloop()

You’ll need to create the script in your favourite text editor on your PC and then transfer it to the phone. I used a USB cable to connect the phone to the PC and selected the mass storage option on the phone. Once the file is transferred, you’ll need to disconnect the USB cable so the phone can access the memory card again.

In theory you can use Bluetooth to transfer the script, but I’ve seen reports that it doesn’t work with S60 3rd edition. I don’t have Bluetooth on my Linux server, so I can’t tell you :-)

In use, start Python on the phone, then run a script. Select the script name and the command list appears. Choose a command. The ‘Select access point’ screen appears and I choose my Wi-Fi router connection. Then magic happens and the music obeys my commands :-)

International Talk Like A Pirate Day 

No Comments

September 19th is International Talk Like A Pirate Day. Aaar!

I particularly like the description of the game Snapdragons (at the bottom of the page), which seems to involve a large risk of getting burnt!

Malpensa Airport, Milan, Italy 

No Comments

There are two main airports around Milan in Italy. Close to the city is Linate which is convenient, but rather small and compact.

Malpensa airport is about 50km from the city, but it’s bigger and allegedly more relaxed :-)

The posh restaurant at Malpensa airport

I’m pleased to report that taxi fares to and from both airports have been capped. The maximum from Linate to anywhere in the city of Milan is 25 euros, whatever the taxi meter says. For Malpensa it’s 70 euros. The caps also apply to the reverse journeys.

Malpensa has a lounge which is available before check-in. As you enter the terminal building, the lounge is on the extreme right hand side, just beyond check-in area 1.

I posted some brief details of the excellent restaurant (La Galleria) on my From the keyboard of Dr Jan blog, but here’s a photo.

Unfortunately, the flight to London Heathrow always seems to leave from one of the gates B18-B23, which means there will be a bus which takes you from the terminal building to your plane. There is another lounge though, the Sala Pergolesi, up the special escalator in the satellite building where the buses depart from.
The other problem I had was probably an issue with Alitalia. Once we arrived at Heathrow, the baggage took at least half an hour to start to appear. And this was after queuing to get through a particularly busy passport control. Once the first bag arrived, the rest came out in dribs and drabs, a few bags at a time. Anyone would think there was a single employee handling the baggage all by themselves. I seem to recall a similar thing happening on a previous journey back to Heathrow on Alitalia :-(

Necessary Spelling 

No Comments

Here’s a handy acronym to help remember how to spell ‘necessary’.

Never Eat Chips, Eat Salmon Sandwiches And Remain Young.

My Computer Science teacher taught me this at college :-)

Tricks of the Trade 

No Comments

Tricks of the Trade is a very interesting and sometimes very useful website set up by Matthew Baldwin of defective yeti fame.

It does exactly what it says on the tin - various professionals reveal their own top tips. There’s even an RSS feed. What more could you ask for?
Here’s an example:

When playing as a DJ on a wedding, birthday party, or any event which involves a heterogeneous public:

  • Only play music your public likes, even if you hate it yourself.
  • Play mainly music aimed at the women. Men will only start to dance when there are chicks to score/impress on the dance floor.
  • Play the most widely accepted music first, and move to the younger, harder genres later in the evening when the elder family members have left. This way everyone gets to hear some music they like.
  • Make the dance floor dark enough;people won’t dance when they are too exposed in the light.
  • When someone requests a song that you wouldn’t normally play (because you think it’s not going to work), tell them that you’ll only play it if they promise to dance to it. You should especially do this if it’s a man making the request.
  • When the dance floor is opened early and there’s not much dancing: don’t worry–people still have to talk, and when more alcohol is consumed, they will start dancing.
Vincent De Munck

How To Open The Bonnet On A Ford Focus 

No Comments

Opening the bonnet on a Ford Focus turns out to be a remarkably difficult thing to do. In case you don’t have the manual to hand (or can’t be bothered to find it), this is what you do…

  1. Swivel the Blue Oval Ford badge on the front of the car anti-clockwise. It pivots about a point on the left hand side of the badge, so push the right side of the badge upwards. This reveals a key-hole.
  2. Use the ignition key to turn the lock fully to the left. The bonnet should pop up slightly.
  3. Whilst lifting the bonnet itself, turn the lock fully to the right. This should release the bonnet.

Unfortunately there are no gas struts to hold the bonnet up, you need to deploy the bonnet stay, just like to you used to on old cars :-)

Goodness only knows why this is so tricky to do. Perhaps Ford thought that something valuable or important would be kept under the bonnet. Surely if that was the case, anyone with nefarious intentions could gain access from the bottom of the car, up into the engine compartment?
This has been a Public Service Announcement from Dr Jan.

Don’t Lose Your TiVo Remote Control Unit 

No Comments

Because if you do, you’re screwed.

You can however, buy replacement units from Tivo Heaven. Thank goodness!

Full details on my personal blog here.