All posts by matt

Should I buy a Canon 7D in the US and carry back to the UK?

Canon have just released the 7D and although I can’t really afford it, I have to have one!

The price difference between UK and US is pretty crazy. Here, my favourite camera shop are selling body only for £1,399. £300 less than Canon’s SRP. In New York’s B&H store you can pick it up for $1,699 (~£1,014).

As luck would have it, I’m going to NY this weekend so if I’m going to buy one, now’s the time to decide.

I saw some people on flickr discussing whether or not it was worth it, or whether you could get it through customs and so I decided to call them myself. I rang the VAT, Customs and Excise helpline and was told that it being a digital camera, it was not liable for import duty and I would only have to pay VAT (currently @ 15%). I would just declare it on arrival in the UK by going down the red channel.

I think I can get the US sales tax (~8.25% ?) knocked off the camera when I buy it if I show them my passport and tell them I’m taking it home, but I’m not sure about that. Please comment if you know…

UPDATE: I contacted them about sales tax:

Purchases in our store (and all stores in NYC) are subject to an 8.875% local sales tax. This tax is not a VAT, and cannot be recovered by non-USA visitors when returning home. All prices are listed before sales tax.

This brings the total to $1,850 (£1106), it means I can still buy the 7D for about £1,270 when you add the VAT. A saving of £130.

However, I’m also not sure the Canon warranty covers me outside the US.

UPDATE: I contacted them about warranty too:

The warranty on this product is only good inside the USA. We offer the SageMax Protection Plan which is good for worldwide warranty and accidental damage protection…

What would you do?

Read the blog post, read read. But what if I don’t want to? It doesn’t matter, READ!

After some late night cramming for an exam last week I went to bed with my head still chattering. I told a sleepy Karen about my day at work and how Dan and I kept singing different words to Adam and Joe‘s “Text the Nation” jingle. I gave the example: “Patch the source code, patch patch, but what if it’s not tested? It doesn’t matter, PATCH!” (I hope the sarcasm reads well).

As I noisily clambered into bed, Karen reminded me I still had my glasses on. “But how will I see my dreams?” I replied, to which she instantly quipped “It doesn’t matter, SLEEP!”. Karen got the idea instantly even though she was half asleep and doesn’t really listen to the show. She still managed to come up with something better than any of my attempts.

It’s when these moments of utter genius tumble out of Karen’s mouth that I am reminded how much smarter than me she is.

Convention ÷ Configuration

I’ve long been sold on the concept of Convention Over Configuration. For me it’s a no-brainer, not only am I lazy, but when I am forced to make a decision about something technical, well, let’s just say the number of times I get it wrong is > 0.

Recently I’ve been playing around with Maven, something I should have done years ago. Maven seems pretty sold on the convention idea too and so I just expected a simple project to work “out of the box”.

Unfortunately, when I tried, I hit a problem with my first simple project. As you can see from the “reconstruction” screenshot, I had problem with recognising simple java 5 features.

I was using the latest copy of eclipse, on a fresh install of Ubuntu using OpenJDK. I’ve not developed with OpenJDK and so blamed that at first, it couldn’t possibly be Maven… So, I downloaded the Sun JDK, and as you can guess, I realised it was a Maven thing.

When you create a simple Maven project using the m2eclipse eclipse plugin it defaults to a Java 1.4 compliance level. What kind of sensible convention is that? I like to think there is a good reason for that because I imagine it has cost the community quite a few potential Mavenees.

Once you realise this is the problem, just change the project specific Java compiler settings to whatever makes sense for you.

I’ve not got any research or references to hand, but my gut tells me that the convention should be to use whatever the majority of the programming community agrees is the best version of the best tool for the job. If someone wants to use Maven for a project that needs to support backwards compatibility, then let them do the configuring, not me.

It also defaults to JUnit 3.8.1, another warning sign in my head. Everything else in Maven I have done so far has been a pleasure and m2eclipse looks like a great plugin, I just wish the defaults were not so 2004.

To fix this within the POM you need to add the following:



What’s the best sim-only mobile contract?

OK, I know, it’s a bit of a silly question because everyone has different needs, but these are mine:

  • 1 month rolling contract — I don’t want to be stuck with the contract for 12 months
  • Keep my number — I rummaged through the boxes in a BTCellnet shop years ago to get my number and I’m going to keep it
  • Unlimited internet — Well, a fair usage of at least 1GB, and I don’t want to get charged if I go over, I just want a warning
  • Some free minutes — To all networks of course
  • Some free texts
  • £25 per month or less

So far, the best I’ve found is the solo-20 plan at T-Mobile:

  • 1 month rolling contract
  • Keep my number
  • Unlimited internet — Fair usage of 1GB
  • 600 minutes to all networks
  • Unlimited texts
  • £20 per month

If you think you’ve found a better plan that meets my minimum requirements, or this deal is no longer available, add a comment and I’ll update this post.

Update December 2012: This solo-20 plan is no longer available. This was pointed out to me by a commenter linking to I thought, oh great, another spammer (like many of the comments) but the site actually looks pretty good. I also recommend Personally I’m on a normal contract now (this post is old) but please post any good deals in the comments for others to find.



Keep your filling knife clean

I’m no expert when it comes to DIY. Enthusiastic amateur I’d say.

I fumble my way along, guessing how things should be done, and generally learn the hard way.

I needed to do some more filling today to plug the holes I’d left from my poor skirting board fitting skills.

My filling knife however was caked in gunk after a few years of not being cleaned properly. I kept it clean when I first got it, it was new and I took good care of it. Somewhere along the line though I got lazy, and did a half-assed job of cleaning that knife. The first bit of dirt that stuck proved to be a perfect home for future gunk to bind and the effort of cleaning that knife just grew exponentially.

I spent a bit of time trying to clean it but it didn’t take me long to realise that I could spend an hour trying to clean it and there’s every chance it would still be too dirty to do a good job. I just had to bite the financial bullet and buy a new one.

I’m writing this as a reminder to myself that if I can just keep my knife clean, I may never need to buy one again.

Like I said, I’m no expert at DIY.

I’m a software engineer so I don’t face these kinds of problems.

Voucher codes and promo wotsits

It’s 2009! Our digital lives are a breeze and online shopping is just one more option to the newly empowered consumer. Right?

I’m sure I’m not alone in finding the process of buying anything a little tedious now:

  1. See something in the shop you like
  2. Decide not to buy it because you don’t know if that’s a good price
  3. You get home and look on the internet
  4. Now you have to poke around a few websites and try to work out which is cheapest when you consider postage and tax etc.
  5. Maybe one of the sites gives you rebate if you go through a referal like quidco
  6. Maybe the site would give a discount if only you had a voucher code

If you ask me, It’s all a pain in the ass.

My brother emailed me yesterday:

Anyway you can crack into this site to find some good discount codes?

BR20 for 20% as expired.

I recognised this. He’s at stage 6 I thought (or at least I would have done if I’d numbered the stages in my head like I have above). He’s googled for a code but only found one that’s out of date.

I started to pen my reply:

I know I work with computers but there’s no way I can find out what the codes are, they’ll all be validated server-side when you try a code…

Then it hit me. Why not just brute force the code? Worth a shot right?

I cobbled together a littler bit of java to try various combinations of 2 characters followed by 2 digits based on the fact that the expired code was BR20 for 20%. The code below uses JWebUnit which is simply a convenience wrapper for HtmlUnit.

Long story short, it found several codes! One of which was for quite a substantial discount. I’m not going to post the codes (don’t bother asking). If you want a code, you’re welcome to run the sourcecode below or write your own. If the voucher code gets posted on the internet, it’ll probably get disabled pretty quickly too.

Has anyone else written similar things? I’m curious to what other approaches people may have taken. I also think it wouldn’t be too hard to make this a generic application that rattles through all possible codes for a user-supplied regex.

My advise to web developers for anything like this would be to introduce a delay after a few invalid guesses and then start doubling the length of the delay with each invalid guess. This would quickly make any brute force technique pretty useless.

[code lang="java"]
import net.sourceforge.jwebunit.junit.WebTestCase;

public class CodeFinderTest extends WebTestCase {

    public void setUp() throws Exception {

    public void test1() {

        for (int perc = 20; perc <= 100; perc += 5) {
            for (char firstLetter = 'A'; firstLetter <= 'Z'; firstLetter++) {
                for (char secondLetter = 'A'; secondLetter <= 'Z'; secondLetter++) {

                    // generate the next code to try
                    String code = Character.toString(firstLetter)
                            + Character.toString(secondLetter) + perc;
                    System.out.print(code + ",");

                    // basket_campaign_code is the html id of the text field
                    setTextField("basket_campaign_code", code);

                    // if the response didn't say "invalid code" then it must have said something else...
                    if (!getPageSource().contains(
                            "You have entered an invalid code")) {
                        System.out.print("\nWAHOO!: " + code);
                        // lets get greedy and bump up the percentage discount...
                        firstLetter = secondLetter = 'Z';


Audio Stalking

I’m just writting this as a holding place for funny things I overhear. Little bits of someone else’s conversation caught out of context. I hope this is just the beginning or a lifelong reel of quotes that I append to as funny things enter my ears from the mouths of unaware passers-by.

I’m starting it because I just heard:

“How did it survive being cooked in a flapjack”

I have no idea what she was talking about, and to be honest, I don’t want to know. It’s funnier left to the imagination.

Fixing the volume up key on a nokia N95

volume buttons
volume buttons

I recently got my hands on a nokia N95. Great.

However, I soon realised that the volume up key doesn’t work, only down works. This was a little unfortunate since it is the only key capable of turning the volume up of music when played with the music player software installed on the device. Something I definitely needed to do once I had managed to turn the volume down to zero percent.

My first idea was to look for some other software I could install that would allow me to alter the volume with another key but I had no luck on that front (let me know if you have).

I then googled around and realised I was not alone and that other people had found success in taking the back off and re-soldering it, so I thought I’d have a bash.

I ended up fixing mine with no tools, just a bit of paper.

Here’s how to take the back off:

  1. Turn it off.
  2. Take the battery out
  3. Slide phone open and bend one side off
  4. Bend the rest off. I was quite rough with mine and I’ve done it a few times now and it has been fine.

You should see the two microswitches, the volume up microswitch on mine was bent upwards. Not only does this mean it doesn’t connect the circuit, but it also won’t be pressed by the outer button.

I simply jammed a bit of paper in there to make the microswitch touch the contacts again.

If this post has helped you fix your phone, show me some love with the flattr link above. Thanks!

paper jam
paper jam