The GX1 is a veritable bargain

Just picked one of these up at the airport on the way through. They have been going for around £350 for the GX1 body and 14-42mm Vario lens, or £330 with the standard 14-42mm lens. Originally an £800 kit, the discount is because Panasonic is clearing inventory to make way for the GX7, which looks amazing by the way. Far from 2.5x the price amazing however.

GX1

The Sony RX100 and Fuji X100S were also on my radar. The RX100 is a great camera and much more compact than the GX1, but it has a much smaller sensor and is still twice the price at around £600. The only snag is that I’m going to have to spend another £200 on a prime to exceed the low-light performance of the RX100, but the result is a more capable kit, and it’s still £100 cheaper!

I also made the mistake of handling the Fuji X100S. It was a mistake because it almost cost me £900, but I quickly realised this and put it down before I could get more attached! That is one sexy piece of kit, and is in a different league IQ and interface wise. I would LOVE one, but at nearly £1000 (!), it’s hard to justify with the GX1 being such a bargain.

The GX1 won’t replace my SLR (no affordable wide angle lens), or my old Canon S90 (not quite pocketable). But it is much much less of a burden to carry than an SLR, will go many places the SLR wouldn’t. I shall be putting it to good use while in Amsterdam!

5 tips on travelling with a wide-angle lens

Three years ago, on a bit of a whim, I bought a Canon EF-S 10-22mm lens. The action was probably symptomatic of Gear Acquisition Syndrome, but I’ve fortunately managed to keep it under control since – I’m still using the same set of lenses I bought around that time!
Canon EF-S 10-22mm f/3.5-5.6 USM

It was a pricey item, and to this day I don’t really know what possessed me to spend such a sum on a piece of glass that I didn’t really know how to use. What’s more, I wasn’t sure I’d use it regularly. But all the pictures in this article were taken with it, and these days it hardly leaves the camera.

Others have asked me about wide angle photography, and I’ve even loaned my 10-22 out a couple of times, so I thought it was about time I put down some words about traveling with a wide angle lens.

Continue reading →

Changing boot order in Ubuntu 13.04 (or Debian) – the easy way

I wanted nice, concise instructions on changing the boot order in Ubuntu 13.04, which uses Grub 2. Being a newbie focused OS however, Googling “ubuntu boot order” results in SEO blogs with lots of fluff, and then the actual instructions start out with “install package from ppa”…

What the hell, I just want to change the boot order!

Continue reading →

Site move

Just moved this site to a larger VPS. If you can see this message you’re visiting the new host so the migration was clearly a success!

It should also be accessible over IPv6, although this has yet to be tested.

Calling mysqldump in Python

Python is a fantastic tool to know, and despite being a beginner I find myself using it more and more for everyday tasks. Bash is great for knocking together quick scripts, but when you want to something a little more complex such as interfacing with APIs or other systems over a network, you really need a more fully-featured programming language.

The topic of this post, however, is the kind of task that bash is perfect for. Thanks to mysqldump, a database backup script can be written in a few lines and dump/restores are easily automated. So why on earth would we do this in Python?
Continue reading →

Targus Laptop Mat – Buyer Review

While staying with a friend recently I was instantly jealous of his Belkin Laptop cushion. It looked like a great way to chill out with a laptop in the evening while avoiding a hot lap.

While researching the Belkin above though, I came across the Targus Laptop Lap Store Mat, which was almost half the price. There were no negative reviews, so living by the philosophy that if you regret buying the cheaper one you can always get the more expensive one later (poor philosophy, but both are cheap enough to get away with applying it here!), I decided to give it a shot.

Continue reading →

How not to program Bash

Came across this gem today:
[shell]
COMP=$1

if [ -e $COMP ]; then
echo “Please supply a competition_id”
exit
fi
[/shell]

On first read it looks backwards – “if exist $COMP then exit”, and the programmer clearly wanted to do the exact opposite. However it actually works as desired. Mostly.

If no argument is supplied, $COMP will be a blank string, i.e. “”. Thus [ -e $COMP ] will parse to [ -e ], which returns 0 (effectively true). It’s basically like saying “does nothing exist”.

This is because the -e argument tests whether a file exists. So if an argument is supplied, [ -e $COMP ] will return 1 (effectively false), which does what the programmer intended UNLESS the argument supplied is a valid file path.

In this case a number was expected, so sure it’s unlikely to fail in this way, but it’s still an incredibly bad way to test if an argument is set. Not to mention confusing to read!

The correct way to test this by the way would be to use -z, which simply tests if a string’s length is zero:
[shell]
COMP=$1

if [ -z “$COMP” ]; then
echo “Please supply a competition id”
exit
fi
[/shell]

Or better still, use getopts. For more info run ‘man test’ from a bash terminal.

Nexus 7 jelly bean update brings home screen rotation

image

Brief post as I’m writing this on the device in question – an update to Jelly Bean (4.1.2) came through a few minutes ago. I think this is the slickest handling of screen rotation yet – effectively the layout is the same, the Android engineers simply moved the launcher and (the useless) search to the sides. This is a nice improvement for Nexus 7 owners.

Xen Server “The SR failed to complete the operation”

Had this problem when trying to start a newly created VM and install from certain ISO files. Some ISO images would work and others would not.

Removing the ISO image allowed the VM to start but obviously there was no OS image to install from.

The error message is generic and not very helpful, but if you do encounter it check that the ISO is readable by the Xen server. In our case it was on an NFS share but the permissions were read-only to all but the owner…. so a simple `chmod a+r *.iso` fixed it!