Monthly Archives: March 2011

I mentioned before that I’m working on a new project that combines two big interests of mine, programming and running.

Whenever I run I use a Garmin device for timing and recording. It’s GPS-enabled, so also tracks my location, evelation, speed and pace. It also has a wireless heart-rate monitor. Once I’ve completed a workout, it’s logged in the desktop software they provide, to track my progress and compare with similar activities.

It also provides an option to export the activity as an XML file. This is usually for transferring to other devices, but as a developer, presents a huge opportunity to mess around with the data.

Plenty of people have created mashups with run data (usually map-based) and I’ve often wanted to try my hand too.

I’ve entered the ballot for the London Marathon for the past three years but haven’t ever been successful. I figured if I ever did run, the race would give me a huge volume of data to play with — and besides, would would be far too big an occasion to pass up doing something.

I was unsuccessful this year too, but a friend of mine gained a last minute place at the end of January, so the spotlight turns to her to be the star of the show.

Gemma doesn’t train with a Garmin, she uses the RunKeeper Elite iPhone app which records the same kind of data, so we can perform the same kind of analysis.

Brilliantly, it also publishes the activity to the RunKeeper website live as she’s running.

Where my data would be only accessible after the race, to manipulate and visualise after the fact, her data will be readily available as the marathon is being run.

This means we can map her progress around the course on race day, tracking her position, so we’re able to watch from home or on a mobile device at the event. We will have real-time access to her elapsed time, total distance and metrics like current pace, so we can keep up-to-date with her performance as the race is run, rather than retrospectively look back on the result.

RunKeeper isn’t the only toy to play with.

Gemma is running the race for the charity Rett UK and hopefully, if the application is interesting enough, we can drum up some additional fundraising contributions. She has a Just Giving page, who offer an API to access their data. We can show to-the-minute fundraising levels and take donations from our site.

She’s also inseparable of her iPod when running and has asked friends to contribute tracks to a race day playlist. We’re considering using either the Soundcloud API or Mixcloud API to stream this playlist on the site, synchronised with her start time so visitors can hear exactly what she’s listening to.

Knowing when and where she is on the course, we are able to Tweet updates such as mile paces and intermediate timings, when she’s passed notable landmarks or approaching the finish line. Collecting good-will tweets is also pretty easy with a hash tag or mention.

Another idea is to pull in photos taken on the day, using the time and location data around busy spectator spots. For example, Instagram have recently released an API to retrieve their geolocated pictures.

By querying the API at certain locations at the time we know Gemma has passed them, we can create our own gallery of Where’s Wally style photos in case anyone paps her — if not, we’re left with some nice pictures of the race.

So an assortment of APIs to play with, we should be able to produce something pretty cool. I’ll likely be blogging my experiments with each platform, none of which I’ve worked with before — other than Twitter, back when it was Basic Auth.

Less than three weeks to go, can’t be as hard as actually having to run the twenty-six miles can it?

With a new venture, comes a new set-up. I’m going to be working with a new start-up company, a small outfit that will require some working from home, some working on site, plenty of time spent in odd Wi-Fi spots around London presumably — all amounting to a good enough excuse to purchase a brand new laptop and establish a new development environment.

For some time I’ve been keen to try working with Linux full-time, particularly Ubuntu, the most popular flavour of Linux. So with a brand new system I have an opportunity to try it.

I usually work with Unix-like systems for Web development, but on the server-side and using a virtualisation such as VMware, but infrequently at author time or on the desktop. I figured this is going to be a development machine, prone to be tarnished by experiment (or more likely ignorance), perhaps in need of frequent reset, so why not give it a roll.

Rather than go solo with only an installation of Ubuntu, I decided to dual-boot with Windows 7. I already own a genuine copy of Windows 7 and a few other PC-based applications, particularly Creative Suite for Web, plus this meant I could save some cash on buying a laptop without a pre-installed operating system. The dual-boot also gifts me with a fallback option if I really can’t get on with Linux.

So far as installation goes, there’s really not much to report. Installing Windows came first, a set-up as normal, straightforward but tiresome probably hitting double figures in the number of reboots required to get going. Around seventy updates recommended therein.

Ubuntu was downloaded and burned as a Live CD, running a super-simple installer with a couldn’t-be-easier draggable horizontal slider to determine the partition size.

There are many ways to partition drives, recommended schemes such as those on the Ubuntu docs, but I figured a halfway split would be fine. I can always readdress the partitioning if Linux doesn’t work out or if I end up never touching Windows and need the extra space.

After a few days to playing with Ubuntu, so far so good. Needless to say, now at version 10.10 it’s been a fully realised operating system for some time.

The two flavours, for desktop and netbook, are both fully featured, true alternatives to Windows and Mac OS. No longer only options for developers and the computer-savvy.

They both come with a number of applications pre-installed — browsers, mail and chat clients, image editors, a range of software you’d expect. Anything else you need can be found in the Ubuntu Software Centre, an App Store-like directory of open-source and proprietary software from Ubuntu and trusted third-parties and partners.

Firefox and Thunderbird are amongst the familiar names that come packaged with the basic install and a huge number of common day-to-day applications are widely supported — Chrome, Opera, the Flash player, Skype, all AIR-based apps (such as TweetDeck).

There’s support for iPhone and Android devices and cameras. OpenOffice provides your alternative to Word, Excel and PowerPoint.

I’m currently getting to grips with Evolution Mail (email apps are always fun) and Empathy IM, a chat client that integrates Google Chat, MSN, Jabber — all the usual suspects — akin to Pidgin or Adium.

And the icing on the cake — Spotify have a Linux preview. With that installed, it feels like home. Now I just need to get used to a whole new set of shortcuts and hotkeys.

The Ubuntu docs have a lengthy article about the various ways of dual booting with Windows, on the whole the Community Docs look like a very helpful resource.

The Pomodoro Technique is a time management method developed in the late 1980s by a man named Francesco Cirillo.

The method is simple, you take a 25-minute timer (or anything capable of timing 25 minutes) and work uninterrupted until that time is up. Then you take a 5 minute break, then you repeat. At the end of every fourth working interval, take a longer break – say 15-20 minutes. Sounds easy.

The technique has gained a kind of quasi-cult status online, heralded as one of the most effective modern lifehacks – productivity tricks devised to cut through information overload, frequently adopted by programmers.

So what’s the big deal? Skeptically, you may ask – why do you need to employ this or any technique? Why can’t you just work normally? Particularly of one so straightforward.

Whilst the method is simple, such tricks can be hugely effective. The very process of planning, recording and reflecting on progress and work completed creates a sense of motivation and adds to your feelings of accomplishment. The ‘Pomodoro Timer’, a tomato-shaped kitchen timer (pomodoro is the Italian word for tomato) produces an audible ticking during the working interval, triggering some subconscious drive to get things done.

Cirillo’s view adds that the physical act of winding up the timer confirms the user’s determination to start the task, the kick we need to get going. To overcome the all-too-familiar deadline anxiety.

So over the past month I’ve been working with the Pomodoro Technique. Adopted at the beginning of a new one-month contact, in a new office at a new desk, a clean opportunity to try it out.

Firstly I should say I am usually somewhat skeptical to any kind of technique promising some revolutionary effect, on any level be it relating to money, work or health. I guess I already consider to days to be pretty productive, thanks. I probably only considered the Pomodoro Technique because of the amount of positive testimonials I’ve heard, from a wealth of online sources and more recently from a few people whose opinions I respect.

But I don’t particularly suffer from deadline anxiety, motivation isn’t a problem for me when I’m given a heap of work – in fact I’m the opposite, irritably frustrated when I have nothing to do.

I hoped this would improve my time management, rather than boost my productivity. Too often I’m distracted by checking emails, chat clients or Twitter. By “distracted”, I don’t particularly mean going off-task and browsing intermittently, so much as perhaps in a lull of attention, wonder whether an email response has arrived or message been returned, so I’ll switch windows hit refresh.

For me the technique structured my breaks. It offered the reassurance that I will have the chance to check for that email or tweet in no longer than 25 minutes time. It meant that there was no possibility that I could get caught up in a task that might stretch an hour and therefore cause me to fall behind in anything else.

Ultimately, that I could devote my full attention to the current task and I’ll be reminded of when it’s time for a break, when my timer tells me so.

An essential aim of the technique is to cut down on interruptions, both internal and external. If asked “Do you have time for a quick chat?”, I could confidently say “Yes, in 5 minutes”, or however much time I had left on the clock. I knew that if that ‘quick chat’ became a 10 minute meeting, my work wouldn’t be any more interrupted.

The timer offers an impartial and impersonal structure, an obedience to which relieves the distraction of continual desktop beeps and alerts whilst sharpening your focus on the task in hand.

There are a number of free unofficial Pomodoro applications for desktop and mobile platforms to save you ordering a tomato timer or testing your colleagues patience with a bell ringing every half hour.

I used the Pomodoro Lite iPhone app, which is very straightforward (it’s just a preset interval timer after all), though eats up the battery for use of a whole day.

Focus Booster and Pomodairo are cross-platform AIR-based apps. Both look pretty slick and have additional features such as task lists.

ChromoDoro is an extension for Google Chrome, adding a tomato timer to your toolbar with pop-ups to alert you when you’re done.

Whether I’ll continue to use the technique, I’m not sure. I think as a method of concentrating your focus, or retraining your attention span even, it’s very effective. I didn’t find any revelation, but it didn’t disrupt my normal working day either.

Getting into the hang of it, completing tasks within a 25 minute cycles does result a great sense of accomplishment, feeding a higher level of motivation. It might also surprise you how much you can achieve in 25 uninterrupted minutes. I found myself attempting tasks I would usually estimate taking longer. Perhaps that’s the competitive part of me, but it felt great beating the clock.

The most positive outcome as I say, put a stop to my tendency to allow distractions to creep into working time. Though it would be nice to think that I could achieve that with just a bit more self-discipline instead.

Whilst being still somewhat of a newcomer to the world of freelance development, it’s already very apparent that the call for services is always heavily affected by online trends both technological and fashionable.

It’s quite understandable, that being the nature of the beast – to be adaptable and reactive, to be able to rapidly assimilate new skills. It’s much simpler for employers to call for contractors who have already worked with a certain platform, rather than channel time and resources into training – neither of which are often in disposable measure.

Recently I’ve taken frequent forays into the Facebook platform, both in the form of Canvas-based applications and Facebook-enabled external sites (what was previously known as Facebook Connect). Both however leveraging the Facebook’s core platform functionality, the Graph API, in strikingly similar ways.

Twice I’ve been tasked with projects that have required building bespoke photo manipulation tools.

Specifically, two (unrelated) applications both offering users the ability to select photos from their Facebook albums, apply some choice or combination of filters, effects or creative imagery and produce a processed image as a result. Awarding them free opportunity to download, share, remix or do whatever they please with the final outcome.

The first was Honda’s CR-Z Mode Art, both a Canvas application and third-party site running from the same code base.

This was Flash-based and applied simple run-time blending modes and colour transformations to a user’s profile image, largely relying on a bank of ready-made illustrated assets (of theme selected by the user) to embellish and augment the picture. Snippets of their profile information were also added.

When deciding upon a methodology for the image processing, I initially suggested that it all be handed to a server to make use a library such as PHP’s GD or ImageMagick.

This would take the weight off the client, both in handling the processing itself and in the delivery of aforementioned asset library. Even with a rudimentary grasp, both offer a much more powerful level of image manipulation than I thought easily achievable with Flash.

But Flash was a must. I recommended using Pixel Bender, mainly for selfish reasons, but also because it offers a complexity of processing down to the pixel level – but that wasn’t an option due to client-imposed restrictions on the Flash Player version.

More recently I was offered a second attempt with a very similar application with Samsung’s Now Project, an entirely PHP-based Facebook Canvas app.

This application offered the user a number of presets to apply to their image, very much along the lines of Hipstamatic – or rather it’s recent successor, Instagram.

Here we made use of GD’s built-in image filter functions, which are really handy.

A lot of the time GD is called upon for the likes of simple image cropping, rotating or resampling. That describes the most of my experience, anyway.

The filter options however offer control over a number of image properties as common as you’d expect in any image editing software, brightness and contrast for example. There’s conversion to grayscale and colour inverting, there’s a colorize method to handle RGB processing, also blur and smoothing options.

All can be used in combination to achieve a wide breadth of results.

In order to create the desired presets, something requiring a more creative eye than mine, I built a custom tool for uploading and processing images on-the-fly so the project designers could tweak and exact filter combination until they found their ideal results. It provided an option to export the settings so I could implement them later.

I’ve recreated that tool in a simpler form here. This one was thrown together very quickly this evening, there are a few images to choose from and a number of settings – it’s all achieved entirely with the GD library. Almost completely untested, not optimised whatsoever – so you’ll have to bear with the waiting time. Have a play!

You get the idea anyway.

GD can be used for watermarking images, often seen applying a transparent PNG to the corner of a picture, say. The same process is used to apply vignettes and overlays of scratches or noise in this example.

It’s really adaptable and still really useful – it hasn’t seen an update since November 2007.

Full source code for the tool is available on GitHub.

At some point I seem to have forgotten I had a blog.

It’s handy when you get into a habit of blogging regularly, be it as I did documenting thoughts or ideas for my own reference or writing up the odd workshop or seminar report for anyone that may have miss it, or unravelling some epiphanic solution to some stumbled-upon (most likely programming) problem on the off-chance that someone else may one day search for the same answer.

Writing was, at that point, with a habitual ease but I guess I got into the habit of not doing those things – and as a result haven’t touched this blog since January of last year. Annoyingly, departing with an unwitting optimism in retrospect.

Anyway much has happened since that time, including a change of career path – I’m now working freelance full-time.

Also within that time I published a portfolio of work, from my time with various agencies and a period moonlighting before making the jump to fully-realised freelancing. Another effort far-too-long in coming finally achieved (insert some proverb about shoemaking) and you can see it here:

Comments welcome.

Activity with iheartplay has also picked up. We have a few new projects in motion and recently took a trip to Berlin for the superb Transmediale festival.

So far the projects go, I’m hoping those will supply most of the ammunition for getting back into the swing of writing here.

One of our technical objectives is to write and publish the code that we produce. A recent undertaking with a local urban farming initiative called FARM:london, may bring the first of those offerings in the form of an open source HTML5-based WordPress framework theme.

Though nothing ground-breaking technically, sentimentally it will stand as the first code-based output from the group. Initiating not only a philosophical accord but more practically a reusable application for other projects, whether they be ours or yours. It’ll actually be used for the redesign of this blog.

Oh and that’ll be released through GitHub, which I have no clue about – so there’s be a post, right there.

It’s an incentive for us all in taking on extracurricular work with iheartplay that we’re able to explore all opportunities to play with new technologies, platforms and people that our everyday jobs may not otherwise produce.

Recently I’ve been able to combine two personal loves of programming and distance running in a project which tracks the live location, pace, speed (and all the rest) of an iPhone-carrying athlete with a pretty nifty hack and a bespoke API layer written from scratch.

That’s something I’ve only had a few days to work on but already clocked up three new API and frameworks encounters that deserve a few paragraphs of diatribe.

So, reinvigorated with an passionate (none whatsoever trivial) outlook on blogging, building, the Web and the future, watch this space – or I’ll just see you again in a year.

Sorry about that.

I went out for a ride and I never went back.