<?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>nick.recoil.org</title>
	<atom:link href="http://nick.recoil.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://nick.recoil.org</link>
	<description>Connector in, receiver out</description>
	<lastBuildDate>Mon, 30 Aug 2010 20:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Augmenting your shell prompt with Git information</title>
		<link>http://nick.recoil.org/2010/08/augmenting-your-shell-prompt-with-git-information/</link>
		<comments>http://nick.recoil.org/2010/08/augmenting-your-shell-prompt-with-git-information/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 20:08:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[stash]]></category>

		<guid isPermaLink="false">http://nick.recoil.org/?p=195</guid>
		<description><![CDATA[I use git, and from time to time I use the &#8216;stash&#8217; feature. This is a boon when performing certain tasks, but can also get you into trouble if you don&#8217;t carefully manage what you&#8217;ve stashed. To this end, I modified my bash shell prompt to help me remember. Normally my shell prompt gives me [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://git-scm.com/">git</a>, and from time to time I use the &#8216;stash&#8217; feature. This is a boon when performing certain tasks, but can also get you into trouble if you don&#8217;t carefully manage what you&#8217;ve stashed. To this end, I modified my bash shell prompt to help me remember.</p>
<p>Normally my shell prompt gives me fairly standard information. Current working directory, time, hostname and current user.</p>
<pre style="background-color: black; color: white; padding: 5px">[<span style="color:#c00">nick</span>@<span style="color:#3a3">20:47:31</span>] dusk : <span style="color:#0dd">~/Work</span>
$ </pre>
<p>When I&#8217;m inside a git repository, I see something like this.</p>
<pre style="background-color: black; color: white; padding: 5px">[<span style="color:#c00">nick</span>@<span style="color:#3a3">20:47:31</span>] dusk : <span style="color:#0dd">~/Work/git/MacRuby</span> <span style="color:#aa0">(master)</span> <span style="color:#f00"><b>[2]</b></span>
$ </pre>
<p>The bracketed &#8216;master&#8217; shows me what branch I have checked out, and the red &#8217;2&#8242; shows me that I have two stashed change-sets. This is accomplished by the following bashrc/profile code:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> parse_git_branch <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #007800;">ref</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>git symbolic-ref HEAD <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;(&quot;</span><span style="color: #800000;">${ref#refs/heads/}</span><span style="color: #ff0000;">&quot;)&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> parse_git_stash_size <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #007800;">lines</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>git stash list <span style="color: #660033;">-n</span> <span style="color: #000000;">100</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${#lines}</span>&quot;</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
  <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">count</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$lines</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/^[ \t]*//'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #666666; font-style: italic;"># strip tabs</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[&quot;</span><span style="color: #800000;">${count#}</span><span style="color: #ff0000;">&quot;]&quot;</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;[<span style="color: #007800;">$red</span>\u<span style="color: #007800;">$NC</span>@<span style="color: #007800;">$green</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #007800;">$NC</span>] \h : <span style="color: #007800;">$cyan</span>\w <span style="color: #007800;">$yellow</span><span style="color: #000099; font-weight: bold;">\$</span>(parse_git_branch) <span style="color: #007800;">$RED</span><span style="color: #000099; font-weight: bold;">\$</span>(parse_git_stash_size)<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #007800;">$NC</span><span style="color: #000099; font-weight: bold;">\$</span> &quot;</span></pre></div></div>

<p>This has been invaluable in helping me keep track of what I&#8217;m working on, and helps me make fewer mistakes when managing git repositories.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2010/08/augmenting-your-shell-prompt-with-git-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rackspace CloudSites and .htaccess maintenance mode</title>
		<link>http://nick.recoil.org/2010/08/rackspace-cloudsites-and-htaccess-maintenance-mode/</link>
		<comments>http://nick.recoil.org/2010/08/rackspace-cloudsites-and-htaccess-maintenance-mode/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 16:27:10 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cloudsites]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[rackspace]]></category>

		<guid isPermaLink="false">http://nick.recoil.org/?p=187</guid>
		<description><![CDATA[We&#8217;ve started using Rackspace&#8217;s CloudSites at BERG, and one of the problems we&#8217;ve been tackling is how to make deployment a painless process. Uploading to CloudSites is only allowed by FTP/SFTP, and is very slow at times, so we wanted to use a &#8220;maintenance&#8221; mode approach that is common in the Rails and Capistrano world. [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve started using Rackspace&#8217;s <a href="http://cloudsites.rackspacecloud.com/">CloudSites</a> at <a href="http://berglondon.com/">BERG</a>, and one of the problems we&#8217;ve been tackling is how to make deployment a painless process. Uploading to CloudSites is only allowed by FTP/SFTP, and is <em>very</em> slow at times, so we wanted to use a &#8220;maintenance&#8221; mode approach that is common in the Rails and <a href="http://capify.org/">Capistrano</a> world.</p>
<p>CloudSites has some very customised Apache configuration, and we found that the standard mod_rewrite approach didn&#8217;t work. There was no mention of a solution within their support wiki, so for anyone else looking for a similar solution, I&#8217;m placing ours here:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">RewriteEngine on
RewriteBase /
RewriteCond %{ENV:PHP_DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{REQUEST_FILENAME} !/maintenance.html
RewriteRule ^.*$    /maintenance.html [L]</pre></div></div>

<p>We found that when checking the <code>DOCUMENT_ROOT</code> environment variable, it didn&#8217;t get the correct path to test for the presence of the maintenance.html file, but using <code>ENV:PHP_DOCUMENT_ROOT</code>, it did.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2010/08/rackspace-cloudsites-and-htaccess-maintenance-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacRuby &#8211; Expressiveness with power</title>
		<link>http://nick.recoil.org/2010/08/macruby-expressiveness-with-power/</link>
		<comments>http://nick.recoil.org/2010/08/macruby-expressiveness-with-power/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 10:34:29 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Ruby & Rails]]></category>
		<category><![CDATA[macruby]]></category>
		<category><![CDATA[rubycocoa]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://nick.recoil.org/?p=180</guid>
		<description><![CDATA[In the last few months, I&#8217;ve made time to migrate some old RubyCocoa code to the latest and greatest version of MacRuby. Not only did I see a huge performance increase across the board, I found I could also create a stand-alone binary which could easily be distributed to end users. The entire framework is [...]]]></description>
			<content:encoded><![CDATA[<p>In the last few months, I&#8217;ve made time to migrate some old <a href="http://en.wikipedia.org/wiki/RubyCocoa">RubyCocoa</a> code to the latest and greatest version of <a href="http://www.macruby.org/">MacRuby</a>. Not only did I see a <strong>huge</strong> performance increase across the board, I found I could also create a stand-alone binary which could easily be distributed to end users. The entire framework is fast becoming a first class citizen on Mac OS X.</p>
<p>It was during the porting process that I ran into a small issue when attempting to read ID3 tags from mp3 files. I&#8217;d previously used the native Ruby gem <a href="http://rubyforge.org/projects/ruby-mp3info/">ruby-mp3info</a>, but this had some compatibility issues with MacRuby 0.6, and refused to install. After hacking around with the gem source, I worked around the issues, but the resulting performance was awful, so I reviewed my choices:</p>
<ol>
<li>Investigate the cause of the performance problems in ruby-mp3info</li>
<li>Switch to using <a title="id3lib-ruby" href="http://id3lib-ruby.rubyforge.org/">id3lib-ruby</a></li>
<li>Investigate bundles and use a C/C++ library directly</li>
</ol>
<p>I didn&#8217;t sink a lot of time into fixing ruby-mp3info&#8217;s specific problems on what is still a relatively niche platform, and I felt that using id3lib-ruby would complicate my ability to create standalone binaries. id3lib-ruby is so named because it depends on the <a href="http://id3lib.sourceforge.net/">libid3</a> C++ library, which would introduce another layer of complexity into the build process. Lastly, the id3lib gem didn&#8217;t support the latest version of ID3 tags, and wasn&#8217;t under active development.</p>
<p>That left the last option, which I had always wanted a good excuse to investigate. I had originally looked into this when I originally started looking at RubyCocoa in Summer &#8217;09, but linking with native Objective-C seemed excessively difficult and poorly-documented.</p>
<p>One of the many improvements that the MacRuby project brought over RubyCocoa was to make this functionality as easy as loading bundles in native Objective-C applications. This is achieved with use of the <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html">NSBundle</a> class, so I thought all I needed to do was to take a C or C++ ID3 library, and wrap it in a very small Objective-C wrapper. Through the magic of runtime introspection, all of the wrapper&#8217;s methods would become available when you loaded the bundle into the MacRuby environment.</p>
<p>After reading up on existing tutorials, I managed to get this to work, and because it&#8217;s using the native compiled code, it&#8217;s extremely fast. This process of using interpreted Ruby code with compiled C/C++/Objective-C code is <em>tremendously</em> powerful, and allows for a mix and match approach to development that enables both rapid prototyping, and an ability to optimise for performance, from within a single codebase.</p>
<p>So powerful is this technique that I wanted to write up my experiences for others, who like myself, had maybe had just enough experience with Ruby (through <a href="http://rubyonrails.org/">Rails</a>) and iOS development to feel that merging them together might be fun. With Mac OS X as my primary desktop environment, I&#8217;ve now achieved a triumvirate of control:</p>
<ol>
<li>I can write web-based code that lives in the cloud and is available from anywhere in the world.</li>
<li>I can write mobile applications that I can carry with me at all times.</li>
<li> I can write larger, more flexible and powerful applications when a desktop environment is appropriate.</li>
</ol>
<p>I can remember buying my first <a href="http://en.wikipedia.org/wiki/PowerBook_G4">Powerbook</a> back in 2002 and getting the distinct feeling that Mac OS X had successfully channeled all of the potential energy that the original <a href="http://en.wikipedia.org/wiki/NeXTSTEP">NeXTSTEP</a> had so successfully created. That this was a futuristic platform that eagerly awaited the craftsman&#8217;s touch. Something that could be deftly moulded it into whatever shape you could conceive, if only you invested a little time in the <a href="http://developer.apple.com/">tools</a>.</p>
<p>Eight years on, the choice has grown richer. MacRuby occupies a unique place within the spectrum of development tools on the Mac, offering a high level ease in harnessing low level power. If you haven&#8217;t looked at it yet, I can recommend a good tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2010/08/macruby-expressiveness-with-power/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A tale of two apps</title>
		<link>http://nick.recoil.org/2010/08/a-tale-of-two-apps/</link>
		<comments>http://nick.recoil.org/2010/08/a-tale-of-two-apps/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 18:04:59 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Handheld]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[berg]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://nick.recoil.org/?p=142</guid>
		<description><![CDATA[Since November 2009, I have been working with the talented people at BERG London on a variety of projects, two of which I want to mention in more detail here. Michel Thomas on the iPhone The first project was the Michel Thomas iPhone app. This is one of the most well-rounded apps I&#8217;ve implemented, and [...]]]></description>
			<content:encoded><![CDATA[<p>Since November 2009, I have been working with the talented people at <a href="http://berglondon.com/">BERG London</a> on a variety of projects, two of which I want to mention in more detail here.</p>
<p><br/></p>
<h3>Michel Thomas on the iPhone</h3>
<p><a href="http://nick.recoil.org/wp-content/uploads/2010/08/app-icon-512x512.png"><img src="http://nick.recoil.org/wp-content/uploads/2010/08/app-icon-512x512-300x300.png" alt="" title="Michel Thomas Flower" width="300" height="300" class="size-medium wp-image-143" /></a></p>
<p>The first project was the <a href="http://michelthomasapp.co.uk/">Michel Thomas iPhone app</a>. This is one of the most well-rounded apps I&#8217;ve implemented, and proves that you don&#8217;t need a large team in order to produce an intricate and attractive application. BERG&#8217;s supremely talented designer, <a href="http://www.irvinebrown.com/">Matt Brown</a>, designed the visuals, and I worked on the iOS implementation. Between us we came up with a product we&#8217;re both very proud of, and it&#8217;s now the flagship mobile application of <a href="http://www.hoddereducation.co.uk/">Hodder Education</a>.</p>
<p>Since its launch, the <em><a href="http://itunes.apple.com/gb/app/learn-language-michel-thomas/id370543591?mt=8">Learn a language with Michel Thomas</a></em> application has been steadily gathering interest, and It has recently taken the top spot in the Free Education category of the App Store, both in the UK, and in the USA and Australia.</p>
<p>There are more details of the design process in the <a href="http://berglondon.com/blog/2010/05/20/the-michel-thomas-iphone-app-behind-the-scenes/">&#8220;Behind the scenes&#8221;</a> post that Matt Brown wrote up for the BERG Blog, and a comprehensive <a href="http://www.flickr.com/photos/bergstudio/sets/72157623976224837">Flickr image set</a> of the sketches we created during the design and development process.</p>
<p>In my view, one of the standout feature is the playfulness we worked into the interactive audio player. We went through a number of design iterations, many of which were discarded because the technical implementation didn&#8217;t capture the feeling of the original design sketches. Our final design struck a great balance between gorgeous design and the constraints of the real-time rendering power on iOS devices.</p>
<p>At the height of the work on the audio playback, I listened to the same phrases so many times that Michel Thomas percolated through into my subconscious. At one stage, during a particularly intense week of work, he took a starring role in a dream, chatting up girls at a party in his uniquely accented Spanish!</p>
<p><br/></p>
<h3>Popular Science+ for the iPad</h3>
<p>The second application we worked on was <a href="http://www.popsci.com/popularscienceplus/">Popular Science+ for the iPad</a>. BERG had previously worked with Swedish publisher <a href="http://bonnier.com/">Bonnier</a> in late 2009 on <a href="http://berglondon.com/blog/2009/12/17/magplus/">an exploration of the future of digital magazines</a>. Very shortly after the Mag+ video had been released, Apple announced the existence of the iPad, and Bonnier, along with BERG, were invited to create the magazine experience that had been conceptualised in the earlier work.</p>
<p>The challenge of bringing Mag+ into the world in only 8 weeks made it an extremely ambitious project, which took a great deal of concentrated effort from many people across numerous timezones (London, Sweden and Florida, USA). Thankfully I was joined by another developer, Lei Bramley, who really pulled out all the stops to get everything in place on time.</p>
<p>After a fevered period of development, we submitted the first version of Popular Science+ to the App Store for the launch of the iPad, and Steve Jobs himself had very nice things to say about our work:</p>
<p><object width="400" height="328"><param name="movie" value="http://www.youtube.com/v/Na0q83kgtNQ&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;hd=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/Na0q83kgtNQ?hl=en_US&#038;fs=1&#038;rel=0&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="328"></embed></object></p>
<p>Somebody snapped this picture of the street-level advertising of Popular Science+ while out and about in Manhattan:</p>
<p><a href="http://nick.recoil.org/wp-content/uploads/2010/08/popsci-ad-nyc.jpg"><img src="http://nick.recoil.org/wp-content/uploads/2010/08/popsci-ad-nyc-225x300.jpg" alt="Popular Science ad in NYC" title="Popular Science Advert in NYC" width="225" height="300" class="aligncenter size-medium wp-image-155" /></a></p>
<p>The sheer ambition and timescale of the project saw everyone involved in the project raise their game, and it was a fantastic experience to have been part of the iPad product launch.</p>
<p><br/></p>
<h3>Mill Colour</h3>
<p>Lastly, a small update concerning <a href="http://nick.recoil.org/2009/07/mill-colour/">Mill Colour</a>. What began as a small project to give people a taste of professional colour grading, has gone on to be a big success worldwide. It has been downloaded over <strong>half a million times</strong> to date.</p>
<p>Viva Mill Colour!</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2010/08/a-tale-of-two-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mill Colour</title>
		<link>http://nick.recoil.org/2009/07/mill-colour/</link>
		<comments>http://nick.recoil.org/2009/07/mill-colour/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 14:09:48 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Handheld]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[MillColour]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[TheMill]]></category>

		<guid isPermaLink="false">http://nick.recoil.org/?p=124</guid>
		<description><![CDATA[Over the past few months I&#8217;ve been working on developing professional iPhone and iPod Touch applications with a number of clients, and I wanted to mention the first one, which has had a great 6 week run at the top of the free photography apps chart. My very first public iPhone project has been Mill [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-134" title="Mill Colour" src="http://nick.recoil.org/wp-content/uploads/2009/07/mill_colour_01.jpg" alt="Mill Colour" width="410" height="369" /></p>
<p>Over the past few months I&#8217;ve been working on developing professional iPhone and iPod Touch applications with a number of clients, and I wanted to mention the first one, which has had a great 6 week run at the top of the free photography apps chart.</p>
<h3><span style="font-weight: normal; font-size: 13px;">My very first public iPhone project has been <a href="http://linktoapp.com/millcolour">Mill Colour</a>, for world-renowned visual effects company <a href="http://the-mill.com/">The Mill</a>. The idea behind this app is to offer users a means of  manipulating their pictures in a simple way, with built-in <em>looks</em>. It also offers the more adventurous user direct control over the <strong>Lift</strong>, <strong>Gamma</strong>, <strong>Gain</strong> and <strong>Saturation</strong> in their picture. These controls are the same as the Colourists at The Mill would use when <a href="http://en.wikipedia.org/wiki/Color_grading">colour grading</a> video footage.</span></h3>
<p>An important feature of this app was to offer users a learning curve suitable to the immediacy of mobile applications. Our goal was for the user to be able to see results within roughly 30 seconds of launching, but to offer additional controls which extend the learning curve, and offer a deeper experience for those who want to invest time. To achieve this, the simple built-in looks and the more direct controls interact with each other, offering a large combinatorial set of possible ways to alter the image.</p>
<p>Another interesting aspect of the project was the toolset I specifically built to capture the lookup tables for the looks. Each of the looks available within the app is based on a famous advert that The Mill have graded. To capture these looks, I wrote a program which would read and write the colour values from RGB &#8216;ramp&#8217; images. This allowed the Colourists to apply the same colour transform to the ramp image as they had done to the original source image. The tools then read this image back in and created a lookup table which could be applied to any image. This saved us a great deal of time in the early stages of the development process.</p>
<p>It has an active <a href="http://www.flickr.com/groups/1083518@N25/">Flickr group</a>, and by adding pictures to the pool, you can get entered into a competition to win time at The Mill, and get taught directly by their award-winning Colourists.</p>
<p>There are more applications in the pipeline, and I&#8217;ll post about them closer to the release date.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2009/07/mill-colour/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mythRecommend</title>
		<link>http://nick.recoil.org/2009/03/mythrecommend/</link>
		<comments>http://nick.recoil.org/2009/03/mythrecommend/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 21:48:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[DVB]]></category>
		<category><![CDATA[Ruby & Rails]]></category>
		<category><![CDATA[Television]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby-mythtv]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I’ve pushed my beta code for mythRecommend to Github. It’s a system which allows you to subscribe to a source of regular TV recommendations, and have those recommendations automatically get translated into concrete recording schedule for a MythTV system. Once a recording has been made, the recording schedule is made dormant, so it will not [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve pushed my beta code for <a href="http://github.com/nickludlam/mythrecommend/tree">mythRecommend</a> to Github. It’s a system which allows you to subscribe to a source of regular TV recommendations, and have those recommendations automatically get translated into concrete recording schedule for a MythTV system.</p>
<p>Once a recording has been made, the recording schedule is made dormant, so it will not clutter your existing schedule list as time goes on. You can decide if you would like to turn that recommended program into a permanent schedule or not, and reinstate it if desired.</p>
<p>I hope to add more feed parsers as the code matures, but as things stand there is only one written, specifically for <a href="http://www.guardian.co.uk/">The Guardian</a> here in the UK.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2009/03/mythrecommend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on parsing iPhone archives</title>
		<link>http://nick.recoil.org/2008/11/thoughts-on-parsing-iphone-archives/</link>
		<comments>http://nick.recoil.org/2008/11/thoughts-on-parsing-iphone-archives/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 19:38:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I’ve just put a little article up on the Tactotum blog about the possibilities of processing your automatic iPhone backups to create a giant database of all your phone calls and SMS messages.]]></description>
			<content:encoded><![CDATA[<p>I’ve just put a little article up on the <a href="http://tactotum.com/blog">Tactotum blog</a> about the possibilities of <a href="http://tactotum.com/blog/2008/11/10/iphone-backup-extractor-possibilities/">processing your automatic iPhone backups</a> to create a giant database of all your phone calls and <span class="caps">SMS</span> messages.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/11/thoughts-on-parsing-iphone-archives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripting MythTV</title>
		<link>http://nick.recoil.org/2008/09/scripting-mythtv/</link>
		<comments>http://nick.recoil.org/2008/09/scripting-mythtv/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 12:00:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[DVB]]></category>
		<category><![CDATA[Ruby & Rails]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[ruby-mythtv]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[At the end of June, I gave a short talk to the London Ruby Users Group on some code I’ve been working on to enable me to interface with MythTV on a programatic level. MythTV is Open Source software which allows the recording and playback of TV on a Linux box, turning it into a [...]]]></description>
			<content:encoded><![CDATA[<p>At the end of June, I gave a short talk to the <a href="http://lrug.org/meetings/2008/05/27/june-2008-meeting/">London Ruby Users Group</a> on some code I’ve been working on to enable me to interface with <a href="http://www.mythtv.org/">MythTV</a> on a programatic level. MythTV is Open Source software which allows the recording and playback of TV on a Linux box, turning it into a <span class="caps">PVR</span>. I use this at home to record TV from Freeview.</p>
<p>MythTV has a web interface written for it in the form of <a href="http://www.mythtv.org/wiki/index.php/MythWeb">MythWeb</a>, and it allows decent remote interaction with the system. It is also my main mode of interaction when trawling for interesting programmes to record. It’s much more convenient to use a keyboard and mouse to navigate, rather than a remote control. This is especially true here in the UK, where there are many <a href="http://www.freeview.co.uk/">Freeview</a> channels that could contain content of interest.</p>
<h3>Creating a pleasant <span class="caps">API</span></h3>
<p>However, if you’re looking to play around with integration, and prototype some ideas you have to help you navigate and interact in different ways, you’re not going to have an easy ride. There’s no single clean implementation of the functionality you can access in any one language. <span class="caps">PHP</span> drives the main MythWeb code, but it also mixes in some Perl to access some fairly major functionality (downloading/streaming the recorded programmes). There are also Python bindings within the MythTV codebase, but I’m not aware of anything substantial built on top of them, and what is implemented is mainly concerned with metadata.</p>
<p>The main functions I wanted a MythTV integration library to offer were the ability to list what had been recorded, obtain a thumbnail for that recording, and to be able to stream the data to you. This was achieved in the 0.1.0 release. Now we’re up to version 0.2.0, it now supports listing of <span class="caps">EPG</span> data, and creation/editing of  recording schedules. This paves the way for experiments in automatic scheduling of recordings. There are many potentially interesting sources of TV reviews to scrape. For instance, if you like what <a href="http://http://www.guardian.co.uk/">The Guardian</a> has to say about Television in its <a href="http://www.guardian.co.uk/culture/series/watchthis">Watch this</a> section, then extracting the titles from that page, and feeding them to ruby-mythtv is easy.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'ruby-mythtv'</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Connect to the server</span>
  mythbackend, mythdb = MythTV.<span style="color:#9900CC;">connect</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:host</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'mythtv.localdomain'</span>,
                                       <span style="color:#ff3333; font-weight:bold;">:database_password</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'password'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Find matches on our search term, and limit the results to 5 matches</span>
  programs = mythdb.<span style="color:#9900CC;">list_programs</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:conditions</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'title LIKE ?'</span>, <span style="color:#996600;">&quot;%Bruce Parry%&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
                                  <span style="color:#ff3333; font-weight:bold;">:limit</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">5</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Take the first program match, and convert it to a recording schedule</span>
  new_schedule = <span style="color:#6666ff; font-weight:bold;">MythTV::RecordingSchedule</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>programs<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, mythdb<span style="color:#006600; font-weight:bold;">&#41;</span>
  new_schedule.<span style="color:#9900CC;">save</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Signal the backend of recording changes for our recording schedule entry</span>
  mythbackend.<span style="color:#9900CC;">reschedule_recordings</span><span style="color:#006600; font-weight:bold;">&#40;</span>new_schedule.<span style="color:#9900CC;">recordid</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Let the backend resolve matches</span>
  <span style="color:#CC0066; font-weight:bold;">sleep</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Enumerate the list of pending recordings, find ours, and check for any conflicts</span>
  pending_recordings = mythbackend.<span style="color:#9900CC;">query_pending</span>
  conflicts = pending_recordings.<span style="color:#9900CC;">find</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>p<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">p</span>.<span style="color:#9900CC;">recordid</span> == new_schedule.<span style="color:#9900CC;">recordid</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span>
                                            <span style="color:#CC0066; font-weight:bold;">p</span>.<span style="color:#9900CC;">recstatus_sym</span> == <span style="color:#ff3333; font-weight:bold;">:rsConflict</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># If conflicts is empty, then all is good. If it is populated, then action needs</span>
  <span style="color:#008000; font-style:italic;"># to be taken, such as bumping the priority, or removing the clashes....</span></pre></td></tr></table></div>

<p>Ruby-mythtv is present both on <a href="http://rubyforge.org/projects/ruby-mythtv/">Rubyforge</a> and <a href="http://github.com/nickludlam/ruby-mythtv">Github</a>. Major release versions will be present on Rubyforge, and development versions will be present on Github. This method allows me to push out code which I consider functional, but not necessarily finalised. <a href="http://www.google.com/search?q=release+early+release+often">Release early, release often</a>, as the saying goes, and this is all the more relevant when forking projects and sharing ideas is central to the way Github works. There’s nothing worse than code which is “almost there”, languishing in your “I really should finish it” folder, destined never to see the light of day.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/09/scripting-mythtv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Low-power embedded hardware</title>
		<link>http://nick.recoil.org/2008/05/low-power-embedded-hardware/</link>
		<comments>http://nick.recoil.org/2008/05/low-power-embedded-hardware/#comments</comments>
		<pubDate>Sun, 18 May 2008 11:29:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[DVB]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pico-itx]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[A chap at Smoke and Mirrors, where I’m doing some Freelance work, is creating a system to bridge between video routers and a web-based status page. Most of the suites within the building are plumbed in via fibre-optic KVM connections, and depending on the schedule, different video processing systems can get presented in different rooms [...]]]></description>
			<content:encoded><![CDATA[<p>A chap at <a href="http://www.smoke-mirrors.co.uk/">Smoke and Mirrors</a>, where I’m doing some Freelance work, is creating a system to bridge between <a href="http://en.wikipedia.org/wiki/Video_router">video routers</a> and a web-based status page. Most of the suites within the building are plumbed in via fibre-optic <span class="caps">KVM</span> connections, and depending on the schedule, different video processing systems can get presented in different rooms at different times. All it takes is a change on the routers.</p>
<p>Although complex, this enables the most cost-effective use of each system, marrying the functionality needed to the number of physical people required to attend the session for any given day. There is a large variation in price and functionality with certain high-end systems, so you always want to try and get maximal use from the systems you have chosen to invest in.</p>
<p>He’s looking at using one of the boards from the wonderfully named <a href="http://www.acmesystems.it/">Acme Systems</a> from Rome. The idea is to communicate with the video router via its RS-232 serial interface, and retrieve an <span class="caps">ASCII</span> representation of the current router configuration. It’s a fascinating area of software <strong><span class="caps">AND</span></strong> hardware as glue. A physical device which will run some bespoke code to bridge information from one system into another.</p>
<p><img class="alignnone size-full wp-image-58" title="pico-itx_board" src="http://localhost/~nick/wordpress/wp-content/uploads/2009/03/pico-itx_board.jpg" alt="pico-itx_board" width="400" height="330" /></p>
<p>In related news, I’ve also received my <a href="http://www.via.com.tw/en/products/embedded/artigo/">Artigo Pico-ITX kit</a> and am now a proud owner of the tiniest system running Linux that I’ve ever seen. It also seems to play happily with the <span class="caps">DVB</span> sticks that I had stability issues with on the older Mini-ITX M10k board.</p>
<p>The fan is noticable in a very quiet room, but as soon as there’s anything else to be heard, it’s drowned out, so it’s not quite suitable for your bedroom. They do a fanless system, but it’s half the clock speed. Installing it was done over <span class="caps">PXE</span> from my Mac, using the <a href="http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/">Ubuntu netboot downloads</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/05/low-power-embedded-hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppleTV &amp; Ubuntu hacking</title>
		<link>http://nick.recoil.org/2008/05/appletv-ubuntu-hacking/</link>
		<comments>http://nick.recoil.org/2008/05/appletv-ubuntu-hacking/#comments</comments>
		<pubDate>Mon, 05 May 2008 23:04:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Television]]></category>
		<category><![CDATA[appletv]]></category>
		<category><![CDATA[g-202]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perian]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I’ve finally enabled SSH on my long dormant AppleTV, and am integrating it into my DVB / Rails / Beanstalk / MySQL system for processing data. I’ve used the Patchstick image available from atv4windows. I ended up unpacking and dd’ing the image from the Mac, but the process remains exactly the same. I now have [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve finally enabled <span class="caps">SSH</span> on my long dormant AppleTV, and am integrating it into my <span class="caps">DVB</span> / Rails / Beanstalk / MySQL system for processing data. I’ve used the Patchstick image available from <a href="http://www.wiki.atv4windows.com/">atv4windows</a>. I ended up unpacking and dd’ing the image from the Mac, but the process remains exactly the same. I now have Perian, ssh and a slew of other things enabled, and all I need now is to attempt the hack to get composite output working. I’ve yet to take the plunge and replace my old <span class="caps">CRT</span> with an <span class="caps">LCD TV</span>.</p>
<p>Incidentally, for anyone looking to figure out the ssh username and password for your freshly enabled ssh daemon, they are both <strong>frontrow</strong>, and that user has <strong>passwordless sudo privileges</strong>.</p>
<p>I also had a minor breakthrough with my x86_64 Ubuntu 8.04 machine. I have a Zyxel G-202 Wireless <span class="caps">USB</span> stick, to keep the number of trailing wires to a minimum, but I kept getting an error saying:</p>
<table class="CodeRay">
<tr>
<td title="click to toggle" class="line_numbers">
<pre>1<tt>
</tt></pre>
</td>
<td class="code">
<pre>zd1211rw error ioread32(CF_REG1): -110<tt>
</tt></pre>
</td>
</tr>
</table>
<p>Which was exceedingly unhelpful. I eventually tried disabling hi-speed <span class="caps">USB</span> from the <span class="caps">BIOS</span>, and rebooted to find it sprang into life immediately. Great! What was even more strange that when I rebooted and reset the <span class="caps">BIOS</span> back to enable <span class="caps">USB 2</span>.0, the G-202 kept working.  I’m unsure whether this is due to the device not being cold booted, and I’ve yet to see if it stops working after I power the system off, but so far so good, and I don’t need to resort to <span class="caps">NDIS</span>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/05/appletv-ubuntu-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
