skip main content

Archive for December, 2008

Experiments in Cocoa #1 RadioAunty

posted by Duncan at 9:47 pm on December 12th, 2008

[UPDATE] I’ve updated the app to now use the new higher quality live streams. Yay, no more RealPlayer for the majority.

I’ve seem to have spent a lot of time reading about Cocoa without actually building anything of substance. So to put a change to that I have built RadioAunty.

1. RadioAunty – This is a Cocoa Application that lets you listen to the radio, BBC radio, on your desktop. You can view the current schedule and select listen again shows, as well as simply changing the station via the menu bar and via the Dock. You can also set preferences to decide which should be your default Station to start with, and whether you would like to receive updates to the application when they are available (very important). If you have listened to BBC radio via Safari, then RadioAunty should work just fine for you.

Download RadioAunty from it’s project site


There are now many *.frameworks that come as part of the Apple Developer Tools and I found it pretty daunting to start with. So to make life easier for myself, I decided to start small and build bigger as I go along. This is why I started with the simple idea of RadioAunty. Oh and it’s Leopard only because it seemed silly to have to learn old ways of doing things as well as new.

RadioAunty is at a high level not that complex. It basically embeds an already existing webpage into a desktop app. It seemed like an ideal starting point. Once I had got that working (Thanks Apple, it takes about 3 lines of code!), the next thing was to make use of other classes and functionality to actually learn something. The app as it stands uses only uses these Cocoa classes (I’ve left the boring ones out):

I’ve used @property quite a lot (properties are a bit like Ruby :attr_accessor) to automagically create getter and setters. I have also use key-value bindings, which once I understood them were amazing, and allow you to chop huge chunks of code from your source. I use a stations.plist to store the radio station data, but hope to pull that from the web in the future, meaning that it could play any radio station and not just the BBC’s. I also use delegation a lot whenever I can.

As I only started the app on Tuesday, I’ll continue making it more polished, that and I have a few other ideas, but I wanted to get something out for people to use as quickly as possible, so first main thing to add (apart from the radio) was auto-updating. This is taken care of by Sparkle 1.5b6.

Sparkle was super simple to implement. Their wiki documentation worked great, and I was amazed that something I always think is cool, and take for granted was so smooth to implement in this application. If you’re building OSX applications then this should surely be a must.

I have a few other projects in the pipeline, that incorporate more frameworks for me to learn, so stay posted. I’m progressing well with is an app called LeaveFrom, that does what is says on the tin really. It uses Core-Data which again had a bit of a learning curve, but I’m getting on ok. Can my old brain take all this new fun information.

Experiments in Quartz Composer #1

posted by Duncan at 10:39 am on December 12th, 2008

I was playing with Quartz Composer about 6 months ago, and created a couple of compositions during my learning’s. I never really posted up links to them, so I’ve now rectified that below. I have to say I really enjoyed playing with QC and look forward to the all new more powerful version in Snow Leopard.

1. BBC ScreenSaver : This was my first and is an image attached to a layer, that is cloned and skewed over time, with muted colours and alpha transparency added.
OSX Screensaver

2. iTunes Flames Visualiser : This only works in iTunes and will pulse the flames based on the sound frequencies in the currently playing track. It also shows the now playing data.
iTunes visualiser

A beautiful winters day in Godalming

posted by Duncan at 11:06 pm on December 8th, 2008

I don’t often post about photos I’ve taken but I quite like these ones, and it was such a beautiful day. I really do like living back in the countryside.


You can see the full set over at flickr.

BBC Radio Facebook app give-away

posted by Duncan at 2:54 pm on December 7th, 2008

A year and a half or so ago I wrote a Facebook app called BBC Radio. It’s main reason for being, was to easily let you listen to BBC Radio whilst on Facebook, showing friends which networks you liked and when you listened to them as well as now/next information, and for me to understand how to build an app using the then new Facebook Developers Platform.

BBC Radio facebookThis is what appeared on you Profile Page

The app has now been switched off, and the application page will be removed just as soon as I finish this post (here is a link to a screengrab of the BBC Radio Facebook App page that was). This is due to lack of permanent hosting and to be honest interest from me to keep it going. Whilst the app was running I had a constant barrage of emails asking me if I could build them similar for their radio station. Other than give people advice, I never did. Anyway, now it’s been switched off, I’d like to give the source out to anyone who wants it. Before I give out the location, first some facts and stats:

  • It’s a Ruby on Rails 2.0.1 app running via Mongrel
  • It was deployed with Capinstrano
  • It only uses publicly available BBC data
  • It ran for over a year without me touching it
  • It was hosted on Amazon EC2 without problems
  • Application stats before switch-off:
    • Total Users: 18000
    • Monthly Active Users: 885
    • About Page Fans: 885
    • Radio Listens by the app: 30000

So there you go. You can now go and download all the source from

[REALLY IMPORTANT] This source comes as is, with no support what so ever. It was written at speed and with no concern for code quality, so I take no responsibility for how good or bad the source is, how few tests there are, and whether you can get it working or not. If you do choose to use it for anything though, it would be nice if you gave me a mention in some small way.

BBC Programmes iPhone webapp experiment

posted by Duncan at 2:47 pm on December 3rd, 2008

A while back, just as they released the iPhone SDK, I started to build an iPhone webapp for BBC Programmes using it’s restful API.

BBC Programmes iPhone webapp

Actually, I only got as far as showing programme day schedules, but thought I’d stick it up for people to try anyway. I decided to use only DashCode to build it, and not use any external JS libraries or wrap it into a Rails app etc. It means it’s essentially a big lump of JavaScript.

You can view the site and download the project source from below. Maybe people out there can turn it into a fully functioning iPhone version of the main site.

back to the top