Stripping out MIME headers

August 18th, 2009

A couple of years ago, I wrote a small plugin for Outlook Mobile (the version of Outlook that you get on Windows Mobile phones) to help me triage my emails.

The idea was to make it quicker to process my email from my phone, by adding a couple of context menu items to emails that let you create a new To Do item in Outlook Tasks, or a new diary entry in Outlook Calendar.

So if someone sends you an email asking you to do something, with one tap you can create a new To Do list item, pre-filling it with information from the email.

And if someone sends you an email about an event or meeting you need to go to, with one tap you can create a new Calendar item, prefilling it with information from the email.

Read the rest of this entry »

Where did your electricity come from?

August 17th, 2009

Where did my electricity come from?It’s been a while since I posted about CurrentCost stuff, so time to share another little idea.

Last night I made a start on adding a new graph type to my CurrentCost application.

Instead of only displaying how much electricity you’ve used, the new graph displays the split of how that electricity was generated.

Realtime figures for the “energy mix” of ratios of different generation methods used in the UK National Grid are available in an XML feed that updates every five minutes.

Read the rest of this entry »

Pub/Sub for Child Protection

August 15th, 2009

I went on a training course yesterday to learn more about the Independent Safeguarding Authority (ISA). ISA is the public body that will be responsible for registering and vetting people who work with children. It was created by the Government in response to the Bichard Inquiry that followed the Soham Murders.

There was way too much covered in the course to fit in a single post, but there was one particular bit worth mentioning.

The biggest limitation with the existing CRB (Criminal Records Bureau) checks is that it’s a snapshot – a one-off check.

It’s a piece of paper that tells you that the owner had no convictions at the time the paper was printed. But it doesn’t tell you if the owner went out and committed a crime the day after the paper was printed. If a CRB check isn’t repeated for a few years, it can be years before this is discovered.

ISA registration is different. Once registered, someone is continually monitored.

Read the rest of this entry »

Authenticating with an OAuth 1.0a provider from .NET CF

August 14th, 2009

Last night, I shared my first stab at a mobile Fire Eagle client: a Windows Mobile application which posts location updates to the Yahoo! Fire Eagle service.

A couple of the bits of code were fiddly, and are worth sharing.

In this post, I’ll outline how I perform the code behind the OAuth authentication I described in my last post. Hopefully, this might help anyone else wanting to do something similar.


Read the rest of this entry »

A Fire Eagle updater for Windows Mobile

August 13th, 2009

I wrote a Fire Eagle web service at Open Hack London a few months ago – that gave a nice, mobile-friendly way to share your current location, as stored in Fire Eagle.

Last week, I finally got round to updating my Fire Eagle Guest Pass web service to use the newer OAuth 1.0a.

This got me thinking that I haven’t used it very much since writing it in May… because while it let me share where Fire Eagle thinks I am, I didn’t have an easy mobile-friendly way to tell Fire Eagle where I am in the first place! 🙂

So while I had “how to do OAuth” fresh in my mind, I thought I’d start writing a quick mobile Fire Eagle client.

I wrote it in C# for Windows Mobile. There are a few interesting points in the code that deserve their own blog posts, but first I wanted to quickly show what I’ve got working so far.

Read the rest of this entry »

What programme was on Channel 4…?

July 28th, 2009

I posted yesterday about my quick play with the BBC Web API for programme schedules. I wanted to be able to programmatically find out what programme was on a particular channel at a given time.

The problem with the quick code I came up with was that it only gets me BBC channels. What if I want to know what was on a non-BBC channel?

Andrew pointed me at the Radio Times website, which makes programme schedule data available in XMLTV format.

And Dom pointed me at a neat Python library for parsing XMLTV data.

Read the rest of this entry »

What programme was on BBC1 at…?

July 27th, 2009

After my absence, I thought I’d come back with something quick and fun – the result of half an hour’s playing with a new (to me) API.

The problem that I wanted to look into was: What programme was on TV on a given channel at a given time?

And how can I find this out programmatically?

The first thing that I came across was the getProgrammes service in the beta BBC Web API.

As I expect from the forward-thinking BBC, it’s pretty awesome: a simple API that gives you an XML document containing the programmes schedule for the specified time window.

The documentation on the BBC site is pretty self-explanatory. It gives all the information you need to start playing with the API – either using the form on the BBC page, or by sending it a few requests using wget.

Read the rest of this entry »

I’m back!

July 27th, 2009

I’ve been a little quiet on things like twitter recently, and silent on my blog here. Work has been very busy for the past month or so, and everything else kinda got put to one side while I focused on it.

It was an interesting project: an interesting mixture of IBM server products and web development, including following James into the wonderful world of iWidget development.

But – after 8000 lines of JavaScript, 500 lines of Java, 15,200 words of documentation, and 6370 miles of customer travel – it’s all done and delivered.

Woot. I’m back. Normal deranged service will be resumed shortly. 🙂