<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:feed="urn:feed" version="2.0">
	<channel>
		<title>Blog posts by Trevor Morris</title>
        <link>http://www.trovster.com/blog</link>
        <description>Latest blog posts by Trevor Morris</description>
        <copyright>Trevor Morris</copyright>
        <ttl>7200</ttl>
        <language>en-gb</language>
        <lastBuildDate>Wed, 22 May 2013 12:47:53</lastBuildDate>
		
				<item>
			<title>Sweep the Sleaze</title>
			<link>http://www.trovster.com/blog/2012/06/sweep-the-sleaze</link>
			<description><![CDATA[<blockquote>
  <p><strong>Social media buttons are not a social media strategy</strong>, even though they’re often sold that way. Excellent content, serious networking and constant human engagement is the way to build your profile. Adding those sleazy buttons won’t achieve anything. Social media is not easy — there is no simple trick. Usually, what most people do is not the winning strategy but the safe strategy, and safe rarely&nbsp;wins.</p>
</blockquote>

<p class="citation"><cite><a href="http://informationarchitects.net/blog/sweep-the-sleaze/">Sweep the Sleaze</a> by <span class="fn">Oliver Reichenstein<span></cite></p>
]]></description>
			<pubDate>Fri, 22 June 2012 04:24:04</pubDate>
		</item>
				<item>
			<title>A Stylish List with HTML5, CSS3 + Modernizr</title>
			<link>http://www.trovster.com/blog/2012/06/a-stylish-list-with-html5-css3-modernizr</link>
			<description><![CDATA[<p>On a recent project I needed to build the following design, which is a simple list of&nbsp;images.</p>

<p><img src="/img/blog/[297]_grid-example.gif" alt="Example grid of six images with borders" title="" /></p>

<p>The challenge with this design was to have the border above the individual items for the first and last <em>row</em> of images, not a single full-width border above and below the entire&nbsp;list.</p>

<p>When coding, I find it incredibly useful to write out, in plain English, what I want to achieve and how I might go about achieving it. For this problem I wanted&nbsp;to;</p>

<ul>
<li>Add a border above and below the set of&nbsp;images,</li>
<li>If the list of images formed a perfect grid (3, 6, 9 etc) and the browser supports <span class="caps">CSS3</span> <code>:nth-child</code> and <code>:nth-last-child</code> selectors, then remove the full-width borders and set the border on the first and last&nbsp;rows.</li>
</ul>

<p>To solve this problem I used a combination of the <span class="caps">HTML5</span> data attributes, <span class="caps">CSS3</span> <code>:nth-child</code> and <code>:nth-last-child</code> selectors and <a href="http://www.modernizr.com">Modernizr</a> to test for the <span class="caps">CSS3</span> support&nbsp;needed.</p>

<p>Firstly, I added two <span class="caps">HTML5</span> data attributes to the container. One which denotes whether the set of images is a “perfect grid” — <code>data-grid=”true”</code> — and a second which was the total number of images inside the list —&nbsp;<code>data-total=”6”</code>.</p>

<p>Secondly, I needed to check whether the required <span class="caps">CSS3</span> selectors I wanted to use were supported by the browser. I include Modernizr on projects, which has checks for a lot of useful <span class="caps">HTML5</span> and <span class="caps">CSS</span> functionality, but it didn’t include any tests for the <code>:nth-child</code> and <code>:nth-last-child</code> selectors — but it does include a <a href="http://modernizr.com/docs/#addtest">test <span class="caps">API</span></a>. Below are the two tests I&nbsp;wrote:</p>

<pre><code>Modernizr.testStyles('#modernizr div:nth-child(1) {height:10px;}', function (elem, rule) {
   Modernizr.addTest('cssnthchild', function () {
       return elem.getElementsByTagName('div')[0].offsetHeight == 10;
   });
}, 3);

Modernizr.testStyles('#modernizr div:nth-last-child(1) {height:10px;}', function (elem, rule) {
   Modernizr.addTest('cssnthlastchild', function () {
       return elem.getElementsByTagName('div')[2].offsetHeight == 10;
   });
}, 3);
</code></pre>

<p>Modernizr then adds the appropriate class to the <span class="caps">HTML</span>, depending on whether the tests return true or false. In the case of the two tests above, ‘cssnthchild’ and ‘cssnthlastchild’ are added if <code>:nth-child</code> and <code>:nth-last-child</code> are supported. If they’re not supported, they’re prefixed with ‘no-’, eg&nbsp;‘no-cssnthchild’.</p>

<p>Finally, we can use these classes in the <span class="caps">CSS</span> to remove the solid full-width borders and replace them with borders above the first row of images and below the last row of images. The <span class="caps">CSS</span> looks something like this (note, the <span class="caps">CSS</span> has been written in a verbose manner for ease of understanding and can be written more&nbsp;succinctly):</p>

<pre><code>ul.images {
   padding: 5px 0 0;
   border: 0 solid #000; border-width: 1px 0;
}
html.cssnthchild.cssnthlastchild ul.images[data-grid="true"] {
   padding: 0;
   border-width: 0;
}
html.cssnthchild.cssnthlastchild ul.images[data-grid="true"] li:nth-child(-n+3) {
   padding-top: 5px;
   border: 0 solid #000; border-width: 1px 0 0;
}
html.cssnthchild.cssnthlastchild ul.images[data-grid="true"] li:nth-last-child(-n+3) {
   padding-bottom: 5px;
   border: 0 solid #000; border-width: 0 0 1px;
}
</code></pre>

<p>This works, except for when there are only three images. This is why the <span class="caps">HTML5</span> data attribute <code>data-total=”3”</code> was added. Using the attribute selector, targeting the list which only contains three images, a top border needs to be added alongside the already added bottom border. The following CSS solves&nbsp;this:</p>

<pre><code>html.cssnthchild.cssnthlastchild ul.images[data-total="3"] li:nth-child(-n+3) {
   padding-top: 5px;
   border-top-width: 1px;
}
</code></pre>

<p><a href="http://jsbin.com/uzowis">See the final&nbsp;solution</a>.</p>
]]></description>
			<pubDate>Wed, 13 June 2012 09:47:43</pubDate>
		</item>
				<item>
			<title>Design + Hype Development Techniques</title>
			<link>http://www.trovster.com/blog/2012/02/design-hype-development-techniques</link>
			<description><![CDATA[<p>Recently, <a href="http://www.aarontolley.co.uk">Aaron Tolley</a> and I launched a little project called <a href="http://www.designandhype.com">Design + Hype</a> which showcases only the best creative design from across the web. Side projects are the best place to experiment, push the boundaries and most importantly, to try new techniques which are not quite ready for client projects. Design + Hype was a perfect project to use the new semantic elements which were added in <span class="caps">HTML5</span>, experiment a little with media queries and <span class="caps">CSS</span>&nbsp;animations.</p>

<h3>Fixed Sidebars — A Responsive&nbsp;Enhancement</h3>

<p>The design called for a fixed sidebar, something that I&#8217;m not a fan of because of potential issues with small browser sizes. However, after reading Trent Walton&#8217;s article <a href="http://trentwalton.com/2012/01/11/vertical-media-queries-wide-sites/">Vertical Media Queries <span class="amp">&amp;</span> Wide Sites</a>, I found a solution to the&nbsp;issue.</p>

<p>By default the sidebar is full height but moves when the browser is scrolled. Now, by adding a simple vertical media query, when the browser window is higher than a certain value — the height of the content within the sidebar — then the <code>position</code> value is changed to <code>fixed</code> and the sidebar stays in place when the browser is scrolled. The code is surprisingly simple, see the basic example&nbsp;below:</p>

<pre><code>aside {
    float: left;
}

@media screen and (min-height:675px) {
    aside {
        position: fixed; top: 0; left: 0;
    }
}
</code></pre>

<h3>An Animated Shrinking&nbsp;Header</h3>

<p>When the browser is scrolled passed a certain point, the header and navigation is reduced in height which gives more room for the primary content. This behaviour is achieved by a combination of JavaScript events, <span class="caps">DOM</span> manipulation and <span class="caps">CSS</span>, with a sprinkling of <span class="caps">CSS3</span> animation. The basic premise uses the JavaScript <code>scroll</code> event and if the <code>scrollTop</code> distance is greater than a defined value, then it adds a class to the <code>body</code>, if it is less than the defined value, this class is removed. You can then leverage this class in your CSS to make any amends you like. On the Design + Hype website the header and navigation change height, and if CSS3 animations are supported, then the change is&nbsp;animated.</p>

<p>I implemented the JavaScript using jQuery (1.7). The example below toggles the class <code>scrolled</code> when the distance 100px is passed. (Note, the distance is hard coded in the JavaScript, but could be queried using a <a href="http://html5doctor.com/html5-custom-data-attributes/"><span class="caps">HTML5</span> data attribute</a>, eg.&nbsp;<code>data-distance="100"</code>)</p>

<pre><code>var $document   = $(document),
    $window     = $(window),
    distance    = 100,
    className   = 'scrolled';

$document.on('scroll', function (event) {
    if (parseInt($window.scrollTop(), 10) &gt; distance) {
        $body.addClass(className);
    } else {
        $body.removeClass(className);
    }
}
</code></pre>

<p>The <span class="caps">CSS</span> below shows the change in height of the <code>header</code> when the class of <code>scrolled</code> is appended to the <code>body</code>. The default state contains the <a href="https://developer.mozilla.org/en/CSS/CSS_transitions"><span class="caps">CSS3</span> transition</a> declaration for multiple vendors (Mozilla, Webkit, Opera and Microsoft) as well as the non-prefixed version for future&nbsp;compatibility.</p>

<pre><code>header {
    height: 100px;

    // vendor-specific and general transition CSS
    -moz-transition: all 1s ease;
    -webkit-transition: all 1s ease;
    -o-transition: all 1s ease;
    -ms-transition: all 1s ease;
    transition: all 1s ease;
}
body.scrolled header {
    height: 50px;
}
</code></pre>

<p>You can see the effect on <a href="http://www.designandhype.com">Design + Hype</a> when you scroll&nbsp;down.</p>

<p>Both of these techniques are great examples of progressive enhancement, by using modern techniques to improve user experience. I hope these two examples are useful and can inspire other&nbsp;techniques.</p>
]]></description>
			<pubDate>Wed, 15 February 2012 17:26:28</pubDate>
		</item>
				<item>
			<title>iOS System Level Link Management</title>
			<link>http://www.trovster.com/blog/2011/08/ois-system-level-link-management</link>
			<description><![CDATA[<p>iOS needs system level link management which can hook in to apps and create a better flow for users. “Official apps” (is there a way an app can be marked as official?) should be able to register behaviours for links <strong>on a system wide level</strong> which open their respective app when a user clicks a&nbsp;link.</p>

<p>If I am using an application or even Safari and I click on a <span class="caps">URL</span>, I am shown the web version, optimised for my mobile device. Although this situation is <span class="caps">OK</span>, it often leaves you with a basic interface and limited functionality (depending on how vigorously the developers have implemented features). There is definite room for improvement, especially if there is a stand-alone app available and installed. What I would like to see is the link triggering an application switch which up the correct&nbsp;content.</p>

<p>Now that iOS supports multi-tasking and apps save state when they’re closed, this behaviour should be the natural progression. <span class="caps">OSX</span> and other desktop operating systems already behave in a similar way, such as launching your preferred mail client when you click a <code>mailto:</code>&nbsp;link.</p>

<p>For example, if I am using Twitter — either using the official iOS app, Tweetbot or the web interface — and I click an Instagram <span class="caps">URL</span>, I want the operating system to fast-switch to the installed (and preferred if there are multiple) Instagram app. Instead of just being presented with the photograph and the user’s name in a Safari wrapper, which is the mobile <span class="caps">HTML</span> version of Instagram, I would be able to “Like” and comment on the photo, as well as browse that user’s other photos and even follow them. Anything that the application allows, would be a short click away from the&nbsp;link.</p>

<p>The official Twitter for iOS app already behaves in a similar way when you click a link which is either a Twitter users’ profile or a specific tweet, it loads the correct pane in the application and doesn’t show you the web interface like it does for other content. You may cry this is obvious and <em>expected</em> behaviour and that is my point. There is a short leap between this and a system wide process which would better tie content and apps together and improve the overall flow of content consumption — even encouraging more creation and&nbsp;participation.</p>

<p>These services would be managed in a similar way to location services or notifications, allowing the user to toggle which apps are enabled for this system wide preference. Apps would register a request for link management, possibly by the way of a domain (or a list of URLs within that domain that they support with their app), within their codebase which would mean the app would appear in the list. There could be, in theory, multiple apps vying for the same service, such as Twitter links. The preference pane could be extended to show a list of apps which have registered a certain&nbsp;domain.</p>

<p>Power users might want to open different apps based on what type of content is being shown. For example, twitter profile might open in the official Twitter app, whereas you might want specific tweets to be open in Tweetbot. In theory, this could be easily achieved by exposing the <span class="caps">URL</span> mapping to users — in a similar way in which Adblock works — but I think this complication should be avoided and would alienate the majority of iOS&nbsp;users.</p>
]]></description>
			<pubDate>Thu, 25 August 2011 12:38:57</pubDate>
		</item>
				<item>
			<title>WordPress Custom File Upload</title>
			<link>http://www.trovster.com/blog/2011/07/wordpress-custom-file-upload</link>
			<description><![CDATA[<p>In a couple of recent projects I have been delving deeper and deeper in to customising the functionality of WordPress, using it more like <a href="/blog/2011/04/wordpress-as-a-cms/">a <span class="caps">CMS</span> than just a blogging&nbsp;platform</a>.</p>

<p>I was comfortable in adding new custom post types and associating custom fields to these new data sets. However, there was one type of functionality I wasn’t entirely happy with – adding custom file uploads. I have used the tremendously useful <a href="http://wordpress.org/extend/plugins/attachments/">Attachments plugin</a> which was written and is actively maintained by Jonathan Christopher (who also writes regularly about WordPress development among other things on his website <a href="http://mondaybynoon.com">Monday by Noon</a>). While this solution is good for attaching multiple files to an entry, I needed more control, such as named types and limiting the number of attachments, e.g. one per&nbsp;type.</p>

<p>Once I understood the concept on how to the Attachments plugin works, it was a case of dissecting the code and using what I needed for my solution. The concept is pretty simple — upload a file to the media area, associate that file with the post by using a (hidden) custom field and the newly created&nbsp;<code>attachment_id</code>.</p>

<p>The Attachments plugin triggers the built in media upload functionality, where you can upload new files or choose one from the existing library. Now the clever bit – the plugin uses some JavaScript to listen to a click event on the “Insert into Post” button, preventing the default behaviour, finding the <code>attachment_id</code> value of the file and inserting this into a hidden form&nbsp;input.</p>

<p>After researching the plugin’s behaviour, it was fairly straight-forward to replicate this functionality. On the front-end you use the custom field value in the built-in <a href="http://codex.wordpress.org/Function_Reference#Post.2C_Page.2C_Attachment_and_Bookmarks_Functions">WordPress attachment functions</a> to get the uploaded file’s information, e.g. <a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_url"><code>wp_get_attachment_url</code></a> on the custom field will return <span class="caps">URL</span> of the uploaded&nbsp;file.</p>

<p>I have used this solution on a couple of projects and although it uses the built in file upload behaviour, it can be a bit convoluted when all you want to do it associate a file with a post. So I decided to investigate using a simple file upload using the default browser control, while still making use of the WordPress file management and media library. This turned out to be relatively easy, but there are a few&nbsp;gotchas.</p>

<h3>A simple upload&nbsp;solution</h3>

<p>By default the post edit form in the WordPress admin does not have the <code>enctype="multipart/form-data"</code> attribute which is required for file uploading. Luckily there is an action which allows you add custom attributes to the edit form. The following code adds the <code>enctype</code> attribute to all post edit forms (you can easily modify it to be restricted to a certain post&nbsp;type).</p>

<pre><code>add_action('post_edit_form_tag', 'post_edit_form_tag');
function post_edit_form_tag() {
    echo ' enctype="multipart/form-data"';
}
</code></pre>

<p>Next you need to add a <code>add_meta_box</code> for the file upload field. This is done within a function that is hooked in to WordPress using <code>add_action('admin_init');</code>. Below is the function I use for the custom field document&nbsp;upload:</p>

<pre><code>function custom_field_document_upload() {
    global $post;

    $custom         = get_post_custom($post-&gt;ID);
    $download_id    = get_post_meta($post-&gt;ID, 'document_file_id', true);

    echo '&lt;p&gt;&lt;label for="document_file"&gt;Upload document:&lt;/label&gt;&lt;br /&gt;';
    echo '&lt;input type="file" name="document_file" id="document_file" /&gt;&lt;/p&gt;';
    echo '&lt;/p&gt;';

    if(!empty($download_id) &amp;&amp; $download_id != '0') {
        echo '&lt;p&gt;&lt;a href="' . wp_get_attachment_url($download_id) . '"&gt;
            View document&lt;/a&gt;&lt;/p&gt;';
    }
}
</code></pre>

<p>The final functionality is to save the uploaded file as an attachment and associate it with the post. This is done by using a function that hooks in to WordPress using <code>add_action('save_post');</code>. The function looks for upload files, use the built in functions to <a href="http://codex.wordpress.org/Function_Reference/wp_handle_upload" title="wp_handle_upload function documentation">upload</a>, <a href="http://codex.wordpress.org/Function_Reference/wp_insert_attachment" title="wp_insert_attachment function documentation">insert the attachment</a> and associate the custom field using <a href="http://codex.wordpress.org/Function_Reference/update_post_meta" title="update_post_meta function documentation">post&nbsp;meta</a>.</p>

<pre><code>function custom_field_document_update($post_id) {
    global $post;

    if(strtolower($_POST['post_type']) === 'page') {
        if(!current_user_can('edit_page', $post_id)) {
            return $post_id;
        }
    }
    else {
        if(!current_user_can('edit_post', $post_id)) {
            return $post_id;
        }
    }

    if(!empty($_FILES['document_file'])) {
        $file   = $_FILES['document_file'];
        $upload = wp_handle_upload($file, array('test_form' =&gt; false));
        if(!isset($upload['error']) &amp;&amp; isset($upload['file'])) {
            $filetype   = wp_check_filetype(basename($upload['file']), null);
            $title      = $file['name'];
            $ext        = strrchr($title, '.');
            $title      = ($ext !== false) ? substr($title, 0, -strlen($ext)) : $title;
            $attachment = array(
                'post_mime_type'    =&gt; $wp_filetype['type'],
                'post_title'        =&gt; addslashes($title),
                'post_content'      =&gt; '',
                'post_status'       =&gt; 'inherit',
                'post_parent'       =&gt; $post-&gt;ID
            );

            $attach_key = 'document_file_id';
            $attach_id  = wp_insert_attachment($attachment, $upload['file']);
            $existing_download = (int) get_post_meta($post-&gt;ID, $attach_key, true);

            if(is_numeric($existing_download)) {
                wp_delete_attachment($existing_download);
            }

            update_post_meta($post-&gt;ID, $attach_key, $attach_id);
        }
    }
}
</code></pre>

<p>Now you can upload files using a simple file input custom field and pull the uploaded attachment from the media library using the build in functions. This code has been built as a focused solution to a problem and can be tailored to different use&nbsp;cases.</p>

<p>If you want to upload multiple files, then it would make sense to loop through all upload <code>$_FILES</code>. This would be a simple alteration and would make an assumption of adding an <code>_id</code> suffix to the file name for the custom field post meta. You would wrap the above code in the following loop while removing the <code>$file</code> variable and using the updated <code>attach_key</code>&nbsp;variable;</p>

<pre><code>foreach($_FILES as $key =&gt; $file) {
    $attach_key = $key . '_id';
}
</code></pre>

<p>I hope you find this a useful tutorial for uploading files as custom fields in WordPress. If you’ve got any other solutions, please leave a&nbsp;comment.</p>
]]></description>
			<pubDate>Thu, 07 July 2011 14:05:47</pubDate>
		</item>
				<item>
			<title>iPhone Games 3</title>
			<link>http://www.trovster.com/blog/2011/05/iphone-games-3</link>
			<description><![CDATA[<p>This is my third article recommending iPhone games. Out of the <a href="/blog/2010/07/iphone-games/">previous</a> <a href="/blog/2010/10/iphone-games-2/">two</a> entries, there are only a couple of games I play regularly. Since my second entry over six months ago, the main game that I keep going back to when I’ve got ten minutes is always <a href="http://www.monsterdashgame.com">Monster Dash</a>, whether it’s trying to beat my highest score or to unlock one of the achievements (mainly 2k without killing anyone) the pick-up-and-play-ness and frantically simple game-play of this auto-run game means it’s still my favourite iPhone&nbsp;game.</p>

<p>New games are coming out daily for the iOS platform but it is always difficult to find the smooth among the rough. I often buy games through recommendations on <a href="http://twitter.com/trovster">Twitter</a>, but very rarely there is general consensus which is hard to avoid. Angry Birds fits in to that second category and so does the first game recommendation in this&nbsp;post.</p>

<iframe width="480" height="390" src="http://www.youtube.com/embed/x6pT_2E5xI0" frameborder="0" allowfullscreen></iframe>

<p><a href="http://itunes.apple.com/app/tiny-wings/id417817520">Tiny Wings</a> is a game infused with cuteness. Like all good iPhone games, Tiny Wings is incredibly easy to pick up and play, but also frustratingly difficult to put down. The game has a perfect learning / skill curve, it draws you in with is simplicity and doesn’t let you leave until you’ve played one more&nbsp;game.</p>

<p><a href="http://itunes.apple.com/app/gravity-guy/id398348506">Gravity Guy</a> is a fast paced side-scrolling auto-running game. I am a fan of these games as they&#8217;re very easy to learn, quick to pick up and play, but hard to master and even more difficult not to have &#8220;one more go&#8221;. Also see <a href="http://www.canabalt.com">Canabalt</a> — the game that is often quoted as (re-)starting the craze — and my favourite <a href="http://www.monsterdashgame.com">Monster Dash</a>. You can <a href="http://www.miniclip.com/games/gravity-guy/en/">play Gravity Guy online</a> and there is a free version of the game if you want to try it out, but beware, you&#8217;ll soon get sucked&nbsp;in!</p>

<p><a href="http://itunes.apple.com/app/fragger/id373046496">Fragger</a> is a game that has many similarities with the incredibly popular Angry Birds franchise. This time instead of throwing birds to knock down structures, you throw grenades which can be used to blow up strategic areas of the game and kill the enemies. Like other <a href="http://www.miniclip.com/iphone/">Miniclip</a> games, you can <a href="http://www.miniclip.com/games/fragger/en/">play Fragger&nbsp;online</a>.</p>

<p><a href="http://itunes.apple.com/app/collision-effect/id414855258">Collision Effect</a> is a game from the highly successful publisher <a href="http://www.chillingo.com">Chillingo</a>, who also published the first Angry Bird game as well as Cut the Rope and Minigore. The style and vibe of this game reminds me a lot of <a href="http://www.orbital-game.com">Orbital</a>, a game I recommended in my <a href="http://www.trovster.com/blog/2010/07/iphone-games/">first review of iPhone games</a>. There are two modes to the game, action and puzzle. In the fast paced action mode you must guide colored orbs into each other as they appear on your screen, all while avoiding orbs of a different color. The puzzle mode takes the same idea and sets a static arrange of the orbs in which you must successfully&nbsp;destroy.</p>

<p><a href="http://itunes.apple.com/app/death-rally/id422020153">Death Rally</a> is a slightly 3D top-down racing shoot &#8216;em up game. The style reminds me a lot of the original Grand Theft Auto as well as the classic Micro Machines franchise. There seems to be two tactics in races; race to win or hang back to try to destroy the other vehicles. Each race earns you points which you can use to upgrade your cars and weapons. There are also power-ups which can be collected on track to unlock stronger and faster cars and new items like shotguns and gatling&nbsp;guns.</p>

<p><a href="http://itunes.apple.com/app/shift-2/id407465021">Shift! 2</a> is a mind-bending puzzle game in which you simple need to reach a door to exit the level. It is not as simple as it sounds as to do so you must flip and invert the black <span class="amp">&amp;</span> white world to successfully unlock keys, escape deep holes and avoid spikes. The first few levels are a great tutorial to the game and it soon gets your brain thinking in multiple dimensions! As with a lot of games on this list, you can also <a href="http://armorgames.com/play/964/shift-2" title="Play Shift! online">play the Flash version of the game&nbsp;online</a>.</p>

<p><a href="http://www.trainyard.ca/">Trainyard</a> is a puzzle solving game where you mix-and-match colour trains as you try and successfully get all of them to their stations, all while avoiding collisions — unless it is necessary to make new colours! There is also a free version of the game available, which features a completely different set of puzzles than the paid&nbsp;version.</p>

<p><a href="http://itunes.apple.com/app/super-stickman-golf/id397049430">Super Stickman Golf</a> isn’t the most beautiful iPhone game you can play, but as <a href="http://www.marco.org/2011/04/23/super-stickman-golf">Marco describes</a> it is an &#8220;essentially simple 2D golf on Worms-style terrain&#8221;. If you’re a fan of the Worms series or games which involve angles then you should look below the graphics and have a go. My major drawback with the game is although you can pick up and play any unlocked level, to progress through the game you must play a series of holes, which can take a fair amount of&nbsp;time.</p>

<iframe src="http://player.vimeo.com/video/22674517?title=0&amp;byline=0&amp;portrait=0&amp;color=151515" width="480" height="270" frameborder="0"></iframe>

<p><a href="http://www.swordandsworcery.com">Superbrothers: Sword <span class="amp">&amp;</span> Sworcery <span class="caps">EP</span></a> is an experimental game. I heard a lot of good things about it, but at the time there was an iPad-only version. Since then an <a href="http://itunes.apple.com/app/superbrothers-sword-sworcery/id424912055">iPhone version</a> has been released and I have had a chance to play. This is not your normal iPhone game. It is a game which you must invest time to play, the pace is sedated and the scenery and music is relaxing. I haven’t progressed far yet as you need plenty of time to get immersed. Worth a download to experience the relaxing aspect&nbsp;alone.</p>

<p><a href="http://astronutapp.com">Astronut</a> is a charming game in which you must bounce a lonely astronaut from planet to planet across a universe which is full of exploding planets and aliens who are trying to stop you. The free game gives you a taster of the game-play but you must buy to unlock more levels, which is where the fun&nbsp;begins.</p>

<p>What have <em>you</em> been&nbsp;playing?</p>
]]></description>
			<pubDate>Mon, 30 May 2011 11:34:04</pubDate>
		</item>
				<item>
			<title>Using the Correct Glyphs</title>
			<link>http://www.trovster.com/blog/2011/04/using-the-correct-glyphs</link>
			<description><![CDATA[<p>Modern keyboards have limited space to display characters which users will use on a day-to-day basis. This restriction of characters has lead to widespread glyph substitutions, such as three full stops (or periods) instead of the correct <a href="http://en.wikipedia.org/wiki/Ellipsis">ellipsis</a>. When writing quotations, it is common to find straight single or double quotation marks, however these should be replaced with the appropriate left or right <a href="http://en.wikipedia.org/wiki/Quotation_mark_glyphs">typographic quotation mark glyphs</a>. Because keyboards lack these subtleties, applications can (in some cases) automatically convert glyphs, this is common for turning so-called dumb quotes in to smart quotes. Infact, I use a <span class="caps">PHP</span> port of John Gruber’s <a href="http://daringfireball.net/projects/smartypants/">SmartyPants</a>, which “easily translates plain <span class="caps">ASCII</span> punctuation characters into smart typographic punctuation <span class="caps">HTML</span>&nbsp;entities”.</p>

<p>Although these special glyphs do not appear on your keyboard doesn’t mean you can’t type them. There are multiple methods to help you output the correct glyph, below are some of the methods I&nbsp;use.</p>

<h3>Keyboard&nbsp;Combinations</h3>

<p>There are <a href="http://en.wikipedia.org/wiki/Quotation_mark#Typing_quotation_marks_on_a_computer_keyboard">different key combinations</a> for typing the correct “smart” quotation marks and ellipsis on different operating systems. Below are the combinations for Windows and&nbsp;<span class="caps">OSX</span>.</p>

<table id="keyboard-combinations">
    <thead>
        <tr>
            <th colspan="2">&nbsp;</th>
            <th>Macintosh key combinations</th>
            <th>Windows key combinations</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th>Single opening</th>
            <td><samp>‘</samp></td>
            <td><kbd class="osx">Option + ]</kbd></td>
            <td><kbd class="win">Alt + 0145</kbd> (on number pad)</td>
        </tr>
        <tr>
            <th>Single closing</th>
            <td><samp>’</samp></td>
            <td><kbd class="osx">Option + Shift + ]</kbd></td>
            <td><kbd class="win">Alt + 0146</kbd> (on number pad)</td>
        </tr>
        <tr>
            <th>Double opening</th>
            <td><samp>“</samp></td>
            <td><kbd class="osx">Option + [</kbd></td>
            <td><kbd class="win">Alt + 0147</kbd> (on number pad)</td>
        </tr>
        <tr>
            <th>Double closing</th>
            <td><samp>”</samp></td>
            <td><kbd class="osx">Option + Shift + [</kbd></td>
            <td><kbd class="win">Alt + 0148</kbd> (on number pad)</td>
        </tr>
        <tr>
            <th>Ellipsis</th>
            <td><samp>…</samp></td>
            <td><kbd class="osx">Option + ;</kbd></td>
            <td><kbd class="win">Alt + 0133</kbd> (on number pad)</td>
        </tr>
    </tbody>
</table>

<h3>Websites <span class="amp">&amp;</span>&nbsp;Applications</h3>

<p>For more obscure glyphs that I do not need to use on a day to day basis and therefore aren’t worth remembering, I use a couple of different&nbsp;methods.</p>

<p>The main method is the website <a href="http://copypastecharacter.com">CopyPasteCharacter</a>. A very simple idea; simply click the glyph you need and it’s automatically copied to your clipboard. It doesn’t have an exhaustive list, but I rarely need to look anywhere else. There is also an <a href="http://itunes.apple.com/app/copy-paste-character/id354715343">iPhone app</a> so you can easily get these glyphs on your iOS&nbsp;device.</p>

<p>You don’t need an iOS device or a native application to get a wide range of glyphs on your mobile device. Neven Mrgan has developed a website which acts as an app on your device, even working with no Internet connection. Simply go to <a href="http://mrgan.com/gb/">Glyphboard</a> and add it to your home&nbsp;screen.</p>

<h3>iOS</h3>

<p>iOS devices (and I guess any device with software keyboard capabilities) have a clever keyboard system. The majority of a standard keyboard’s keys can be found within two taps, by default you’re shown the alphabet (in the common qwerty layout), tapping “<kbd>.?123</kbd>” gives you numbers and common punctuation characters, and tapping “<kbd>#+=</kbd>” gives you access to even&nbsp;more.</p>

<p>Using two taps you have access to 71 (26 + 25 + 20) characters. <em>But there are more</em>. Hidden away. A long tap on almost every single character gives you access to related glyphs. Doing this under the alphabetic keyboard gives you the appropriate <a href="http://en.wikipedia.org/wiki/Diacritic">diacritical marks</a> for that letter. A similar behaviour can be found with the punctuation marks. A long tap on the full stop (or period) character shows a popup which includes the correct ellipsis glyph. This works similarly for both single and double quotes. (Note, not all characters have this functionality). Check out this article which has <a href="http://www.aheliotech.com/keyboard-shortcuts-to-speed-up-typing-on-an-iphone-or-the-ipad/">more examples of iOS keyboard&nbsp;shortcuts</a>.</p>

<p>Tip: When you’re entering a web address, the popup functionality is also available for top level domains (TLDs). Simply long tap on the “.com” and you will get a popup with a list of common&nbsp;TLDs.</p>

<p><img src="/img/blog/[292]_ios-keyboard-tlds.jpg" alt="iOS screenshow showing the .net, .eu, .org, .edu, .ie, .co.uk, .uk and .com TLDs in the popup" title="" height="215" width="320" /></p>
]]></description>
			<pubDate>Fri, 08 April 2011 12:48:08</pubDate>
		</item>
				<item>
			<title>WordPress as a CMS</title>
			<link>http://www.trovster.com/blog/2011/04/wordpress-as-a-cms</link>
			<description><![CDATA[<p>If you’re building websites for small businesses, who are working under a tight budget but would like content management, you can’t do much better than the open source system WordPress. The <span class="caps">PHP</span>-based system became incredibly popular when blogs were making a big impact on the Web and in recent years there have been many improvements which have made the system a big competitor as a fully fledged content&nbsp;management.</p>

<p>WordPress as a content management system is far from perfect. There are plenty of reasons why it isn’t the best choice in a lot of situations and there are a lot of annoying idiosyncrasies. However, for small websites which require content management, the easy to use administration area in which clients can feel confident with and the recent improvements mean that it is a system you should persevere to learn and&nbsp;master.</p>

<p>The have been many recent improvements, but it is the addition of <a href="http://codex.wordpress.org/Post_Types#Custom_Types">custom post types</a>, which mean you can define your own content areas instead of being limited to the default posts and pages without having to rely on hacks and plugins, that has turned WordPress from a blog service in to a fully fledged content management&nbsp;system.</p>

<p>Custom post types have been available in WordPress since version 2.9, however it was version 3 and the most recent 3.1 release which matured them and made them more usable. These new post types mean you can easily add consistent sets of data, for example a list of employees at a company, including permalink pages, featured image, snippets and even&nbsp;tags.</p>

<h3>Custom Post Type&nbsp;Example</h3>

<p>In a recent project I needed information about team members, including an archive page which listed them. I first added a page called “Team” and created a template file <code>page-team.php</code>. I also registered the custom post type in the <code>functions.php</code>. Below is the custom post type&nbsp;snippet;</p>

<pre><code>function post_type_init() {
    register_post_type('team', array(
    'labels' =&gt; array(
            'name'                  =&gt; __( 'Team' ),
            'singular_name'         =&gt; __( 'Team' ),
            'add_new'               =&gt; __( 'Add New Member' ),
            'add_new_item'          =&gt; __( 'Add New Member' ),
            'edit'                  =&gt; __( 'Edit Member' ),
            'edit_item'             =&gt; __( 'Edit Member' ),
            'new_item'              =&gt; __( 'New Member' ),
            'view'                  =&gt; __( 'View Member' ),
            'view_item'             =&gt; __( 'View Member' ),
            'search_items'          =&gt; __( 'Search Team' ),
            'not_found'             =&gt; __( 'No Members found' ),
            'not_found_in_trash'    =&gt; __( 'No Members found in Trash' ),
            'parent'                =&gt; __( 'Parent Member' ),
    ),
    'description'           =&gt; 'A team member',
    'capability_type'       =&gt; 'post',
    'public'                =&gt; true,
    'exclude_from_search'   =&gt; false,
    'show_ui'               =&gt; true,
    'hierarchical'          =&gt; false,
    'has_archive'           =&gt; false,
    'rewrite' =&gt; array(
        'slug'          =&gt; 'team',
        'with_front'    =&gt; false,
    ),
    'supports' =&gt; array(
        'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes'
    )
</code></pre>

<p>For more indepth documentation about custom post types including what each value means, their options and more arguments, check out the <a href="http://codex.wordpress.org/Function_Reference/register_post_type">register_post_type Codex&nbsp;page</a>.</p>

<h4>Custom&nbsp;Fields</h4>

<p>The system also makes it easy for you to expand custom post types with custom fields, giving even more flexibility to the content. For each team member I needed to add more specific content, such as their role and&nbsp;age.</p>

<p>I get all the current custom data for this entry, checking that the data exists and assigning it to a variable to use. Then it is just a case of building the <span class="caps">HTML</span> you want to display, these can be any form element you want (input, textarea, checkbox&nbsp;etc).</p>

<pre><code>function post_type_custom_fields_team() {
    global $post;

    $custom = get_post_custom($post-&gt;ID);
    $role   = !empty($custom['role'][0]) ? $custom['role'][0] : '';
    $age    = !empty($custom['age'][0]) ? $custom['age'][0] : '';

    echo '&lt;p&gt;&lt;label for="role"&gt;Role:&lt;/label&gt;&lt;br /&gt;';
    echo '&lt;input type="text" style="width:90%;" id="role" name="role"
            value="' . attribute_escape($role) . '" /&gt;&lt;/p&gt;';

    echo '&lt;p&gt;&lt;label for="age"&gt;Age:&lt;/label&gt;&lt;br /&gt;';
    echo '&lt;input type="text" style="width:50px;" id="age" name="age"
            value="' . attribute_escape($age) . '" /&gt;&lt;/p&gt;';
}
</code></pre>

<p>I use a single function to wrap all the custom field <code>add_meta_box</code> functions and a single function to save all the data, as it makes registering them with WordPress easier. The first five arguments are the ones you will probably change the most. As defined by the <a href="http://codex.wordpress.org/Function_Reference/add_meta_box">add_meta_box Codex page</a>, these are; the meta box identifier (must be unique per post type), title of the meta box, the callback function which adds the extra fields, the type of write screen or custom post type and context which is where the box is added (&#8216;normal&#8217;, &#8216;advanced&#8217;, or&nbsp;&#8216;side&#8217;).</p>

<p>The <code>add_meta_box</code> function is as&nbsp;follows;</p>

<pre><code>function post_type_custom_fields() {
    add_meta_box('extra', 'Details', 'custom_fields_team', 'team', 'normal');
}
</code></pre>

<p>Finally, you need to tell WordPress about these functions, which is done by adding “actions”. For the custom post type you need one action, and custom fields you need two. For the code above, the following code was&nbsp;used;</p>

<pre><code>add_action('init',       'post_type_init');
add_action('admin_init', 'post_type_custom_fields');
add_action('save_post',  'post_type_custom_fields_update');
</code></pre>

<p>Note, when registering a custom post type you can use the <code>register_meta_box_cb</code> argument, which points to a function where you setup meta boxes. This may be a preferable solution to that documented above, but I didn’t know about it&nbsp;before!</p>

<h3>Annoyances</h3>

<p>Although a great addition to WordPress, there are plenty of annoyances which plague the custom post type system. In version 3, the system lacked a built in archive system, however this was implemented in version 3.1. This quick turn around is noticeable and in many situations it’s current form is more hassle than it’s&nbsp;worth.</p>

<p>The lack of custom post type archive in version 3 lead to solutions using the built in pages and templates functionality. This is a system I still use even though archives are available in version 3.1. I found the built in archive solution for custom post types to be very buggy and lacked functionality I&nbsp;required.</p>

<p>Firstly, there is currently no integration with the (relatively recent) Menu / Navigation system, meaning you had no way to adding these archive pages to the template dynamically (sure, there might be hacks, but no nice way). The only viable method was adding a custom page, but then this lost any relationship to the active page/archive, making coding active states reliant on menu <span class="caps">ID</span> class names, which can lead to difficult to maintainable&nbsp;code.</p>

<p>Using a page with a custom page template means you can also easily add in other plugins, such as All-in-One <span class="caps">SEO</span>, allowing for control over the title and meta data for the page. It also means that you can use the managed content area as you would on a normal&nbsp;page.</p>

<p>Combining the template page with the rewrite functionality of the custom post type gives you the most control over your new content. You can even change the permalink template by using the <code>single-{post_type}.php</code> <a href="http://codex.wordpress.org/Template_Hierarchy#Single_Post_display">template&nbsp;hierarchy</a>.</p>

<p>Although using two sections in the <span class="caps">CMS</span> to manage a single entity is far from ideal, it gives the flexibility and functionality the current implementation of custom post types is missing. I have no doubt in future releases these issues with be rectified, it’s just a case of waiting and using other solutions in the mean&nbsp;time.</p>
]]></description>
			<pubDate>Mon, 04 April 2011 09:32:09</pubDate>
		</item>
				<item>
			<title>FuelPHP, Forms and Validation</title>
			<link>http://www.trovster.com/blog/2011/03/fuelphp-forms-and-validation</link>
			<description><![CDATA[<p>I have been working on developing a website with the newest <span class="caps">PHP</span> framework on the block — <a href="http://fuelphp.com">Fuel</a>, which describes itself as “a simple, flexible, community driven <span class="caps">PHP</span> 5.3 web framework based on the best ideas of other frameworks with a fresh&nbsp;start”.</p>

<p>Initial progress with the framework was quite swift, as it takes the common <span class="caps">MVC</span> approach, something you will be familiar with if you know any decent frameworks, <span class="caps">PHP</span> or otherwise. Although Fuel is a new framework, it borrows a lot of ideas from two very popular <span class="caps">PHP</span> frameworks, <a href="http://codeigniter.com">CodeIgniter</a> and CodeIgniter’s <span class="caps">PHP5</span> fork <a href="http://kohanaframework.org">Kohana</a> (although it has since been rewritten in version three) and the core team; <a href="http://dhorrigan.com">Dan Horrigan</a>, who is lead developer, <a href="http://philsturgeon.co.uk">Phil Sturgeon</a>, <a href="http://wanwizard.eu">Harro Verton</a> and <a href="http://jelmerschreuder.nl">Jelmer Schreuder</a>; all work heavily within the CodeIgniter&nbsp;community.</p>

<p>However, there were a couple of times I came unstuck due to the lack of documentation. Good documentation is a major driving force behind any framework, something that CodeIgniter is superb with, and Kohana has been working on since the release of version three. Fuel is no different, there is some core documentation to get you started on common topics but currently it is lacking in a few areas — <strong>this is going to change very soon</strong>, currently Fuel is in beta, but with version one release candidate being released on April 1st documentation completion is a high priority for the official release&nbsp;date.</p>

<p>A side effect of a new framework is also the lack of blog articles documenting “how-tos”, which are often more useful than documentation. <a href="http://philsturgeon.co.uk/blog/category/fuelphp">Phil Sturgeon has a couple of articles and a screencast</a> and you might find some luck on Google, but I became frustrated when I wanted to know the best and framework way to implement a simple form with validation. Luckily, FuelPHP already has a good community and a few minutes on the <span class="caps">IRC</span> channel (#fuelphp on freenode) I was up and running. Below is my brief run through of what I&nbsp;did.</p>

<h3>The&nbsp;<span class="caps">HTML</span></h3>

<p>Although there are magic methods to automatically create forms with validation already baked in to the framework, the missing documentation means that working it out for yourself is likely to be more hassle and stress than the reward you get. I like to be in tight control of my <span class="caps">HTML</span>, so the best solution was to combine <span class="caps">HTML</span> and form helpers. Although the form helpers aren’t yet documented, a quick look in to the code shows that they’re incredibly simple to&nbsp;use.</p>

<p>Below is an example email input (using the <span class="caps">HTML5</span> <code>email</code> type), which uses the <code>Form::input</code> helper. The first argument is the <code>name</code> attribute, the second is the value — this is taken from the <code>$validation</code> class (set up in the controller, see below) — and finally an array of other attributes. <code>$validation-&gt;errors</code> is a method which outputs any error messages which have been&nbsp;set.</p>

<pre><code>&lt;div class="text email required"&gt;
    &lt;label for="contact-email"&gt;Email &lt;abbr title="Required"&gt;*&lt;/abbr&gt;&lt;/label&gt;
    &lt;?php echo Form::input('email', $validation-&gt;input('email'), array(
        'type'     =&gt; 'email',
        'id'       =&gt; 'contact-email',
        'required' =&gt; 'required'
    )); ?&gt;
    &lt;?php echo $validation-&gt;errors('email'); ?&gt;
&lt;/div&gt;
</code></pre>

<h3>Form&nbsp;Validation</h3>

<p>For any user generated content you should be validating the input, this is something which frameworks make incredibly easy to do. FuelPHP comes with a useful <a href="http://fuelphp.com/docs/classes/validation.html">validation&nbsp;class</a>.</p>

<p>You start by setting up the fields which need validating and their corresponding rules, which are chain-able. Example below for the email&nbsp;input.</p>

<pre><code>$validation = \Validation::factory('contact');
$validation-&gt;add('email', 'Email')
    -&gt;add_rule('required')
    -&gt;add_rule('valid_email');
</code></pre>

<p>Optionally, you can set up <a href="http://fuelphp.com/docs/classes/validation.html#errors">custom error messages</a> for each rule. For the email input validation rules, I used the following&nbsp;messages.</p>

<pre><code>$validation-&gt;set_message('required', ':label is required.');
$validation-&gt;set_message('valid_email', ':label must be a valid email address');
</code></pre>

<p>To run the validation, simply do the following, adding success code within the <code>if</code>&nbsp;statement.</p>

<pre><code>if($validation-&gt;run()) {
    // success, form is valid
}
</code></pre>

<p>Finally, assign the validation to the&nbsp;view.</p>

<pre><code>$this-&gt;_view-&gt;validation = $validation;
</code></pre>

<h3>Success&nbsp;Handling</h3>

<p>Once you’ve got your form validated, you need to do something useful with the data and then redirect the user to avoid multiple <span class="caps">POST</span> requests. Usually you will be saving the information in to a database, so load up the correct model, assign the values and let the <span class="caps">ORM</span> save the object. Below is an example of how I save a basic contact form, this is within the success <code>if</code> statement defined&nbsp;above.</p>

<pre><code>if($validation-&gt;run()) {
    $contact = new Model_Contact();
    $contact-&gt;name    = $validation-&gt;validated('name');
    $contact-&gt;email   = $validation-&gt;validated('email');
    $contact-&gt;message = $validation-&gt;validated('message');
    $contact-&gt;save();
}
</code></pre>

<p>Finally, redirect the user to a confirmation&nbsp;page.</p>

<pre><code>Response::redirect('contact/confirmation');
</code></pre>

<h3><code>input</code> vs&nbsp;<code>validated</code></h3>

<p>The code documented above uses two methods on the <code>$validation</code> class to get the value of the POST request. They behave slightly differently, so it is useful to know the&nbsp;difference.</p>

<p><code>$validation-&gt;input</code> is used in the view form helper and populates the form with the value the <em>user&nbsp;typed</em>.</p>

<p><code>$validation-&gt;validated</code> returns a sanitised value that has been passed through all the validation rules. For example, if you use <code>trim</code> or <code>strip_tags</code> then the validated value will be trimmed with no HTML elements. <strong>Importantly</strong>, if you use <code>valid_email</code> and the user inputs an invalid email address, the <em>validated value will be blank</em> — this would be annoying and unexpected behaviour if used with the view form&nbsp;helper.</p>
]]></description>
			<pubDate>Thu, 24 March 2011 12:38:25</pubDate>
		</item>
				<item>
			<title>Director Series: Danny Boyle</title>
			<link>http://www.trovster.com/blog/2011/02/danny-boyle</link>
			<description><![CDATA[<p><a href="/movies/director/danny-boyle">Danny Boyle</a> is a director who has an eclectic career so far, never settling in to a single genre of film, instead excelling at each project, whether it be a zombie action thriller, a science fiction epic or a downright disgusting character&nbsp;piece.</p>

<p><a href="/movies/id:1180/shallow-grave/">Shallow Grave</a> is definitely a debut movie. Released in 1994 it has dated quite badly, is very rough around the edges and has a certain raw direction and cinematography. The story is average at best, but you leave thinking about the strong climatic ending. The characters are self indulgent, witty and fast talking, these traits and overall style feels very much as a less disgusting precursor to Trainspotting, you can also certainly see the talent of the director at this early stage. It also marked the debut for screenwriter John Hodge, who collaborated with Boyle in next three movies (up to The Beach) and the first starring role for Ewan McGregor, who he later directed on Trainspotting and A Life Less Ordinary – this was until their feud over the casting of Leonardo DiCaprio in The&nbsp;Beach.</p>

<p><img width="470" height="190" src="/img/movies/still/[1165]_trainspotting.jpg" /></p>

<p><a href="/movies/id:1165/trainspotting/">Trainspotting</a> is an amazing piece of cinema. Having recently revisited the movie I was physically afflicted by the grotesque reality that Danny Boyle’s and the actors – notably Ewan McGregor – managed to project so vividly in this disgusting look at drug culture. Released in 1996 but set in ‘80s Scotland, it follows a gang of double crossing drug dealing outcasts. Everyone talks about the toilet scene and for good reason. It is a truly disgusting set piece which made me flinch and wriggle in my seat – a reaction both the director and actor were definitely hoping&nbsp;for.</p>

<p><a href="/movies/id:1182/a-life-less-ordinary/">A Life Less Ordinary</a> (1997) is a light-hearted movie again starring Ewan McGregor, this time along side Cameron Diaz, together as an unexpected and unusual couple, forced together by her kidnapping. This rather conventional story has a slight twist, in the way of two angels, who are in charge of human relationships on earth, offer some unsolicited help to bring this unlikely couple together. The movie is a departure from his darker previous movies, in both style and substance, and although a perfectly fine movie in it’s own right, it is still one of his&nbsp;weakest.</p>

<p><a href="/movies/id:606/the-beach/">The Beach</a> (2000) had a somewhat controversial production process. Firstly, the studio wanted a bigger, well-known actor to star as the lead, and when Leonardo DiCaprio was cast, a feud was created between the director and his previous favourite Ewan McGregor. Secondly, there were protests about the production impact on the idyllic remote islands where it was filmed. With these issues aside, the movie conveys a great sense of awe and exploration that backpacking brings, inter-weaved with mystery and a sense of foreboding. The movie loses a little pace towards the end, but is visually impressive and draws you in quickly with the intriguing&nbsp;screenplay.</p>

<p><img width="470" height="190" src="/img/movies/still/[1176]_28-days-later.jpg" /></p>

<p>In 2002 Boyle returned to a more low-budget, British-based movie, the apocalyptic <a href="/movies/id:1176/28-days-later/">28 Days Later</a>. It opens with scenes of violent conduct and as the camera pans back, we see a monkey being forced to witness these atrocities – much like the main protagonist’s rehabilitation program in A Clockwork Orange. The movie plays out as a straight-forward survival movie, with the first half set in London’s abandoned streets, where we learn of the apocalyptic situation and meet the main characters, notably lead by Cillian Murphy (Jim). The second half is set in a rural stately home north of Manchester, which is being used a strong hold by a group of military personal. Although they have seemingly reached safety, things eventually turn sour, and in the final action scenes Jim’s rage mirrors that of the infected - a harsh and harrowing conclusion to the movies social commentary. There are some interesting stylistic shots, such as the painted flowers, the dream sequence <span class="amp">&amp;</span> the final “28 days later” ending. Usually these types of playful and &#8216;arty&#8217; shots would look out of place in any zombie or action movie, but this relatively low-budget British production isn&#8217;t a normal zombie-esque action movie. Although it spawned a direct sequel – 28 Weeks Later – it actually helped start the zombie movie revival we still see&nbsp;today.</p>

<p><a href="/movies/id:583/millions/">Millions</a> (2004) is the directors weakest movie. A childish tale of two deprived children who find a bag a money, the problem is, the next day the currency changes from Pounds Sterling to the Euro. The conflict begins as one believes they should give it to the poor, but the older brother prefers to be “fiscal responsibility”. And their journey interweaves with moral uncertainty and responsibility, but it is unfortunately wrapped up in a whimsical story. Although my least favourite movie, it is one I would like to revisit with a fresh pair of&nbsp;eyes.</p>

<p><img width="470" height="190" src="/img/movies/still/[251]_sunshine.jpg" /></p>

<p><a href="/movies/id:251/sunshine/">Sunshine</a> (2007) was Danny Boyle&#8217;s first big budget Hollywood movie and so far his only science-fiction set story. The characterisation of many of the crew is shallow even the main protagonist – played by Cillian Murphy in his second lead role for the director – has little in the way of dialogue, well scripted conflict and even scene time. It is clear that a massive amount of research was put in to the movie, on par with the scientifically sound sci-fi classic 2001: A Space Odyssey. By far the strongest scene is that of the airlock situation where the crew must leap through space in order to survive, there is high tension, great conflict and punchy dialogue. The external visuals are beautiful, but the story and acting is lacking somewhat, the story suffers from large and disorientating non-announced fast-forwarding in the timeline, and the final act takes an unnecessary “Event Horizon”-esque storyline detour. Overall an <span class="caps">OK</span> but enjoyable big-budget science-fiction movie but is lacking the characterisation most of his movies focus&nbsp;upon.</p>

<p>A side note about Sunshine&#8217;s marketing, which imposed the stunning visuals against the atmospheric music by Clint Mansell. The genre and style is well suited to the music – <a href="http://en.wikipedia.org/wiki/Lux_Aeterna_%28Requiem_for_a_Dream%29">Lux Æterna</a> – which first appeared in Darren Aronofsky&#8217;s masterpiece Requiem for a Dream. Yet this music was only used in the trailer. If it was used in subtle repetition like this years movie of the summer, Inception, the score could have been the movie&#8217;s strongest&nbsp;asset.</p>

<p><img width="470" height="190" src="/img/movies/still/[780]_slumdog-millionaire.jpg" /></p>

<p><a href="/movies/id:780/slumdog-millionaire/">Slumdog Millionaire</a> (2008) has been Boyle’s most successful movie to date. An unconventional non-linear story that was filmed on location in the Mumbai slums – even some of the leading cast members where from the area – and is told in multiple short stories as the protagonist explains how he knows the answers to all the questions in the Indian version of the <span class="caps">TV</span> game show “Who Wants to be a Millionaire”. Winning a total of <em>eight</em> Academy Award Oscars, including best achievements in cinematography, editing and directing and the much coveted &#8220;Best Motion Picture of the Year&#8221;, the movie also received universal praise from the&nbsp;public.</p>

<p>His latest movie, <a href="/movies/id:1205/127-hours/">127 Hours</a> (2010), is a look at one mans struggle to overcome inevitable death by doing the unthinkable. After 127 hours stuck with his arm pinned under a boulder, this true story follows Aron Ralston and his insatiable desire to survive. James Franco is superb as the charismatic adrenaline junky, making you believe in the whole range of emotions he goes through, from carefree to despair and finally relief – he definitely carries the movie. The movie is enthused with Danny Boyle’s style. The music is very influential and a big part of the experience. There are also some very inventive shots, memorably the water flowing through his Camelback and the placement of a camera within a water canister. Boyle again manages to make the audience uncomfortable, but it isn’t the most talked about scene which got me to flinch and look away. During the movie I didn’t feel completely engaged with the character, but during the final scenes there was a definite sense of emotional relief, so the movie affects you more on a psychological&nbsp;level.</p>

<p>Danny Boyle is unquestionably an amazing director. He certainly has his own style, which he has continually improved from movie to movie, but he has managed to take completely different genres, ideas and stories and make them engaging, fun and visceral. He is definitely a director to watch and be surprised with what projects he tackles&nbsp;next.</p>

<p class="note">This part of a series looking at movie&nbsp;directors.</p>
]]></description>
			<pubDate>Tue, 01 February 2011 18:14:33</pubDate>
		</item>
			</channel>
</rss>
