<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marc Hibbins &#187; iheartplay</title>
	<atom:link href="http://blog.marchibbins.com/category/iheartplay/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.marchibbins.com</link>
	<description>Freelance Web developer, blogger</description>
	<lastBuildDate>Wed, 21 Sep 2011 11:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>As Long as You Follow</title>
		<link>http://blog.marchibbins.com/2011/05/18/as-long-as-you-follow/</link>
		<comments>http://blog.marchibbins.com/2011/05/18/as-long-as-you-follow/#comments</comments>
		<pubDate>Wed, 18 May 2011 22:48:19 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1707</guid>
		<description><![CDATA[Integrating Twitter into Beats Per Mile to send automatic progress updates, authenticating with OAuth and using the TwitterOAuth PHP library.]]></description>
			<content:encoded><![CDATA[<p>The final part of <a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">Beats Per Mile</a> worth mentioning is the Twitter integration.</p>
<p>The application was designed to send automated tweets on Gemma&#8217;s behalf <a title="Gemma Bardsley (gemb1) on Twitter" href="http://twitter.com/gemb1" target="_blank">from her personal Twitter account</a> giving updates of her progress to those following.</p>
<p>Mainly the tweets would report her current location for the purposes of spectators waiting ahead, others would be sent at intervals of a mile or so to report pace and ongoing form.</p>
<p>Similar to the <a title="Moving Pictures by Marc Hibbins" href="http://blog.marchibbins.com/2011/05/16/moving-pictures/" target="_blank">mechanism for fetching Instagram images</a> at predetermined locations on the course, the application contained a list of agreed points at which to tweet.</p>
<p>These were at landmarks and certain spectator spots too, but also at course milestones — the first mile complete, halfway complete, one mile to go etc, as well as the start and finish.</p>
<p>The application monitored the elapsed distance and updated accordingly, grabbing the latest time and <a title="Keep On Running by Marc Hibbins" href="http://blog.marchibbins.com/2011/04/13/keep-on-running/">statistics from the RunKeeper data</a>, as well as geolocating the tweet with the latest set of GPS coordinates.</p>
<p>Since Twitter <a title="Basic Auth Shutdown | dev.twitter.com" href="http://dev.twitter.com/pages/basic_auth_shutdown" target="_blank">deprecated support of Basic Auth</a>, applications much authenticate users with OAuth to gain write access.</p>
<p>This means rather than handing over your username and password to applications and trust (hope) that they’re friendly — <a title="Keep it to Yourself by Marc Hibbins" href="http://blog.marchibbins.com/2009/05/06/keep-it-to-yourself/">as used to be the only way</a> — OAuth allows applications to request access on your behalf without users ever parting with precious login credentials. You simple give, or deny, permission.</p>
<h3><a name="Using_TwitterOAuth" class="anchor">Using TwitterOAuth</a></h3>
<p>Twitter offer a number of links to <a title="Twitter Libraries | dev.twitter.com" href="http://dev.twitter.com/pages/libraries" target="_blank">OAuth libraries</a> for various languages to make the this job a lot easier. There are many Twitter specific OAuth libraries in particular, purposely tailored for the API.</p>
<p>I picked up PHP-based <a title="abraham/twitteroauth - GitHub" href="https://github.com/abraham/twitteroauth" target="_blank">TwitterOAuth by Abraham Williams</a>, which gets you up and running very rapidly.</p>
<p>The <a title="Authenticating Requests with OAuth | dev.twitter.com" href="http://dev.twitter.com/pages/auth" target="_blank">OAuth flow is documented at length</a>, but essentially performs three major tasks:</p>
<ul>
<li>Obtains access from Twitter to make requests on behalf of a user</li>
<li>Directs a user to Twitter in order to authenticate their account</li>
<li>Gains authorisation from the user to make requests on their behalf</li>
</ul>
<p><br/>This is achieved with a cycle of exchanging authenticating tokens between application and Twitter to verify permission. TwitterOAuth particularly creates a session object in your application and rebuilds itself with each token exchange to remain contained in a single class instance.</p>
<p>In a very abridged manner, something like the following:</p>
<blockquote><p>// Build TwitterOAuth object with client credentials<br />
$connection = new TwitterOAuth(<strong>CONSUMER_KEY</strong>, <strong>CONSUMER_SECRET</strong>);<br />
// Get temporary credentials to allow application to make requests and set callback<br />
$request_token = $connection-&gt;getRequestToken(<strong>OAUTH_CALLBACK</strong>);</p></blockquote>
<p>This initial call verifies your application has access the Twitter API, basically that it&#8217;s registered and good to go. Twitter returns two tokens, if successful, that we store:</p>
<blockquote><p>$_SESSION['oauth_token'] = $request_token['<strong>oauth_token</strong>'];<br />
$_SESSION['oauth_token_secret'] = $request_token['<strong>oauth_token_secret</strong>'];</p></blockquote>
<p>Then the application sends the user to Twitter to authorise it’s access, using a URL generated with the token received above:</p>
<blockquote><p>$authoriseURL = $connection-&gt;getAuthorizeURL(<strong>$request_token['oauth_token']</strong>);<br />
header(&#8216;Location: &#8216; . $authoriseURL);</p></blockquote>
<p>On successful authorisation Twitter will return the user to your callback URL (set above) with a verification token. TwitterOAuth now rebuilds for the first time with the OAuth tokens in our session and uses the new verification token to get an a new access token which will grant us user account access:</p>
<blockquote><p>// Create TwitterOAuth object with application tokens<br />
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, <strong>$_SESSION['oauth_token']</strong>, <strong>$_SESSION['oauth_token_secret']</strong>);</p></blockquote>
<blockquote><p>// Request access tokens from Twitter on behalf of current user with verifier<br />
<strong>$access_token</strong> = $connection-&gt;getAccessToken(<strong>$_REQUEST['oauth_verifier']</strong>);</p></blockquote>
<p>This final request gets us two OAuth tokens specific to the current user, allowing us to make requests on their behalf, with which TwitterOAuth rebuilds again:</p>
<blockquote><p>// Rebuild TwitterOAuth object with user granted tokens<br />
$connection = new TwitterOAuth(<strong>CONSUMER_KEY</strong>, <strong>CONSUMER_SECRET</strong>, <strong>$access_token['oauth_token']</strong>, <strong>$access_token['oauth_token_secret']</strong>);
</p></blockquote>
<blockquote><p>// Test that everything is working<br />
$connection-&gt;get(&#8216;account/verify_credentials&#8217;);</p></blockquote>
<p>The dance made a hell of a lot easier with a library such as this.</p>
<p>Usually applications store these tokens final two tokens, the user generated <strong>oauth_token</strong> and <strong>oauth_token_secret</strong>, which saves the need to authorise the user again.</p>
<p>Storing these details (in a session or database) means that a username and password need not be saved. The tokens are good until the user revokes access, no sensitive information is ever released to the application, all the user ever gives is their permission.</p>
<p>With access tokens stored, the connection to Twitter is a lot simpler — just create the TwitterOAuth object with those user-generated codes as in the very last step, without any of the redirecting to and from Twitter.com. Of course, those tokens could only have ever been obtained by carrying out the full process to begin with.</p>
<p>Beats Per Mile is a <a title="Using one access token with OAuth | dev.twitter.com" href="http://dev.twitter.com/pages/oauth_single_token" target="_blank">single-user case application</a>, so Gemma only had to authenticate the application once and then we hard-coded them into the scripts.</p>
<h3><a name="Tweet_Away" class="anchor">Tweet Away</a></h3>
<p>With access granted the application was free to send out updates, based on the run data we were collecting and posting it directly.</p>
<p>As mentioned, locations translated into distances and that’s when we tweeted.</p>
<p style="text-align: center;"><a href="http://twitter.com/gemb1/status/59570220540493824" target="_blank"><img class="aligncenter size-full wp-image-1708" title="Beats Per Mile over Tower Bridge" src="http://blog.marchibbins.com/wp-content/uploads/2011/05/tweet-1.jpg" alt="" width="500" height="261" /></a><a href="http://twitter.com/gemb1/status/59602876221227008" target="_blank"><img class="aligncenter size-full wp-image-1709" title="Beats Per Mile past Big Ben" src="http://blog.marchibbins.com/wp-content/uploads/2011/05/tweet-2.jpg" alt="" width="500" height="261" /></a><a href="http://twitter.com/gemb1/status/59573365601603584" target="_blank"><img class="aligncenter size-full wp-image-1710" title="Beats Per Mile halfway" src="http://blog.marchibbins.com/wp-content/uploads/2011/05/tweet-3.jpg" alt="" width="500" height="261" /></a></p>
<p>At mile twenty, it looked back at the mile splits so far and reported which were the fastest:</p>
<p><a href="http://twitter.com/gemb1/status/59589487105282048" target="_blank"><img class="aligncenter size-full wp-image-1711" title="Beats Per Mile fastest miles" src="http://blog.marchibbins.com/wp-content/uploads/2011/05/tweet-4.jpg" alt="" width="500" height="285" /></a></p>
<p>Relying on the total reported distance alone was flawed. There was a slight hiccup when RunKeeper lost GPS coverage under Blackfriars tunnel and in an attempt to compensate found the nearest location to be the other side of the Thames.</p>
<p><img class="aligncenter size-full wp-image-1712" title="RunKeeper getting confused" src="http://blog.marchibbins.com/wp-content/uploads/2011/05/wonky-map.jpg" alt="" width="500" height="261" /></p>
<p>This caused a problem by adding extra distance to her total, so some of the latter tweets (“one mile to go”, for example) posted a little prematurely.</p>
<p>It was more of a problem for Gemma when running, the app announcing in her ear that she’d run further than she had, disheartened to see mile markers on the course thought to have already passed.</p>
<p>This is also why the total distance on the site clocks up to 27.65 miles, the race was long enough as it is!</p>
<p>The final touch to was to drop them on the map, alongside the Instagram images.</p>
<p><a href="http://coffeeandpie.net/beatspermile/" target="_blank"><img class="aligncenter size-full wp-image-1713" title="Tweets and Images on the map" src="http://blog.marchibbins.com/wp-content/uploads/2011/05/on-the-map.jpg" alt="" width="500" height="330" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/05/18/as-long-as-you-follow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Pictures</title>
		<link>http://blog.marchibbins.com/2011/05/16/moving-pictures/</link>
		<comments>http://blog.marchibbins.com/2011/05/16/moving-pictures/#comments</comments>
		<pubDate>Mon, 16 May 2011 22:22:08 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1679</guid>
		<description><![CDATA[How Instagram's new API served images for Beats Per Mile, using real-time location data to find geotagged images nearby our runner.]]></description>
			<content:encoded><![CDATA[<p><a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">Beats Per Mile</a> uses the <a title="instagr.am" href="http://instagr.am/" target="_blank">Instagram API</a> to find pictures taken around the marathon course.</p>
<p>We decided we’d need to find a way to put pictures on the map quite early on, knowing Gemma couldn’t be the one to stop and take them. Rather than try to pin a camera to her vest or strap one to a hat, the simplest solution was to find photos taken by spectators.</p>
<p>The <a title="instagr.am - A More Open Platform: The Instagram API" href="http://instagr.am/blog/40/instagram-api" target="_blank">Instagram API is fairly new</a> and the app itself is getting extremely popular. Being mobile-based, we hoped it would be popular among spectators on the day, taking quick snaps and hopefully uploading a good amount of photos to dig around in.</p>
<p>The pictures are geo-tagged as well as captioned, so we could perform location queries and text-based searches (ultimately, a combination).</p>
<p>Firstly we agreed on places around which we’d search for pictures — busy spectator spots and London’s landmarks.</p>
<p>The idea was to look for pictures at these places as Gemma passed them. So we translated them into distances, i.e. determine the elapsed distance that would have been run when reaching each of these places.</p>
<p>Tower Bridge, for example, is at 12.5 miles. Big Ben is at 25 miles and so on — for about 10-15 hotspots.</p>
<p>The application monitored the total distance covered and at each of these key numbers hit the Instagram API for the most recent pictures around the location.</p>
<p>Setting up an Instagram application is instantaneous, though I waited a long time for my API key initially — I did apply when the announcement was first made however, so the turnaround may be a lot faster now.</p>
<p>There’s no moderation or application approval process, when you’re up and running you can start performing queries immediately.</p>
<p>The API is RESTful over HTTPS with a number of endpoints to query images, comments, users, locations, tags and so on. The <a title="Instagram API" href="http://instagr.am/developer/" target="_blank">developer docs</a> are fairly comprehensive.</p>
<p>We’re interested in the media endpoint. Note that the following URLs require an access token or client id, which you will be given, omitted here for brevity.</p>
<p>Get the current most popular photos:</p>
<blockquote><p>https://api.instagram.com/v1/media/popular</p></blockquote>
<p>Or to get information about a single image with a media id:</p>
<blockquote><p>https://api.instagram.com/v1/media/<strong>72612696</strong></p></blockquote>
<p>The search method was our main tool. It takes up to five parameters, <strong>lat</strong>, <strong>lng</strong>, <strong>max_timestamp</strong>, <strong>min_timestamp</strong> and <strong>distance</strong>.</p>
<blockquote><p>https://api.instagram.com/v1/media/search?<strong>lat=51.54242</strong>&amp;<strong>lng=-0.059702</strong>&amp;distance=<strong>1000</strong></p></blockquote>
<p>Note only latitude and longitude parameters are required and distance is in meters, default at 1km with a maximum of 5km.</p>
<p>So at each of our key distances, the app took the latest latitude and longitude positions and grabbed the latest photos.</p>
<p>In an attempt to only select images of the marathon, this was backed up by inspecting within the result set for images with a caption containing any one of a set of predefined keywords such as ‘marathon’ or ‘runners’. That way we could almost ensure that we wouldn’t pick up any images not concerned with the race — though would find false positives.</p>
<p>Once we had the JSON data it was simply visualised on the map, Instagram host the images for us.</p>
<p>One thing lacking in the data perhaps, is that the location information only offers the latitude and longitude coordinates, no place or address names unless otherwise nominated by the user. For each image then I ran the data through <a title="Google Maps Javascript API V3 Services - Google Maps JavaScript API V3 - Google Code" href="http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding" target="_blank">Google’s Geocoding</a> service to get a street or area name, just for display purposes.</p>
<p>On the whole, it worked well. The API is as straightforward as any and realistically, the biggest worry for us is that most people seem to use Instagram to take pictures of food and little else, we thought we’d have pictures of everyone’s breakfast around various parts of London all day.</p>
<p>Doubtingly, I wrote a simple ‘refresh’ button to rerun any query in case anything untoward or particularly boring popped up when I logged in to check, but between the huge crowds and the caption matching, I only had used it twice and both very early on in the day.</p>
<p>Here’s a handful of the pictures:</p>
<p><a href="http://images.instagram.com/media/2011/04/17/9e0a5b2f7ade49899839225e66ffff3c_7.jpg" target="_blank"><img style="margin-top: 10px; margin-right: 10px;" src="http://images.instagram.com/media/2011/04/17/9e0a5b2f7ade49899839225e66ffff3c_7.jpg" alt="" width="150" height="150" /></a><a href="http://images.instagram.com/media/2011/04/17/83301708cf86499d838ef2907f4f0877_7.jpg" target="_blank"><img style="margin-top: 10px; margin-right: 10px;" src="http://images.instagram.com/media/2011/04/17/83301708cf86499d838ef2907f4f0877_7.jpg" alt="" width="150" height="150" /></a><a href="http://images.instagram.com/media/2011/04/17/2fa5fa73fe464a409d39e6d8889b8eb8_7.jpg" target="_blank"><img style="margin-top: 10px; margin-right: 10px;" src="http://images.instagram.com/media/2011/04/17/2fa5fa73fe464a409d39e6d8889b8eb8_7.jpg" alt="" width="150" height="150" /></a><a href="http://images.instagram.com/media/2011/04/17/d039ae5ae25e4b2a9920c080c437e44f_7.jpg" target="_blank"><img style="margin-top: 10px; margin-right: 10px;" src="http://images.instagram.com/media/2011/04/17/d039ae5ae25e4b2a9920c080c437e44f_7.jpg" alt="" width="150" height="150" /></a><a href="http://images.instagram.com/media/2011/04/17/aa0bbbc18734426ab1e1c2c0b8537134_7.jpg" target="_blank"><img style="margin-top: 10px; margin-right: 10px;" src="http://images.instagram.com/media/2011/04/17/aa0bbbc18734426ab1e1c2c0b8537134_7.jpg" alt="" width="150" height="150" /></a><a href="http://images.instagram.com/media/2011/04/17/b0916949b8b44fdc9d02a9dd33cc6eb6_7.jpg" target="_blank"><img style="margin-top: 10px;" src="http://images.instagram.com/media/2011/04/17/b0916949b8b44fdc9d02a9dd33cc6eb6_7.jpg" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/05/16/moving-pictures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Show Must Go On</title>
		<link>http://blog.marchibbins.com/2011/04/27/the-show-must-go-on/</link>
		<comments>http://blog.marchibbins.com/2011/04/27/the-show-must-go-on/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 20:06:55 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1654</guid>
		<description><![CDATA[How Beats Per Mile handles the music, initially attempting to use SoundCloud only to be thwarted by copyright infringement, ultimately to build a player from scratch just in time.]]></description>
			<content:encoded><![CDATA[<p>One of the key features of <a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">Beats Per Mile</a> was the ability to listen to a &#8216;stream&#8217; of Gemma&#8217;s iPod playlist, enabling you to hear exactly what she was listening to whenever you logged on.</p>
<p>We didn&#8217;t actually have a stream broadcasting from her iPod of course, rather a stream playing from the site that was synchronised with her start time.</p>
<p>We planned on using the <a title="SoundCloud Developers" href="http://developers.soundcloud.com/" target="_blank">SoundCloud API</a> to do this and  it was one of the last thing left to build before race day.</p>
<p>Part of the playlist was curated by friends, donated tracks with sentimental value or just old favourites for a personal touch and to provide an extra kick of motivation.</p>
<p>Asking a lot of people for contributions meant that the playlist wasn&#8217;t finalised and mixed until very late on — Saturday evening.</p>
<p>I created the player using the <a title="Docs - Widget - SoundCloud Developers" href="http://developers.soundcloud.com/docs/widget" target="_blank">SoundCloud Player Widget</a> in preparation for the tracks hoping that the player would be ready before they were uploaded.</p>
<p>It&#8217;s a Javascript-enhanced Flash Widget which uses Actionscript&#8217;s ExternalInterface to expose method handlers and control playback via a in-built API.</p>
<p>Unfortunately this meant it wouldn&#8217;t play on the iPhone. SoundCloud do offer a HTML5-based <a title="Docs - Custom Player - SoundCloud Developers" href="http://developers.soundcloud.com/docs/custom-player" target="_blank">Custom Player</a> (which falls back to Flash), but we didn&#8217;t have time to fully investigate wrangling together a player from scratch.</p>
<h3><a name="SoundCloud_Content_Identification" class="anchor">SoundCloud Content Identification</a></h3>
<p>This would be shortly be rendered irrelevant when we discovered that it is now nearly impossible to upload any copyrighted songs, or tracks containing any samples of copyrighted songs, to SoundCloud. We also discovered that they&#8217;re very, very clever in how they go about detecting them.</p>
<p>Here’s <a title="SoundCloud » Blog Archive » Q&amp;A: Our New Content Identification System" href="http://blog.soundcloud.com/2011/01/05/q-and-a-content-identification-system/" target="_blank">what they wrote in January</a>:</p>
<blockquote><p>Starting in the last few weeks we’ve turned on an automatic content identification system, similar to those used on other major media sharing sites. The system is used primarily for identifying audio that rightsholders have requested to be taken off SoundCloud. This is good news because it makes it easier for artists, labels and other content owners to control how the content they’ve created is available. And when you upload your own audio to SoundCloud, we can find out more quickly if somebody is uploading a copy to their own page without your permission.</p></blockquote>
<p>SoundCloud have always has the right to remove audio deemed in violation of rights as stipulated in their <a title="Terms of Use on SoundCloud - Create, record and share your sounds for free" href="http://soundcloud.com/terms-of-use" target="_blank">terms of use</a>. They also host plenty of mixes and DJ sets as many other similar sites do.</p>
<p>When we tried to upload ours though, nothing would work. None of our mixes were authorised and the refusals would come after spending considerable (precious) time attempting to upload them.</p>
<p>SoundCloud are essentially performing some kind of wave form analysis, comparing uploads to audio already in their databases to detect duplicates.</p>
<h3><a name="Alternatives" class="anchor">Alternatives</a></h3>
<p>There are a few ropey ways to (possibly) slip the net, such as adding a layer of low-level noise to distort the wave form or apply an amount of time-stretching (which was happening anyway, as songs were mixed together).</p>
<p>Too much of either would ruin the music. We were running out of time and didn’t want to risk any hacked attempt being found later and removed, perhaps mid-marathon in a worst case scenario.</p>
<p>So I began to an attempt to recreate the widget, from scratch after all.</p>
<p>I looked at the <a title="Yahoo! Media Player" href="http://mediaplayer.yahoo.com/" target="_blank">Yahoo! Media Player</a>, which is actually suspiciously similar to SoundCloud&#8217;s Widget API. The methods are almost exactly the same, but I had trouble handling multiple files — it really wasn&#8217;t anywhere near as easy to implement.</p>
<p>After browsing for alteratives I eventually found <a title="jPlayer : HTML5 Audio &amp; Video for jQuery" href="http://www.jplayer.org/" target="_blank">JPlayer</a>, a very simple and easily customisable JQuery plug-in. This would also mean we&#8217;d be iPhone-compatible.</p>
<p>It also meant that the files would need to be hosted ourselves, on a normal server, rather than letting SoundCloud handle the load — another reason for our initial choice. We actually ended up serving 7.68GB of streamed audio, fortunately my host is very stable and it didn&#8217;t end up being a problem.</p>
<p>When visitors landed on the page the player would calculate how long the run had been in progress and therefore where you should be in the playlist. The idea was to give no controls, other than mute, the playback would always be synchronised.</p>
<p>Rather than upload all the songs individually, the playlist was divded into five 30-60ish minute tracks and would be easier to navigate.</p>
<p>Once the player determined what track you should be on and where within that the playhead should be, it begins to buffer. Annoyingly, you could have been waiting some time. If the tracks were on SoundCloud’s giant servers then the audio would be properly streamed, but not from mine.</p>
<p>The wait entirely depended on when you happened to arrive, for some it wasn&#8217;t a problem. Say you luckily arrived at the page needing only to jump in five minutes on the current track, you&#8217;d have a small waiting time. If the jump was twenty-five minutes, then start twiddling your thumbs.</p>
<p>There wasn&#8217;t a wait when the player switched between tracks. If a track was paused, the player would record how long for and resume at a later point — where the playhead would otherwise be if you hadn&#8217;t paused, not where you left off.</p>
<p>This also took into account track changes if you paused toward the end of a track or paused for more than the duration of an entire part.</p>
<h3><a name="Back_to_the_Cloud" class="anchor">Back to the Cloud</a></h3>
<p>SoundCloud have an obligation to artists and labels and choose to be very strict in authorising uploads that aren&#8217;t your own. I&#8217;ve wondered how copyright works for these sites, <a href="http://www.mixcloud.com/" title="Home: Listen to trusted DJs, radio hosts &amp; Podcasters. Start here | Mixcloud - Re-think radio" target="_blank">Mixcloud</a> for example host countless mixed songs and sets.</p>
<p>Mixcloud in fact is where you’ll now find the mixes saved indefinitely, without complaint, <a title="gemb1 | Mixcloud - Re-think radio" href="http://www.mixcloud.com/gemb1/" target="_blank">on Gemma’s page</a>.</p>
<p>Have a listen!</p>
<div><object width="300" height="300"><param name="movie" value="http://www.mixcloud.com/media/swf/player/mixcloudLoader.swf?v=106"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="flashVars" value="feed=http://www.mixcloud.com/api/1/cloudcast/gemb1/my-marathon-mix-part-one.json&#038;embed_uuid=690cae07-7e5b-416d-9fb7-89a5ad9ce24c&#038;embed_type=widget_standard"></param><embed src="http://www.mixcloud.com/media/swf/player/mixcloudLoader.swf?v=106" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" flashvars="feed=http://www.mixcloud.com/api/1/cloudcast/gemb1/my-marathon-mix-part-one.json&#038;embed_uuid=690cae07-7e5b-416d-9fb7-89a5ad9ce24c&#038;embed_type=widget_standard" width="300" height="300"></embed></object>
<div style="clear:both; height:3px;"></div>
<div style="clear:both; height:3px;"></div>
</div>
<p><a title="gemb1 - My Marathon Mix - Part One | Mixcloud - Re-think radio" href="http://www.mixcloud.com/gemb1/my-marathon-mix-part-one/" target="_blank">Marathon Mix &#8211; Part One</a><br />
<a title="gemb1 - My Marathon Mix - Part Two | Mixcloud - Re-think radio" href="http://www.mixcloud.com/gemb1/my-marathon-mix-part-two/" target="_blank">Marathon Mix &#8211; Part Two</a><br />
<a title="gemb1 - My Marathon Mix - Part Three | Mixcloud - Re-think radio" href="http://www.mixcloud.com/gemb1/my-marathon-mix-part-three/" target="_blank">Marathon Mix &#8211; Part Three</a><br />
<a title="gemb1 - My Marathon Mix - Part Four | Mixcloud - Re-think radio" href="http://www.mixcloud.com/gemb1/my-marathon-mix-part-four/" target="_blank">Marathon Mix &#8211; Part Four</a><br />
<a title="gemb1 - My Marathon Mix - Part Five | Mixcloud - Re-think radio" href="http://www.mixcloud.com/gemb1/my-marathon-mix-part-five/" target="_blank">Marathon Mix &#8211; Part Five</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/04/27/the-show-must-go-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If You Got the Money</title>
		<link>http://blog.marchibbins.com/2011/04/26/if-you-got-the-money/</link>
		<comments>http://blog.marchibbins.com/2011/04/26/if-you-got-the-money/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 22:43:54 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1642</guid>
		<description><![CDATA[How Beats Per Mile uses the JustGiving platform to show an up-to-date fundraising total using their PHP SDK.]]></description>
			<content:encoded><![CDATA[<p>The fundraising amount shown on <a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">Beats Per Mile</a> uses the <a title="Developer - JustGiving" href="http://www.justgiving.com/developer/" target="_blank">JustGiving API</a> to show the up-to-date figure on Gemma&#8217;s donation page.</p>
<p>By way of one of their various SDKs, the JustGiving API is a doddle to use and is pretty well featured. Unfortunately<a title="JustGiving" href="http://apimanagement.justgiving.com/" target="_blank"> the documentation</a> isn’t particularly comprehensive.</p>
<p>You can expect to be able to fetch any information found on a typical page — event and charity details, lists of donations and comments, even the colour scheme — all of which can be fetched without any need for authentication.</p>
<p>We&#8217;re using the PHP SDK to show a very simple totaliser, the current percentage raised of the target amount. This can be achieved in just a few lines of code.</p>
<p>Firstly you need to register your application, which will get you an API key and access to the staging sandbox. This access is only for development, you can query live pages but the information you&#8217;ll obtain is out-of-date.</p>
<p>Applications go through a two day approval process but require nothing more than an decent application description, from that point on you&#8217;re free to access real pages and live data.</p>
<p>The <a title="JustGiving/JustGiving.Api.Sdk - GitHub" href="https://github.com/JustGiving/JustGiving.Api.Sdk" target="_blank">PHP SDK is available from GitHub</a> and comes with plenty of examples and cover a lot of use cases for data queries.</p>
<p>As I say, the API offers plenty more, such as automatic page creation, user account creation and <a title="Simple Donation Integration - JustGiving" href="https://www.justgiving.com/developer/simple-donation-integration/" target="_blank">integrating donations from third-party sites</a>.</p>
<p>Our needs are far simpler, however. The code is exactly this:</p>
<blockquote><p>include &#8216;./JustGivingClient.php&#8217;;</p>
<p>$client = new JustGivingClient(&#8220;https://api.justgiving.com/&#8221;, &#8220;API_KEY&#8221;, 1);<br />
$page = $client-&gt;Page-&gt;Retrieve(&#8220;Gemma-Bardsley&#8221;);<br />
$funds = $page-&gt;grandTotalRaisedExcludingGiftAid;<br />
$target = round($page-&gt;fundraisingTarget);<br />
$percent_raised = round($funds/$target * 100);</p></blockquote>
<p>As simple as querying the page, grabbing the current total and the target total then determining the percentage.</p>
<p>We retrieve the page via it’s short name, which for us is “Gemma-Bardsley”, this will be set in the JustGiving page admin area.</p>
<p>Note that the target amount has to be explicitly set there too (you&#8217;ll get a similar totaliser on your fundraising page anyway if that&#8217;s set correctly) and this queries the live API staging over HTTPS, not the developer sandbox.</p>
<p>The third parameter sent to the client constructor specifies version one of the API.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/04/26/if-you-got-the-money/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep On Running</title>
		<link>http://blog.marchibbins.com/2011/04/13/keep-on-running/</link>
		<comments>http://blog.marchibbins.com/2011/04/13/keep-on-running/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 18:21:32 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1603</guid>
		<description><![CDATA[How Beats Per Mile uses RunKeeper to retrieve and visualise live running data from an iPhone strapped to a marathon runner.]]></description>
			<content:encoded><![CDATA[<p>Central to the <a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">Beats Per Mile</a> application is the run data, the live information reporting Gemma’s current location, elapsed time, covered distance, average pace and speed.</p>
<p>Working out how to capture this information was our first challenge. Determining whether it was even possible was pivotal as to whether we could build the site.</p>
<p>Before deciding on the eventual solution of using <a title="Running app and fitness community | RunKeeper" href="http://runkeeper.com/" target="_blank">RunKeeper</a>, we looked for a few different routes we could take, of varying levels of complexity.</p>
<p>Fellow <a title="iheartplay" href="http://iheartplay.com/" target="_blank">iheartplay</a> developer <a title="Home › Birdsigh" href="http://birdsigh.com" target="_blank">Tim</a> took up the challenge.</p>
<p>Firstly we considered building our own hardware, the basic idea being a GSM/GPS module for about £50 along with a SIM card with unlimited text messages. The module is then programmed to send it&#8217;s location to Twitter via SMS every minute or so.</p>
<p>There are a lot of posts around with extensive details on how to build this kind of thing yourself, <a title="OHARARP LLC » Twitter Tracker" href="http://ohararp.com/wp/?p=119" target="_blank">here’s one doing exactly that</a>. He’s also considering selling pre-built units, which would save us needing to get our soldering irons out.</p>
<p>With this option, whilst the geo-positioning data would be accurate, you can run pretty far in a minute so the route would be a little raw and wouldn&#8217;t accurately reflect the true path and wouldn&#8217;t look great on a map.</p>
<p>One step further would be to use something like <a title="Open GPS Tracker" href="http://www.opengpstracker.org/" target="_blank">Open GPS Tracker</a>, which is similar but rather than using a combined GSM/GPS module just uses a GPS module plugged directly into a mobile phone.</p>
<p>This particular unit comes pre-built and with firmware, so perhaps might be limited in what we could capture, but otherwise ready to roll straight out of the box and only requires an old (pre-paid) handset. It’s also small in size, easy enough to strap onto a runner or put in a pocket. This comes in around £50ish for parts again, plus $35.91 for the software.</p>
<p>There are commercially manufactured units available too, trackers for mountain climbers, skiers, pilots, sailors and such that aren’t products of home brew electronics.</p>
<p>The <a title="SPOT Personal Tracker" href="http://www.findmespot.eu/en/index.php?cid=101" target="_blank">SPOT Personal Tracker</a> is one option, a satellite GPS tracker with built-in location services including sending your current location to Google Maps in near real-time, specifically for sharing with others at home. Very reliable and robust, tiny and light, the location services lend to exactly what we want to do but it&#8217;s very over-spec. It&#8217;s able to work beyond cellular coverage and above 15,000ft — not particularly necessary for us — and comes in at €149 for the unit and a service charge of €99 for a years use.</p>
<p>It does however come with a particularly impressive distress button, notifying the GEOS International Emergency Response Center in case of emergencies should one press it. Presumably this calls in an airlift or team of S.A.R. St. Bernards, which could come in handy when she hits the wall.</p>
<p>Satellite GPS is more immediately available though, in the form of an iPhone.</p>
<p>Initially we considered developing an app from scratch, but that’s not really anything any of us have done before. We could make an online application running on Safari with the <a title="Geolocation - Dive Into HTML5" href="http://diveintohtml5.org/geolocation.html" target="_blank">Geolocation API</a>, but this would mean having a page open for the entire run and hoping that it doesn’t time out or anything gets pressed on-screen as arms start swinging.</p>
<p>On the app store and found <a title="InstaMapper - Free Real-Time GPS Tracking" href="http://www.instamapper.com/" target="_blank">InstaMapper</a>, a lo-fi and free app which sends location updates to the InstaMapper site which are available via a public API. It’s compatible on iPhone, Android and any Java-capable phone, it’s well supported and tested — a far more viable solution than anything we could knock up in the limited time we have. It also works with the phone locked, conserving battery life. The only cost is the data plan, which Gemma already has.</p>
<p>Then came the revelation of <a title="RunKeeper Elite" href="http://runkeeper.com/elite" target="_blank">RunKeeper Elite</a>, our eventual winner. At the time, Gemma had only just started using RunKeeper Pro — the Pro and Elite labels refer to your subscription status, Elite is a premium service for $4.99 — and we hadn’t really looked into what was available with the upgrade.</p>
<p>RunKeeper does all the things you’d expect from a standard GPS-enabled running app (or Garmin device) — track time, distance, pace, calories burned etc, over a geolocated route visualised on a map, stored with all your previous runs.</p>
<h3><a name="RunKeeper_Elite" class="anchor">RunKeeper Elite</a></h3>
<p>The Elite service offers a few training programs, alerts and reports and <a title="Introducing… RunKeeper Live! | RunKeeper" href="http://blog.runkeeper.com/uncategorized/introducing-runkeeper-live" target="_blank">as of March last year added a ‘Live’ service</a> that pushes your running data to their website as you run, rather than only uploading a report once it’s complete (as the Pro version does). It’s exactly the same data, but made publicly available in real time.</p>
<p><iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/VL81NLe8iy4" frameborder="0" allowfullscreen></iframe></p>
<p>Unfortunately, RunKeeper doesn&#8217;t actually have an API yet. <a title="Is there an API? / Questions / Discussion Area - RunKeeper Support" href="http://support.runkeeper.com/discussions/questions/135-is-there-an-api" target="_blank">On the forums</a> they <a title="Is there an API? / Questions / Discussion Area - RunKeeper Support" href="http://support.runkeeper.com/discussions/questions/135-is-there-an-api#comment_5939628" target="_blank">promise to soon</a>, but not before race day.</p>
<p>Googling around there are a few sites that have worked out ways to grab the data. For example, <a title="Runkeeper API  : firehole" href="http://www.firehole.us/runkeeper-api/" target="_blank">Firehole has developed an interface</a> to capture and save activity, there’s a ton of info in the right-hand column of his page. There are plenty of ways to <a title="Creating a Runkeeper RSS Feed - the hack way. | ASchroder.com" href="http://www.aschroder.com/2011/01/creating-a-runkeeper-rss-feed-the-hack-way/" target="_blank">hack and scrape</a>, but it&#8217;s a bit dirty and not particularly relevant to us, but shows the data retrieval is possible nonetheless.</p>
<p>These seem to concern the syndication of complete activities, publishing a list of recent runs as one would their latest tweets, or calculating the total number of miles run per month, say. But we&#8217;re only interested in the data for one run, a single activity.</p>
<p>Rather than regularly monitoring a profile for updates, we only have to load the data that populates a single RunKeeper page.</p>
<p>This is handy, because rather than scraping and traversing a profile to find what we&#8217;re looking for (from rendered HTML) we can load the single data file directly, a JSON file hosted on RunKeeper, then work with the data in exactly the same way as they do.</p>
<p>Now, this is all a bit naughty. According the the <a title="RunKeeper - Terms of Service" href="http://runkeeper.com/termsofservice" target="_blank">RunKeeper Terms of Service</a>, we are strictly not allowed to load the data from their site in this way, even with the permission of the account holder. Any form of scraping at all, is prohibited.</p>
<p>This is a big problem. So what do we do?</p>
<p>Well Len Hardy of Firehole openly links to his API interface <a title="Is there an API? / Questions / Discussion Area - RunKeeper Support" href="http://support.runkeeper.com/discussions/questions/135-is-there-an-api#comment_2266949" target="_blank">in the forum thread mentioned before</a>, pointing out that you can scrape the page data, that he does so and that he&#8217;ll freely share the code. RunKeeper haven&#8217;t responded to his comment specifically or reminded him of their TOS, but have commented later on the same thread.</p>
<p>I think it&#8217;s highly unlikely that RunKeeper could be unaware of these goings on, these scrapers are easily found if you search for them and have been around for a while without being shut down.</p>
<p>I&#8217;m rather hoping that they actually don&#8217;t mind too much, right now. They must be aware of the demand, they have an API in development. Perhaps when that&#8217;s published they&#8217;ll chase up these sites and direct them that way. I&#8217;m sure (read, hope) that the developers would happily migrate to doing things the correct way.</p>
<p>So what&#8217;s our solution? Well, <a title="Twitter: marchibbins to @runkeeper" href="http://twitter.com/marchibbins/status/53375077240152064" target="_blank">I asked anyway</a>, but no response so far. We will go ahead and load the data, but in my opinion do so more conscientiously than some of the other attempts. For one, we&#8217;re not loading and filtering complete HTML pages as they are, that&#8217;s what screen scraping is, attempting to extract data from a rendered output. We&#8217;ll be loading the data directly, which is publicly accessible and hopefully with less overhead being a straight-up JSON file.</p>
<p>We&#8217;re also not loading anything regularly or for a long duration of time. We&#8217;re only concerned with one activity, the site will only load the data once the race has begun and when it&#8217;s finished we&#8217;ll take a copy of the file and serve it from our own servers as a static file.</p>
<p>We also intend on intelligently caching the data on our servers whilst the marathon is in progress. This way we can limit the amount of requests to RunKeeper and take on some of the load ourselves. It&#8217;s easily done and will actually improve the performance of the application anyway.</p>
<p>Really, I would like RunKeeper to see what we&#8217;re doing and think it&#8217;s cool. They have an awesome product and platform, people want to play with it more.</p>
<h3><a name="How_it_works" class="anchor">How it works</a></h3>
<p>Once the race starts, all the data we need will be continually pushed from Gemma’s iPhone to the RunKeeper site.</p>
<p>Beats Per Mile will handle page requests and retrieve this data from RunKeeper in the form of a JSON file, which the server will then cache. We can cache the data knowing that the route already run will not change, we’re only interested in the new stuff.</p>
<p>RunKeeper updates their page every 25 seconds, so our cache will be about this length too. When a request is made, if the cache is still fresh we’ll serve that data, if not we’ll retrieve more from RunKeeper.</p>
<p>From then on, the page polls for the latest dataset and we serve the new information, appending data to the client-side stored JSON. The application works our what data each individual client has and serves the difference.</p>
<p>Once the run is complete, a flag will be raised by RunKeeper in the JSON file and we’ll update our page to reflect that. From this point on the application no longer needs to contact RunKeeper, so will serve static JSON from our own side.</p>
<p>It shapes up a little like this, where points 2 and 8 are conditional to the cache being in date:</p>
<p><a href="http://blog.marchibbins.com/wp-content/uploads/2011/04/bpm_flow.jpg" target="_blank"><img class="aligncenter size-medium wp-image-1615" title="Beats Per Mile data diagram" src="http://blog.marchibbins.com/wp-content/uploads/2011/04/bpm_flow.jpg" alt="" width="500" height="140" /></a></p>
<p>As well as reducing the amount of calls to RunKeeper, caching the data means that visitors get the latest JSON nice and quickly.</p>
<p>I built a prototype in time for the Silverstone Half Marathon which Gemma ran last month which all went surprisingly smoothly. Here&#8217;s an image of the application as it was then:</p>
<p><a href="http://twitpic.com/46rn1x" target="_blank"><img class="aligncenter size-full wp-image-1619" title="Beats Per Mile prototype" src="http://blog.marchibbins.com/wp-content/uploads/2011/04/bpm_prototype.jpg" alt="" width="500" height="308" /></a></p>
<p>The data is visualised on a Google map. The GPS coordinates are used to draw the red Polyline, the activity statistics are calculated by the iPhone app and simply refreshed here with every update.</p>
<p>Eventually our map will also have some more informative overlays, mile markers for example, and when and where the application sent tweets or found pictures taken nearby.</p>
<p>Initially we were going to show pace, speed and elevation graphs (you can see a very early attempt if you click through to the image link) but we&#8217;ve run out of time for those. Maybe version two.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/04/13/keep-on-running/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Gave it a Name</title>
		<link>http://blog.marchibbins.com/2011/04/02/gave-it-a-name/</link>
		<comments>http://blog.marchibbins.com/2011/04/02/gave-it-a-name/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 18:07:43 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1589</guid>
		<description><![CDATA[Introducing Beats Per Mile, the marathon project.]]></description>
			<content:encoded><![CDATA[<p>In my last post I previewed a forthcoming project where we track a marathon as it&#8217;s run in real-time, with a whole heap of maps, graphs, tweets and APIs flying about the place.</p>
<p>It has now been named <a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">Beats Per Mile</a>.</p>
<p>We&#8217;ve put up a <a title="Beats Per Mile" href="http://coffeeandpie.net/beatspermile/" target="_blank">holding page</a> on Gemma&#8217;s site (she&#8217;s the one having to run the thing) and she&#8217;s written up <a title="coffee and pie » Blog Archive » Beats per mile" href="http://coffeeandpie.net/?p=2991" target="_blank">a preview on her blog</a>, too.</p>
<p><a href="http://coffeeandpie.net/beatspermile/"><img class="aligncenter size-full wp-image-1600" title="Beats Per Mile" src="http://blog.marchibbins.com/wp-content/uploads/2011/04/bpm.jpg" alt="" width="400" height="545" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/04/02/gave-it-a-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modern Running</title>
		<link>http://blog.marchibbins.com/2011/03/30/modern-running/</link>
		<comments>http://blog.marchibbins.com/2011/03/30/modern-running/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 22:03:32 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[beatspermile]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1570</guid>
		<description><![CDATA[Tracking a marathon race in real-time, GPS-locating a marathon runner, live fundraising updates, tweets and pictures all in one application.]]></description>
			<content:encoded><![CDATA[<p>I mentioned before that I’m working on a new project that combines two big interests of mine, programming and running.</p>
<p>Whenever I run I use a <a title="Garmin: Into Sports" href="http://www.garmin.com/garmin/cms/site/us/intosports/" target="_blank">Garmin device</a> 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.</p>
<p>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.</p>
<p>Plenty of people have created mashups with run data (<a title="RunVis - Visualizing GPS Running Data from a Garmin 305. | BIT-101" href="http://www.bit-101.com/blog/?p=2463" target="_blank">usually map-based</a>) and I&#8217;ve often wanted to try my hand too.</p>
<p>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 <em>something</em>.</p>
<p>I was unsuccessful this year too, but a <a title="coffee and pie » Blog Archive » Run this town" href="http://coffeeandpie.net/?p=2517" target="_blank">friend of mine gained a last minute place</a> at the end of January, so the spotlight turns to her to be the star of the show.</p>
<p>Gemma doesn’t train with a Garmin, she uses the <a title="Running app and fitness community | RunKeeper" href="http://runkeeper.com/" target="_blank">RunKeeper Elite iPhone app</a> which records the same kind of data, so we can perform the same kind of analysis.</p>
<p>Brilliantly, it also publishes the activity to the RunKeeper website <em>live </em>as she’s running.</p>
<p>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.</p>
<p>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.</p>
<p>RunKeeper isn&#8217;t the only toy to play with.</p>
<p>Gemma is running the race for the charity <a title="RettUK : Rett UK" href="http://www.rettuk.org/rettuk-public/rettuk.html" target="_blank">Rett UK</a> and hopefully, if the application is interesting enough, we can drum up some additional fundraising contributions. She has <a title="Gemma Bardsley is fundraising for RETT syndrome Association UK" href="http://www.justgiving.com/Gemma-Bardsley" target="_blank">a Just Giving page</a>, who offer an API to access their data. We can show to-the-minute fundraising levels and take donations from our site.</p>
<p>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 <a title="SoundCloud Developer Zone" href="http://soundcloud.com/developers" target="_blank">Soundcloud API</a> or <a title="API documentation | Mixcloud - Re-think radio" href="http://www.mixcloud.com/developers/documentation/" target="_blank">Mixcloud API</a> to stream this playlist on the site, synchronised with her start time so visitors can hear exactly what she’s listening to.</p>
<p>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.</p>
<p>Another idea is to pull in photos taken on the day, using the time and location data around busy spectator spots. For example, <a title="instagr.am - A Real-Time API for Next-Generation Apps" href="http://instagr.am/blog/42/realtime-api" target="_blank">Instagram have recently released an API</a> to retrieve their geolocated pictures.</p>
<p>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.</p>
<p>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.</p>
<p>Less than three weeks to go, can’t be as hard as actually having to run the twenty-six miles can it?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/03/30/modern-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Absentee</title>
		<link>http://blog.marchibbins.com/2011/03/07/absentee/</link>
		<comments>http://blog.marchibbins.com/2011/03/07/absentee/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 00:12:57 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=1512</guid>
		<description><![CDATA[At some point I seem to have forgotten I had a blog. Sorry about that.]]></description>
			<content:encoded><![CDATA[<p>At some point I seem to have forgotten I had a blog.</p>
<p>It&#8217;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.</p>
<p>Writing was, at that point, with a habitual ease but I guess I got into the habit of not doing those things &#8211; and as a result haven&#8217;t touched this blog since January of last year. Annoyingly, departing with an unwitting optimism in retrospect.</p>
<p>Anyway much has happened since that time, including a change of career path &#8211; I&#8217;m now working freelance full-time.</p>
<p>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: <a title="Marc Hibbins | Projects" href="http://marchibbins.com/projects/">http://marchibbins.com/projects/</a>.</p>
<p>Comments welcome.</p>
<p>Activity with <a title="iheartplay" href="http://www.iheartplay.com/" target="_self">iheartplay</a> has also picked up. We have a few new projects in motion and recently took a trip to Berlin for the superb <a title="Transmediale.11 - RESPONSE:ABILITY" href="http://blog.iheartplay.com/transmediale-11-responseability/" target="_blank">Transmediale festival</a>.</p>
<p>So far the projects go, I&#8217;m hoping those will supply most of the ammunition for getting back into the swing of writing here.</p>
<p>One of our technical objectives is to write and publish the code that we produce. A recent <a title="FARM:london" href="http://blog.iheartplay.com/farmlondon/" target="_blank">undertaking with a local urban farming initiative called FARM:london</a>, may bring the first of those offerings in the form of an open source HTML5-based WordPress framework theme.</p>
<p>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&#8217;ll actually be used for the redesign of this blog.</p>
<p>Oh and that&#8217;ll be released through <a title="GitHub" href="http://github.com/" target="_blank">GitHub</a>, which I have no clue about &#8211; so there&#8217;s be a post, right there.</p>
<p>It&#8217;s an incentive for us all in taking on extracurricular work with iheartplay that we&#8217;re able to explore all opportunities to play with new technologies, platforms and people that our everyday jobs may not otherwise produce.</p>
<p>Recently I&#8217;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.</p>
<p>That&#8217;s something I&#8217;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.</p>
<p>So, reinvigorated with an passionate (none whatsoever trivial) outlook on blogging, building, the Web and <em>the future, </em>watch this space &#8211; or I&#8217;ll just see you again in a year.</p>
<p>Sorry about that.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2011/03/07/absentee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Triumph of Our Tired Eyes</title>
		<link>http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/</link>
		<comments>http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 23:50:37 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[adaa]]></category>
		<category><![CDATA[cherring]]></category>
		<category><![CDATA[computerarts]]></category>
		<category><![CDATA[d&ad]]></category>
		<category><![CDATA[iheartplay]]></category>
		<category><![CDATA[rhizome]]></category>
		<category><![CDATA[tschrimshaw]]></category>

		<guid isPermaLink="false">http://hibbins.wordpress.com/2007/06/29/triumph-of-our-tired-eyes/</guid>
		<description><![CDATA[With the D&#038;AD New Blood exhibition finishing yesterday our final year together is pretty much complete.]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://www.dandad.org/congress/week3.html" title="D&amp;AD New Blood">D&amp;AD New Blood</a> exhibition finishing yesterday our final year together is pretty much complete.</p>
<p>It was good for BAIMPs to represent Bournemouth’s debut at the show and we return with the good news of Chris Herring and Tom Schrimshaw having won Best New Blood awards for their projects <a href="http://chrisherring.co.uk/blog/" title="Chris Herring's Ruled by Secrecy">Ruled by Secrecy</a> and <a href="http://iheartplay.sprettynice.com/profiles/profile.php?id=17" title="Tom Schrimshaw's Douteki">Douteki </a>respectively.</p>
<p><a href="http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/tom-scrimshaws-douteki-and-dad-new-blood-award/" rel="attachment wp-att-40" title="Tom Schrimshaw's Douteki and D&amp;AD New Blood Award"><img src="http://hibbins.files.wordpress.com/2007/06/award1.jpg" alt="Tom Schrimshaw's 'Douteki' and D&amp;AD 'Best New Blood' Award" height="220" width="160" /></a> <a href="http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/chris-herrings-ruled-by-secrecy-and-dad-new-blood-award/" rel="attachment wp-att-41" title="Chris Herring’s Ruled by Secrecy and D&amp;AD New Blood Award"><img src="http://hibbins.files.wordpress.com/2007/06/award2.jpg" alt="Chris Herring’s 'Ruled by Secrecy' and D&amp;AD 'Best New Blood' Award" height="220" width="160" /></a></p>
<p>Although again tarnished by being called out as ‘The Arts Institute at Bournemouth’ at the award ceremony, at least this time it was more laughable in being half expected and now a long-running joke since <a href="http://www.computerarts.co.uk/" title="Computer Arts">Computer Arts</a>’ mistake in their Graduate Showcase.</p>
<p>As for other awards, <a href="http://impserver.bournemouth.ac.uk/~mhibbins" title="Talkboards.">Talkboards </a>finished as a Finalist in the <a href="http://rhizome.org/commissions/" title="Rhizome Artist Commission 2008">Rhizome Artist Commission 2007-2008</a> (the very deserved winners <a href="http://rhizome.org/commissions/2007/" title="Rhizome Artist Commission 2007-2008 Winners">here</a>) and a Semi-Finalist in the <a href="http://www.adaaentry.com/" title="Adobe Achievement Awards">Adobe Achievement Awards</a> – so while I won’t be flying out to San Francisco, I have got a nice shiny certificate <img src='http://blog.marchibbins.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Seems now with everyone now slowing beginning to disperse, our three years have gone stupidly quickly. It really doesn’t seem that long ago that we were working through the night on our Flash Animation projects in the first year.</p>
<p><a href="http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/from-one-of-the-geek-team-all-night-sessions-19th-april-2005/" rel="attachment wp-att-42" title="One of the Geek Team All-Night sessions - 19th April, 2005"><img src="http://hibbins.files.wordpress.com/2007/06/year1.jpg" alt="One of the Geek Team All-Night sessions - 19th April, 2005" height="100" width="400" /></a><br />
<font color="#999999" size="1">From: One of the Geek Team All-Night sessions &#8211; 19th April, 2005.</font></p>
<p>Not that I’m even going to begin to get soppy or <em>anything</em> but I think our coursemates and tutors have been truly decent and we’ve only benefited from being so close friends and always on hand to cooperate and help each other out &#8211; or lend hardware. A huge huge thank you to Craig, Matt, Chris, Joe &amp; Chris for screens and computers loaned for the exhibitions.</p>
<p><a href="http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/to-the-final-studio-3-all-nighter-15th-may-2007/" rel="attachment wp-att-43" title="The Final Studio 3 All-Nighter - 15th May, 2007."><img src="http://hibbins.files.wordpress.com/2007/06/year3.jpg" alt="The Final Studio 3 All-Nighter - 15th May, 2007." height="100" width="400" /></a><br />
<font color="#999999" size="1">To: The Final Studio 3 All-Nighter &#8211; 15th May, 2007.</font></p>
<p>It’s a shame to hear our other years don’t get on nearly half as well as we do &#8211; let lone do these ^^ kinds of things – so much so that it’s possible that rivalry and unhealthy competitiveness may have significantly negative effects on projects or prospective shows.</p>
<p>I think <a href="http://www.iheartplay.com" title="iheartplay">iheartplay</a> was a huge success, with most people getting interviews, internships or even jobs already secured as a result. A whole load of card-swapping and networking went on, very promising for individuals and in promoting Bournemouth University and the proud IMPs that we are.</p>
<p>While there were only four of us demonstrating at New Blood, we plastered the iheartplay promo materials – visually and literally – all over our pitch. We also rinsed the remaining iheartplay catalogues, showing the work of everyone involved and did our best discussing everyone else’s projects as relevant to visitors’ interests.</p>
<p>The huge majority of the other stands mainly exhibited graphics, illustration or print media. So although there were a lot of visitors to the exhibition as a whole, we found (as most did in Brick Lane) that an instant panic and chronic fear of computers and touching mice came over to anyone in the vicinity and they rather take our brochures to browse links and read the copy in their own time and space rather than risk showing their lack of computer skills or whatever. Either way, for all these people it was actually irrelevant who was physically there, as much as any projects that caught their eye inside the books.</p>
<p>I’ve only been able to find two reviews of the iheartplay exhibition so far. <a href="http://www.danielharris.org/" title="Daniel Harris of SubSub">Daniel Harris</a>’ of <a href="http://www.subsubskills.co.uk/blog/" title="SubSub Blog">SubSub</a>, though brief, described the show as <a href="http://www.subsubskills.co.uk/blog/2007/06/free-range-outing/" title="SubSub Blog - Free Range Outing">‘well coordinated, felt coherent .. and in placed damn interesting’</a>. The only other from a disappointed BAIMP student who unfortunately didn’t think to note the opening times and missed the show completely (<a href="http://obourneo.wordpress.com/2007/06/13/underwhelmed-overwhelmed-gin/" title="'Huff &amp; Puff' Blog">found here</a>).</p>
<p>If anyone discovers any more dotted around the web be sure to send me a message or link on <a href="http://del.icio.us/marchibbins" title="My del.icio.us">del.ici.ous</a>.</p>
<p>Finally, sincerely the very best of luck to everyone on the July 11th. Personally I feel if two hours of Image Studies for a year has set us up for top marks all round then we deserve them just for sitting through &#8216;em <img src='http://blog.marchibbins.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2007/06/29/triumph-of-our-tired-eyes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Things to Make and Do</title>
		<link>http://blog.marchibbins.com/2007/06/05/things-to-make-and-do/</link>
		<comments>http://blog.marchibbins.com/2007/06/05/things-to-make-and-do/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 23:22:52 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[computerarts]]></category>
		<category><![CDATA[fmp]]></category>
		<category><![CDATA[iheartplay]]></category>

		<guid isPermaLink="false">http://hibbins.wordpress.com/2007/06/05/things-to-make-and-do/</guid>
		<description><![CDATA[I’ve been asked to put together some simple viral Flash games for the forthcoming iheartplay exhibition to create a little extra buzz and have a bit of fun.]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://www.iheartplay.com" title="iheartplay">iheartplay </a>exhibition almost upon us things are beginning to get hectic again.</p>
<p>I’ve been asked to put together some viral games in Flash that we can host and bombard forums with to create a little extra buzz and get a bit more exposure.</p>
<p>Anyway, I’ve adapted some very simple classic arcade games, basically just substituting sprites with iheartplay logos and with a bit of restyling hopefully they’ll do the trick.</p>
<p>Some <em>very </em>buggy demos are online as follows:</p>
<p><strong>Space Invaders:</strong></p>
<p><a href="http://blog.marchibbins.com/2007/06/05/things-to-make-and-do/iheartplay-arcade-space-invaders/" rel="attachment wp-att-24" title="iheartplay Arcade - Space Invaders"><img src="http://hibbins.files.wordpress.com/2007/06/sml_invaders.jpg" alt="iheartplay Arcade - Space Invaders" /></a></p>
<p><a href="http://impserver.bournemouth.ac.uk/~mhibbins/iheartplay/invaders.html" title="iheartplay Arcade - Space Invaders">http://impserver.bournemouth.ac.uk/~mhibbins/iheartplay/invaders.html</a></p>
<p><strong>Pac-Man:</strong></p>
<p><a href="http://blog.marchibbins.com/2007/06/05/things-to-make-and-do/iheartplay-arcade-pac-man/" rel="attachment wp-att-25" title="iheartplay Arcade - Pac-Man"><img src="http://hibbins.files.wordpress.com/2007/06/sml_pacman.jpg" alt="iheartplay Arcade - Pac-Man" /></a></p>
<p><a href="http://impserver.bournemouth.ac.uk/~mhibbins/iheartplay/pacman.html" title="iheartplay Arcade - Pac-Man">http://impserver.bournemouth.ac.uk/~mhibbins/iheartplay/pacman.html</a></p>
<p><strong>Asteroids:</strong></p>
<p><a href="http://blog.marchibbins.com/2007/06/05/things-to-make-and-do/iheartplay-arcade-asteroids/" rel="attachment wp-att-26" title="iheartplay Arcade - Asteroids"><img src="http://hibbins.files.wordpress.com/2007/06/sml_asteroids.jpg" alt="iheartplay Arcade - Asteroids" /></a></p>
<p><a href="http://impserver.bournemouth.ac.uk/~mhibbins/iheartplay/asteroids.html" title="iheartplay Arcade - Asteroids">http://impserver.bournemouth.ac.uk/~mhibbins/iheartplay/asteroids.html</a></p>
<p>A few more tweaks and they’ll go live on the iheartplay site, but feel free to have a go now and get yourself on the scoreboard – the more the better!</p>
<p>It seems everyone is putting together new online portfolios in preparation for the show, considering mine still claims my current project is design for small screens I think it’s time I sort one out too.</p>
<p>Tunnelling is almost done &#8211; *<em>so</em>* close to having it fully ready to roll, kind of a necessity <img src='http://blog.marchibbins.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Meanwhile I’m trying to get hold of some machines to run it locally at the show, that’ll hopefully be smoother too, as well as guaranteeing I can actually show something.</p>
<p>Congrats to those who got into the Computer Arts Graduate Showcase, good to see some Bournemouth Uni representation – well, Bournemouth, at least.</p>
<p>Also: New Header Alert! It’s actually Talkboards related now. The previous showed Alan Reed’s ‘<a href="http://www.dartington.ac.uk/publicpages/details.asp?uid=1" title="Alan Reed - City Poem">City Poem</a>’, which was part of the <a href="http://www.dartington.ac.uk/publicpages/index.asp" title="Public Pages">Public Pages</a> project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2007/06/05/things-to-make-and-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

