Archive for December, 2008

New Years Eve 2008

New Years Eve 2008

A new years eve house party was held at Chris’ house and I went along. Chris had a decent digital camera and was getting snap happy so I used a collection of the photos he took to form this gallery.

Comments off    

End of year train journey

It’s the last day of 2008 and I’m heading up to Leeds to enjoy a New Years Eve party with all my friends from the School of Computing and I’m sure many others too. As the train hurtles through the foggy December countryside I can’t help but contemplate how little of our own country I’ve actually seen.

There are certain environments in which I find my mind wandering more than others and seeing the fog swirl amongst the distant trees and farm houses loom up out of the distance as the train passes really strikes a chord with me.

I knew I remembered someone else mentioning to me about the significance of watching scenery pass through a train window but couldn’t put my finger on who. Seeing as I had the rest of the journey to find out I delved into my e-mails and realised that it was Roger, who some way into my final year project, sent me a link to a wonderful website called Passing By.

The site shows a number of videos of scenes viewed though a train window and it allows you to change the direction in which you view it such that you can effectively change the side of the train you are sitting on. Its not quite as captivating as sitting on a train yourself and watching the world fly by, but it certainly is well worth a look.

Comments off    

Photo Blogging

Readers probably wouldn’t have taken much notice of the recent photo posts here and here on my site. The thing is though, these are a result of a bit of ingenious behind the scenes code that allows me to snap a picture with my BlackBerry camera and blog it in seconds thus allowing me to start a photo blog category that comprises of quick snippets with a photo for when a picture is more appropriate and I’m no where near a computer.

The real power behind this is Flickr but as those who know me will testify, I don’t like to use external services that take people away from my site, so I devised a way to bring the convenience of mobile Flickr uploads to my blog rather than to Flickr.

To begin with, the easy bit. I registered a Flickr account and installed the Flickr application on my BlackBerry. Now I can take a photo with the BlackBerry and send it to my Flickr photo stream with a title and a caption in a few seconds. Now comes the hard bit. Getting the stream on my blog and removing any Flickr artifacts along the way.

The saving grace here is that Flickr provides an RSS2 feed of any users photostream (so long as it’s set to public). In addition to this, there is a popular WordPress plugin called Feed WordPress that allows the syndication of RSS feeds onto your blog. I installed this plugin and subscribed to my Flickr feed with it. Now I was getting all photos posted to Flickr on my blog, I just had some cleaning up to do, and annoyingly, this is what took the time and effort.

Firstly Feed WordPress is designed to list all feeds coming into a blog as contributors so you can give appropriate credit. In my case though it was my own Flickr feed so I wanted to avoid this link category being shown on my site. To fix this I specifically excluded the category Feed WordPress had earmarked for contributors by specifying it in the arguments of the theme function that displays the links list. Users who are using a theme with widgets or who haven’t customised their site as much as I have might be able to use widgets to do this.

Secondly I had to change some Feed WordPress settings to get perfect operation. Mainly forcing all “posts” from Flickr to go into my Photo Blog category and also to ensure that all these would be attributed to my username. I also entered the default Flickr e-mail address,, as an allowed user such that my Flickr entries would be syndicated without going through moderation. This would be a security risk if I wasn’t the only person who could add feeds to my syndication list or post to feeds already earmarked for syndication but as neither of these situations are true its ok.

Finally I needed to ensure that the actual body of the post appearing on my site showed the proper content. By proper content I mean a good sized image, linked to the original and showing nothing else alongside it but the caption and no reference to Flickr.

To do this I used a custom code modification to Feed WordPress which would extract the true location of the picture in the Flickr feed and store it as an attribute of the post. For those wishing to replicate what I have done here, the code below needs to be entered inside the SyndicatedPost class, at around line 1100 in the feedwordpress.php file of the Feed WordPress plugin.

if (isset($this->item['']['content@url'])) :
$this->post['meta']['flickr_original_image'] = $this->item['']['content@url'];

In addition to the Feed WordPress modification I also added a plugin hook that would parse the content of all posts in the Photo Blog category in order to retrieve the image location stored with the above code, correctly display it and to parse the remaining text for the caption thus remove references to Flickr. In the code below the number 36 refers to the id of my Photo Blog category.

Plugin Name: Fix Flickr Posts
Plugin URI:
Description: This plugin removes cruft from the posts imported from flickr
Author: Kieran O'Shea
Author URI:
Version: 1.0

// Apply function to remove content from posts in the correct category
function fixFlickr($content) {
global $post;

$first_cat_id = get_the_category($post->ID);
$first_cat_id = $first_cat_id[0];
$first_cat_id = $first_cat_id->cat_ID;

$flickr_image = get_post_custom($post->ID);
$flickr_image = $flickr_image['flickr_original_image'][0];

if ($first_cat_id == 36)
$photo_bit = '<a href="'.$flickr_image.'"><img src="'.$flickr_image.'" width="450" alt="'.$post->post_title.'" border="0" /></a>';
$pwned = explode('<p>',$content);
$pwned = $pwned[3];
$text_bit = '<p>'.$pwned;
$content = $text_bit.'<div style="text-align:center;border:0;">'.$photo_bit.'</div>';
return $content;

// Add filter to the_content
add_filter('the_content', 'fixFlickr');
add_filter('the_excerpt', 'fixFlickr');
add_filter('the_content_rss', 'fixFlickr');
add_filter('the_excerpt_rss', 'fixFlickr');

And there we have it, my own photo blog that leverages power from the Flickr system but which displays in my own way on my own site. If you want to try this by all means test out the above method and code but I must stress that this method is unsupported by me or anyone else. If you try it and get it to work, please comment below. It is worth noting that any phone with a camera and a Flickr upload program designed for it will work in place of a BlackBerry. To all that succeed with this method, happy photo blogging!

Comments (2)    

Twilight Golf

Traditionally James and myself play golf on boxing day but this year due to family commitments we postponed it until today. Due to it being after Christmas there was a lot of demand for tee times so we elected to play in the twilight tranche which essentially means you get a cheaper round but if you don’t play fast enough you don’t finish the course before it gets dark.

After the usual first couple of holes of mediocre warm up golf we settled into a good rhythm and began to hit some spectacular shots. I was noticeably improved since our last round, I think largely due to my recent few visits to Swindon driving range where I have been able to refine my swing and work on shot consistency.

On the back 9 we were dogged by slow players which caused us to come off the boil somewhat in shot consistency and ultimately not complete all 18 holes of the course. Still, we had a thoroughly enjoyable time and it has encouraged me not only to continue my practice sessions on the driving range but to augment them more often with a full round – I think I have the potential to improve my game significantly this way.

Comments off    

BlackBerry Storm

BlackBerry StormAs my mobile contract recently came to an end I decided to avail of a new phone. My old device handled mobile e-mail but the UI was intolerably slow most of the time which made me seek a device which could at least get e-mail right down to a T. With this in mind I decided on the BlackBerry Storm due to the brand reputation in the mobile e-mail arena.

In various tech blogs the storm has been touted as being the iPhone killer but all I was looking for was a smooth, lag free UI and a good feature set so I’ll review it based on my requirements and point out any issues I’ve found in normal use.

Out of the box the first things you notice are the responsive interface and interesting touch screen. Touching the screen on a button merely lights it up. To click on it you have to physically push the screen in slightly until you here it click. While this might sound odd it actually makes for a remarkably intuitive and straight forward experience as you are always sure what you are pressing (it lights up before you click) and you never press anything accidentally (you have to click the screen inwards to select something).

E-Mail comes very easy to the storm. There is a push e-mail service included and providing your e-mail domain has a correctly configured mail server in its DNS all you need to do is enter your e-mail address and access password and you can start receiving all new e-mail while on the move. Sadly your old mail isn’t accessible on the phone but having e-mail delivered instantly without having to poll the server easily makes up for it.

Writing anything on the phone is made easy with the qwerty keyboard which appears when you rotate the phone into landscape position. Typing takes a bit of getting used to as you need to make sure the correct key is lit up before pressing so that you get the correct letter but with practice the keyboard certainly beats a conventional phone keypad, even with predictive text.

Speaking of typing, those familiar with texting will no doubt be familiar with the annoyance that is hitting reply to a text and then forgetting part of the original message you are replying to. With the storm this doesn’t happen as it chains related text messages from a contact together, ie. if you hit reply, you will see the message you are replying to below the text box you are entering your reply in. Further more if you have been sending a few messages to and fro with a contact, you will see the entire conversation threaded together which makes for a much better texting experience.

My last phone (Sony Ericsson W960i) had a problem when taking a backup of contacts on the PC; it locked up all the contacts in a proprietary file format. While I had to bypass this to get my contacts on the storm by syncing the Ericsson with Outlook and then Outlook with the storm, the storm thankfully allows me to take contacts backups into a variety of file formats, including plain text CSV files which should make managing my contacts and ensuring I don’t lose any data a lot easier in the future.

The phone functionality on the storm is simple and presents no real surprises in its operation. Missed calls are shown as a handy icon on the home screen so you know when to switch to phone mode if you’ve not been around to catch a call. The only slight confusion here is how to access the phone mode in the first place. There is no icon on the home screen so the only ways to access it are to receive a call, press the green button or press and hold the BlackBerry button and select the phone icon from the list of applications which pops up. All that said though the call quality is very clear and the easily accessible volume control on the side of the handset makes it easy to cater for different amounts of ambient noise.

The other big thing that the BlackBerry storm has going for it is all the applications that you can install. I could spend a long time detailing all the ones I’ve started to use such as YouTube, Facebook and Flickr but I’ll just go into detail on one spectacular application – Google Maps. The storm has a GPS built in which when combined with google maps as you know it on a PC and a touch screen makes for a wonderful navigation aid. You simply run the maps application and it will tell you where you are. You can then enter a destination and it will give you walking or driving directions. You can then check your progress as your actual position is replotted on the map as you move. If you are in the habit of getting lost or don’t have a good enough memory to recall the directions you printed off the computer without continuously getting said print out from your pocket to check, this application will really make your day.

So are there any negative points? Well not many is the short answer. The long answer includes the inability to rotate photos taken with the on-board camera (thus making uploading portrait pictures on the move impossible), the battery life (I’ve not managed to get more than a days use out of the storm without an overnight charge) and the odd thing that happens when the battery runs down completely.

The other night I forgot to charge my storm and woke up to find it off and unable to be powered up. I connected it to the charger and found that I couldn’t switch it on; I was simply presented with a charging symbol on the screen and an unresponsive set of buttons. The only way I could find to switch it on was to charge for 5 minutes, remove the charger, power on normally and then reconnect the charger when I got to the home screen. The turmoil wasn’t over though. I found that the storm refused to activate radio features (GSM, GPRS etc.) because the battery was too low, even though I had the phone hooked up to the charger. It wasn’t until the phone had charged to 10% that I could use the phone normally when hooked up to the charger. Although I don’t imagine this happening very often as I usually remember to charge up, I found this an unnecessary pain in the ass; every phone I have had until this one could be both switched on and used fully when hooked up to the charge. If I’m simply operating the phone incorrectly feel free to let me know but the instruction manual and google came up with nothing.

That aside though I’m very happy with the BlackBerry Storm. It is by far the best phone I have ever had and it has all the responsiveness and features I could possibly need. I’ve even found some novel uses for it – stand by for my forthcoming article on photo blogging!

Comments (1)    

Boxing Day Walk

Thumbnail of my parents in Verulamium parkIn an attempt to make up for the over-indulgence of Christmas day I went for a boxing day walk in Verulamium park with my parents before we sat down to lunch. Seeing as I can never resist the opportunity to take a few pictures I was accompanied by my camera. Sadly the battery ran out rather quickly after all the flash use on Christmas day but not before I’d taken a few nice shots which I’ve uploaded to my gallery.

Comments off    

Boxing Day Walk

Boxing Day Walk

In an attempt to compensate for the Christmas day over-indulgence we went out for a brief walk in the park before lunch

Comments off    

Family Christmas 2008 Photos

Family Christmas ThumbnailAfter a thoroughly enjoyable family Christmas with a huge meal and all the trimmings, not to mention a relaxed evening and a fair few drinks along the way, the photos from the day are now online. You can view them over in my gallery.

This year I got the tripod out so that I could be included in the family photos around the dinner table and took a few more pictures of people opening their presents, some of which captured expressions reasonably well, although I’m not sure how much I’ll be thanked for putting some of the shots online!

Comments off    

404 Fixed

There has been a long standing Heisenbug on my site which would send users 404 headers, even when there was valid content to return. This wasn’t a significant problem for users who’s browsers would simply render the returned content anyway, but for those that wouldn’t (such as IE) this presented a significant problem in using several areas of my site.

The fix I have put in place simply assesses the link accessed by the user and if the link is in the database as being valid, it forces a 200 Ok status to be sent to the user, thus ensuring valid content will display in all browsers and the correct header will be returned with it.

If you have recently received a 404 error when trying to access a part of my site (particularly the contacts database) then I encourage you to try again.

Comments off    

Family Christmas 2008

Family Christmas 2008

Another great family Christmas described in photographs

Comments off    

« Previous entries