Correcting iPhone photo filenames

Sometimes, when uploading photos from my iPhone’s camera roll (for example, when using Dropbox), the photo filename format ends up looking like this:

Photo 16-03-2012 21 21 10.jpg

This isn’t very nice. Much better to have something in ISO-8601 format, which sorts nicely in file listings, and so on. So I wrote a quick bash script to search for all the files in the current directory (and subdirectories), and rename them to this style:


You can find it on github.

Please note that the script renames files immediately, with no confirmation. It depends on Perl’s rename under the covers, and if you pass in the -n flag, it does a dry run so it shows you the renames that would be done, but doesn’t actually do them.

(It also handles video files with similar names).

Compiling FlightGear 2.4.0 for Ubuntu Linux 10.04 (Lucid)

Update 2011-08-26: If you are using Ubuntu 11.04 or later, it looks like this is now packaged as a .deb by PlayDeb. This post may still be of interest to those using earlier versions of Ubuntu.

I recently had cause to install FlightGear 2.4.0 on Ubuntu 10.04. It’s not packaged in the form of a deb yet, so I’ve documented the commands I used. No guarantees this’ll work for you, as I haven’t tested them rigorously; and I’m assuming some Linux and command-line knowledge.

  • Install some dependencies (this may not be a complete list; it’s simply the set I was missing). If you get warnings below about missing libraries, hunt around for them in the Ubuntu archives.
sudo apt-get install libboost-graph-dev libopenal-dev libalut-dev libopenscenegraph-dev libjpeg62-dev libplib-dev zlib1g-dev
  • Get SimGear 2.4.0, unpack it into a temporary directory, and install it (checkinstall will create a deb for you as a side-effect, and install that so you can uninstall with apt if necessary). I’m using -j10on make as I have many CPU cores; you may want to tune this to match your number, although it will only affect the speed of build.
./configure --with-jpeg-factory ; make -j10 ; sudo checkinstall
./configure ; make -j10 ; sudo checkinstall
  • Get the 2.4.0 “Base” package and unpack it to /usr/share/local/flightgear. The tarball contains a data/ directory at the top level; you need to move directories around after unpacking so that the flightgear/directory contains direct subdirectories:
ls -1 /usr/local/share/flightgear/
  • You’re done! Run fgfs to launch Flightgear (there’s no GUI so you’ll have to become familiar with the command-line switches).

CyanogenMod on HTC Desire on Orange UK

I installed CyanogenMod on my HTC Desire about a week ago in an attempt to get rid of some of the crapware that Orange UK are notorious for installing, and get a snappier, cleaner phone. I won’t repeat the excellent CyanogenMod install instructions, which you can find here. However, here are some points that might help you if you’re doing something similar:

  • The OS (Android) firmware and the radio firmware are two separate things. The phone was at the latest Orange-approved firmware level before the upgrade (Android 2.2, which comes with the radio at version I had read elsewhere that Orange network-lock the phone and that this sometimes causes problems when installing CyanogenMod; so I deliberately removed the SIM card during the upgrade process as suggested. Whether this circumvented the problem or whether it simply wasn’t an issue I can’t say, but certainly I haven’t seen any network-lock problems. I didn’t upgrade the radio at all, as this seemed risky; I simply left it at the 5.10 level and skipped over that section in the install instructions.

  • After the upgrade, I was initially nervous that the 3G had stopped working, as sitting in my house I simply couldn’t cause the phone to roam onto 3G or HSDPA; however, it seems that it simply has different criteria for roaming onto 3G - it will keep a stable slower signal in preference to a poor faster one. In fact, so far I seem to get a more reliable data signal, and the phone uses 3G and HSDPA just fine when it can find a good signal.

  • Update 22:30 I found I needed to apply this workaround in order to be able to install large applications such as Google Maps.

As a result of upgrading it, the phone is a lot faster and smoother. Much of the jerkiness has disappeared from the user interface - even third-party apps such as Twitter work more smoothly. The most astonishing thing is the battery life, which seems to have almost trebled - whereas previous the phone would struggle to last a day, it now lasts over two. This is quite impressive - I’m not sure what was dragging down the phone before (HTC Sense, perhaps), but kudos to the guys at CyanogenMod.

In summary, CyanogenMod seems like a way of getting a clean, modern, Android build onto your phone. Some of the menus do stuff from a plethora of options, but the defaults are fine, so it’s a great way of getting a “plain” Android phone. Recommended.

Windows 7 64-bit on VMWare on Ubuntu Hangs on Boot-up

I recently tried to install Windows 7 64-bit on VMWare Workstation 7.1.3 on top of Ubuntu 10.04 as a host. I found that it behaved quite unreliably once the VMWare tools were installed into the guest OS - in particular, it regularly hung on boot-up. However, once I saw this error message, which clued me into the problem:

I discovered that the solution was to disable 3D graphics acceleration - in the VM’s settings, untick Display / Accelerate 3D Graphics. The VM now works smoothly.

How to Travel

After three years of travel as a consultant to many cities across 14 countries, and many other personal trips and holidays, it seemed to be about time to write down what I’ve learnt about travel – both for work and pleasure. These tips are the guidelines I lay out for myself – which I don’t always follow – and they might not work for you. But I’ve found they’ve helped get more out of the places I visit, and I come back feeling like I’ve seen something of the world.


  • Don’t be so English (applies only, of course, if you are English to start off with). Remember you are in a foreign country. In these places, people don’t expect you to apologize when they step on your toes (an idiotic habit I have yet to wean myself off). You should ignore the plaintive pleas of the tat salesman in the market or the high street, not apologize for him and give him an excuse to come back at you. But don’t be rude, either. Learning at least ‘please’ and ‘thank you’ in the local language, even if it’s a brief stop in a place you know nothing of, is respectful.

  • Don’t be a skinflint. If you’re reading this, chances are you aren’t a penniless student (if you are, well, you might not find it so useful). A holiday costs money, and you’re not paying for your business trips. Get over this mental hurdle before you leave home and you’ll have a nicer time – don’t worry over the last penny of the tip (round it off) or the last bargained rupee in the market. Take taxis liberally and public transport when it’s an experience.

  • Pad your schedule and plan in advance. Yes, the airport looked quiet when you arrived at 1am, but heading back at 4pm, it might not so much. Why not avoid the worrying and leave an hour early? I’d trade boredom for worry any day.

  • Try and Wikitravel. They’ve both made my travel easier and smoother.

  • Send postcards to those who will appreciate them. Generally, the younger generation are less impressed with these – after all, you’ve probably been on constant contact on Twitter and Facebook whilst you’ve been away anyway. But elderly relatives might still appreciate a postcard. Many hotels will provide everything you need – postcard sales, stamps, and will add to the outgoing mail. You have no excuse.

  • Bring stuff to watch/listen to/read during the moments of boredom. These days, a netbook and a decent pair of headphones (I recommend Bose Quietcomforts) go a long way to covering all of these points when you are stuck at yet another airport gate, in a coach or taxi, or waiting to check-in.

  • Treat the city as if you lived there – more of a state of mind than a specific recommendation, but if you are good at learning layouts quickly, or you are there for several weeks, this is recommended (and you can start to violate the ‘take taxis’ rule). Becoming a partial local means you can reduce the cultural non-participation guilt – you don’t feel the need to do something out-of-the-ordinary every night, and you can fraternise the places the locals do more comfortably.

  • Make sure you have plenty of ways of paying – if you are at all nervous about somewhere you’re going, make sure you have plenty of ways of paying. (Multiple) credit cards, ATM cards, and cash (in US dollars as well as the local currency), in several pockets and bags, mean that you’ll be able to bargain or negotiate yourself out of pretty much any jam.

  • Bring back nice gifts, if at all - if you bring back gifts, make them nice. That means no tat, and nothing bought at the airport. Otherwise, why bother? If you have no time, just bring back stories instead.

  • Pack light - the benefits are obvious. Carry-on luggage only is the ideal, but liquid and size restrictions can make this tough. The lighter and smaller the better, though - you’ll navigate round the crowds quicker, and have less hassle with the inevitable stairs. Best to put in the time to learn how to pack compact.


  • Use your Concierge. Assuming you are staying in a nice enough place, you’ll have access to one (even if there isn’t one, most decent hotels should provide some assistance from the reception desk). Don’t be afraid to approach and ask for his advice or for help to solve a problem. After all, ’it’s a hotel, not a borstal’. Concierges typically speak excellent English and their job is to help you enjoy your stay in the city – not just the hotel. Let them do the work of arranging things – it’ll be well worth the tenner you’ll feel obligated to tip them at the end of the trip. If they or the hotel mean you leave anything less than delighted, score them down on TripAdvisor. They deserve it.

  • Stay in a hotel near where you’re visiting – this means that if you’re visiting a city, stay right in the centre. More hotel points at your favorite chain out-of-town? Ignore them. The cost and time saving is more than worth it.

  • If the maid has done something nice for you, do something nice for her. Cue smutty joke. But, seriously, if they’ve put some freebies in your room, and you’ve been staying for a week, a small tip left on the bed when you check out is far from out of order.

  • Be careful if staying with family and friends. This can be a good thing – your holiday feels more homely and you might get some good local advice. But be careful not to outstay your welcome and overindulge the favor. Lots of time cooped up with folks you don’t normally see all day, every day, can cause emotions to flare, and can damage your memories of your trip. It’s definitely inadvisable to do this when travelling on business, as your plans are rarely likely to be flexible.


  • Avoid the tourist traps. This cannot be said enough times, and is especially tempting to violate when it’s late and you just want to go to bed. You know the signs when you see them – pictures on menus, English menus more prominent than the local ones, waiters hanging around outside to lure you in to over-lit, unchallenging food. If you want a nice trip, try and find a nice restaurant. Yes, every night. If you don’t feel like wandering around and taking a risk, ask in the hotel where’s good. Don’t beat yourself up over your cultural participation by making it ‘as local as the locals’ all the time (after all, they eat international food too) – but do put in the effort to find a place where the food at least tastes good.

  • Don’t eat in the hotel restaurant. OK, occasionally this is alright – breakfast can be an exception, as well as when you’re really tired, or when the hotel restaurant is a notable gastronomic destination in itself (rare, and generally only to be found in 5* places). But generally, the food will be boring, the service poor, and you’ll pay through the nose.


  • Fly with a proper airline. This means no RyanAir (or whatever your local ‘couldn’t give a fuck’ alternative is). You’re on holiday, which means you’re there to enjoy yourself, or you’re on business, which means your company should fork out not to waste any more of your personal life than needed. This means you shouldn’t have to endure a gauntlet before you even get to your destination. Yes, airports are naturally depressing, security theater-filled, bureaucracies, but flying itself is fun, and a decent airline will smooth some of the pain out, especially if you fly enough to become a frequent flyer.

  • Pick your seat in advance. This is particularly important for comfortable travel in long-haul economy. Many ‘proper’ airlines now allow you to select your seat as soon as you book (e.g. AA, and BA on some flights). Even if they don’t, you should then check-in online as soon as possible – you can still pick up your boarding pass at the airport if you haven’t got the option to print it straight away. is a quick-and-easy way to find the best seat on the plane.

  • Don’t obsess over airline ‘privileges’. Generally, having ‘status’ on an airline alliance can be a good thing – business class check-in and lounge access, in particular, can be worthwhile. These are also the best chance of getting upgrades and reducing hassle. However, there are no guarantees. Sod’s law often has it that the obscure foreign destination you are in has no lounge, or just one check-in counter, or your status is ignored by a Kafka-esque drone who doesn’t understand the overly complex rules as well as you do. Don’t let it get to you – treat these things as bonuses to start off with, and you’ll have a more relaxed journey.

  • Get on the airplane as early as you are reasonably allowed. You get to sit down and relax, and put your hand baggage away where it’s convenient for you. Yes, this means getting to the gate before boarding is announced. In fact, this principle applies generally in an airport – check-in early, get through security early, get to the gate early. Don’t leave it till the last minute and be surprised when your three carry-on bags need to be checked in.

subscribe via RSS