“F” (The Movie) – Is everyone stupid or is it just me?

Spoiler Alert – This will ruin the film if you haven’t seen it. F This film started great, a teacher tangled in red tape, falls into depression and alcohol etc etc. But then these supernatural hooded psychos spring into the film and start killing everyone. If that is all the film is then, well, let’s just say it’s not my kind of film. However, I didn’t think that was what the story was about....

March 4, 2012 · 2 min · matt

My first “parkrun”

Today I ran my first parkrun. If like me you’ve never heard of them: parkrun organise free, weekly, 5km timed runs around the world. They are open to everyone, free, and are safe and easy to take part in. Pretty simple really. You just register for free on the website for a personal barcode, print it out then turn up and race. You just register as a runner, not for individual races, it’s up to you which races you attend....

March 3, 2012 · 3 min · matt

My recommendation for your first SLR in 2012

Want better photos? As I’ve mentioned before, I get asked what camera to buy a lot. I mean loads, it’s silly. Generally, I get asked by people who are fed up with the blurry, grainy photos they are currently taking and think a new camera will solve everything. If this sounds like you, then go read my previous post about whether or not an SLR is for you. Done? Still interested?...

February 27, 2012 · 3 min · matt

Testing JavaScript with QUnit for for Dummies, sorry, Java developers

Disclaimer: I’m no javascript expert so I may be am almost certainly talking a load of rubbish here. I was just looking for a unit testing framework for some javascript I’m writing (rather the the home-rolled framework I’ve out-grown) and came across QUnit. I’ve not tried any others so feel free to suggest alternatives. So far, it’s great and does everything I want and took me almost no time to learn....

January 11, 2012 · 2 min · matt

The cheapest way to get a Samsung Galaxy S2 in the UK

If you’re a materialistic idiot like me, you’ll be interested in how you can get your hands on a disgustingly extravagant smartphone while parting with the least amount of cash possible. The best deal I found for the Galaxy S2 (by far) has been through Tesco: Free handset T-Mobile network 300 mins/300 texts 24 month contract Free delivery 500MB Data Booster + Unlimited Internet £20 of free apps available (through some T&Cs) £20....

December 7, 2011 · 3 min · matt

Simplify your API – Can Singletons be used for Good, not Evil?

I recently wrote an article about singletons in java. The only thing I wanted to cover was that if you really want a singleton, I recommend you use the enum pattern. This post was motivated after more interesting comments were raised about testability when you see the “static” keyword. When you type “static” a little alarm bell should ring in your head to warn you that there could be trouble ahead....

November 14, 2011 · 5 min · matt

Bug with JQuery validation error messages showing tooltip text

I had the following html in my form: <label for="email-input">Email</label> &lt;input id="email-input" type="text" title="Don't worry, your email will not be displayed on the website or given to anyone else. We hate spam too." /> Nothing complicated there I hope. I had the help text set in the title attribute of the input which I styled with the lovely qTip to make it look nice. I validated my entry using the jQuery validation plugin which also works well....

October 28, 2011&nbsp;·&nbsp;1 min&nbsp;·&nbsp;matt

How to enable Offline Google Docs for Google Apps users

Do you still not have the offline option for Google Docs? If you’re a Google Apps user, then your apps administrator has to enable it first: Log in to the Google Apps control panel at https://www.google.com/a/your_domain.com (replace _your_domain.com_with your actual domain name). From the menu bar at the top of the page, click Settings. In the left menu, click Docs. Select the Allow users to enable offline docs check box. Click Save changes....

October 26, 2011&nbsp;·&nbsp;1 min&nbsp;·&nbsp;matt

How to write Singletons in java

Singletons get a pretty bad press. Often described as an “anti-pattern”. I think it’s a little unfair since I find them pretty useful in several situations. However, the reason they can be bad is important to understand: Making a class a singleton can make it difficult to test its clients, as it’s impossible to substitute a mock implementation for a singleton unless it implements an interface that serves as its type....

October 26, 2011&nbsp;·&nbsp;3 min&nbsp;·&nbsp;matt

How to dynamically choose the color of your Google maps marker pin using javascript

You can dynamically request icon images from the Google charts api with the urls: http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|FE7569 Which looks like this: the image is 21×43 pixels and the pin tip is at position (10, 34) And you’ll also want a separate shadow image (so that it doesn’t overlap nearby icons): http://chart.apis.google.com/chart?chst=d_map_pin_shadow Which looks like this: the image is 40×37 pixels and the pin tip is at position (12, 35) When you construct your MarkerImages you need to set the size and achor points accordingly:...

October 7, 2011&nbsp;·&nbsp;1 min&nbsp;·&nbsp;matt