<?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>Sheru!</title>
	<atom:link href="http://www.shellbryson.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shellbryson.com</link>
	<description>writer, web developer, designer</description>
	<lastBuildDate>Wed, 21 Dec 2011 13:44:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ThreeJS: creating a basic 3D scene in WebGL</title>
		<link>http://www.shellbryson.com/2011/12/threejs-creating-a-basic-3d-scene-in-webgl/</link>
		<comments>http://www.shellbryson.com/2011/12/threejs-creating-a-basic-3d-scene-in-webgl/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 12:12:43 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WebGL]]></category>
		<category><![CDATA[ThreeJS]]></category>
		<category><![CDATA[webGL]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=773</guid>
		<description><![CDATA[At my new job I&#8217;m taking a look at WebGL for various prototype visualisations. Having tried a number of frameworks, I&#8217;ve found ThreeJS to be the easiest of them to get up and running quickly. var container, stats; var camera, scene, renderer; var cube; var targetRotationX = 10; var targetRotationY = 10; var targetRotationZ = [...]]]></description>
			<content:encoded><![CDATA[<p>At my new job I&#8217;m taking a look at WebGL for various prototype visualisations. Having tried a number of frameworks, I&#8217;ve found ThreeJS to be the easiest of them to get up and running quickly.</p>
<div id="attachment_781" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.shellbryson.com/wp-content/uploads/2011/12/UX-UI-experiments-with-WebGL-and-HTML5-Three_-cube.jpg"><img class="size-medium wp-image-781 colorbox-773" title="WebGL Cube" src="http://www.shellbryson.com/wp-content/uploads/2011/12/UX-UI-experiments-with-WebGL-and-HTML5-Three_-cube-300x255.jpg" alt="" width="300" height="255" /></a><p class="wp-caption-text">WebGL cube via ThreeJS</p></div>
<p><p>
								<pre class="Plum_Code_Box"><code class="javascript">var container, stats;
var camera, scene, renderer;
var cube;

var targetRotationX = 10;
var targetRotationY = 10;
var targetRotationZ = 10;
var targetRotationOnMouseDown = 0;

var mouseX = 0;
var mouseXOnMouseDown = 10;

var mouseY = 0;
var mouseYOnMouseDown = 10;


var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;

$(function() {
    init();
    animate();
})

function init() {

    container = document.createElement( 'div' );
    document.body.appendChild( container );

    scene = new THREE.Scene();

    camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 1000 );
    camera.position.y = 150;
    camera.position.z = 500;
    scene.add( camera );
    
    // LIGHT IN FRONT
    var light = new THREE.PointLight( 0xffffff, 2.0 );
    light.position.set( 0, 500, 1000 );
    light.castShadow = false;
    scene.add( light );
    
    var materials = [];

    for ( var i = 0; i &lt; 6; i ++ ) {
        materials.push( new THREE.MeshPhongMaterial( {
            color: 0x9CDB79,
            opacity: 0.5,
            transparent:true
        } ) );
    }

    cube = new THREE.Mesh( new THREE.CubeGeometry( 200, 200, 200, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
    cube.position.x = 0;
    cube.position.y = 150;
    cube.position.z = 0;
    cube.rotation.x = 5;
    cube.rotation.y = 5;
    cube.rotation.z = 5;
    cube.doubleSided = true;
    cube.flipSided = false;
    cube.overdraw = true;
    cube.dynamic = false;
        
    cube.overdraw = true;
    scene.add( cube );

    renderer = new THREE.WebGLRenderer({ antialias: true });
    renderer.setSize( window.innerWidth, window.innerHeight );

    container.appendChild( renderer.domElement );

    stats = new Stats();
    $(&quot;#stats&quot;).append( stats.domElement )

    document.addEventListener( 'mousedown', onDocumentMouseDown, false );
}

function onDocumentMouseDown( event ) {
    event.preventDefault();
    document.addEventListener( 'mousemove', onDocumentMouseMove, false );
    document.addEventListener( 'mouseup', onDocumentMouseUp, false );
    document.addEventListener( 'mouseout', onDocumentMouseOut, false );
    mouseXOnMouseDown = event.clientX - windowHalfX;
    mouseYOnMouseDown = event.clientY - windowHalfY;
    targetRotationOnMouseDown = 5;
}
function onDocumentMouseMove( event ) {
    mouseX = event.clientX - windowHalfX;
    targetRotationY = targetRotationOnMouseDown + ( mouseX - mouseXOnMouseDown ) * 0.02;
    mouseY = event.clientY - windowHalfY;
    targetRotationX = targetRotationOnMouseDown + ( mouseY - mouseYOnMouseDown ) * 0.02;
}
function onDocumentMouseUp( event ) {
    document.removeEventListener( 'mousemove', onDocumentMouseMove, false );
    document.removeEventListener( 'mouseup', onDocumentMouseUp, false );
    document.removeEventListener( 'mouseout', onDocumentMouseOut, false );
}
function onDocumentMouseOut( event ) {
    document.removeEventListener( 'mousemove', onDocumentMouseMove, false );
    document.removeEventListener( 'mouseup', onDocumentMouseUp, false );
    document.removeEventListener( 'mouseout', onDocumentMouseOut, false );
}
function animate() {
    requestAnimationFrame( animate );
    render();
    stats.update();
}
function render() {
    cube.rotation.x += ( targetRotationX - cube.rotation.x ) * 0.05;
    cube.rotation.y += ( targetRotationY - cube.rotation.y ) * 0.05;
    renderer.render( scene, camera );
}
</code>
									</pre>
							</p></p>
<p><a title="ThreeJS cube demo" href="http://www.shellbryson.com/demos/ux/demo_three_cube.php">Click here</a> to view the demo in action.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/12/threejs-creating-a-basic-3d-scene-in-webgl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThreeJS: colours and opacity</title>
		<link>http://www.shellbryson.com/2011/12/threejs-colours-and-opacity/</link>
		<comments>http://www.shellbryson.com/2011/12/threejs-colours-and-opacity/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 12:19:31 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WebGL]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[transparent]]></category>
		<category><![CDATA[webGL]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=770</guid>
		<description><![CDATA[When creating an object we can colour it. A notes that I found useful: cube = new THREE.Mesh( cubeGeo, new THREE.MeshLambertMaterial({ color: Math.random() * 0xffffff, opacity: 0.9, transparent: true }) ); Math.random() * 0xffffff generates a random colour opacity sets the opacity level for the surfaces within our cube. For example, the you can see [...]]]></description>
			<content:encoded><![CDATA[<p>When creating an object we can colour it. A notes that I found useful:</p>
<p><p>
								<pre class="Plum_Code_Box"><code class="javascript">cube = new THREE.Mesh( cubeGeo, new THREE.MeshLambertMaterial({ color: Math.random() * 0xffffff, opacity: 0.9, transparent: true }) );</code>
									</pre>
							</p></p>
<p><strong>Math.random() * 0xffffff</strong> generates a random colour</p>
<p><strong>opacity</strong> sets the opacity level for the surfaces within our cube. For example, the you can see &#8216;into&#8217; the cube through its surfaces, but other objects that are behind your cube will not be visible.</p>
<p><strong>transparent:true</strong> will apply your the opacity to the entire cube. Other objects in the scene will be visible through the cube.</p>
<p>I&#8217;ve also seen this technique for applying a material directly to each side of a cube:</p>
<p><p>
								<pre class="Plum_Code_Box"><code class="javascript">for ( var i = 0; i &lt; 6; i ++ ) {
        materials.push( new THREE.MeshPhongMaterial( {
            color: 0x9CDB79,
            opacity: 0.5
        } ) );
    }

cube = new THREE.Mesh( new THREE.CubeGeometry( cubeSize, cubeSize, cubeSize, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
        </code>
									</pre>
							</p></p>
<p>&#8230;however it causes horrific flickering in Google Chrome. Probably best to avoid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/12/threejs-colours-and-opacity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sync iCal to the iCloud &#8211; what to do if it doesn&#8217;t work</title>
		<link>http://www.shellbryson.com/2011/10/sync-ical-to-the-icloud-what-to-do-if-it-doesnt-work/</link>
		<comments>http://www.shellbryson.com/2011/10/sync-ical-to-the-icloud-what-to-do-if-it-doesnt-work/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 10:53:38 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iCal]]></category>
		<category><![CDATA[iCloud]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=662</guid>
		<description><![CDATA[Are you struggling to get your Mac iCal calendars to sync with iCloud? Unfortunately, it doesn&#8217;t appear that the MobileMe &#62; iCloud transfer of calendars works all of the time. There&#8217;s little documentation on at Apple.com to assist if it doesn&#8217;t work, but it&#8217;s fairly simple to perform manually. Below is how I re-imported my [...]]]></description>
			<content:encoded><![CDATA[<p>Are you struggling to get your Mac iCal calendars to sync with iCloud?</p>
<p>Unfortunately, it doesn&#8217;t appear that the MobileMe &gt; iCloud transfer of calendars works all of the time. There&#8217;s little documentation on at Apple.com to assist if it doesn&#8217;t work, but it&#8217;s fairly simple to perform manually. Below is how I re-imported my calendars &#8211; requiring you to have gone through the iCloud setup process first. If you skipped the setup of your iCloud account, you can trigger this again through OSX&#8217;s System Preferences (there&#8217;s a new iCloud applet in there).</p>
<ol>
<li>From iCal, export each of your calendars as .ics files from the File menu. Stick the files on your desktop for easy access.</li>
<li>You&#8217;ll notice that you have a couple of extra calendars in iCal that belong to iCloud. You&#8217;ll need to rename these to match your old calendars, and / or create some new ones. You can do this from the file menu. Make sure when creating new Calendars that you select the iCloud option for &#8216;location&#8217;.</li>
<li>Back in iCal, uncheck all of your local calendars so that they are no longer displayed &#8211; this makes it a little easier to see that you have successfully recreated your calendars in the iCloud.</li>
<li>Now, back to the File menu and choose Import, and select one of the .ICS files. Pick the destination calendar within iCloud.</li>
<li>Across the top of iCal you will see &#8220;Updating&#8230;&#8221;. You can check the progress by logging into iCloud.com and viewing the calendar you just created.</li>
</ol>
<p>Your calendars should now sync correctly. You&#8217;ll probably see duplicate entries on your desktop iCal as both sets of Calendars are still active. Once you are comfortable that everything has migrated successfully, you may want to remove (or disable) the &#8216;local&#8217; calendars, leaving only the iCloud calendars active. You can also delete the .ics files from your desktop as you won&#8217;t need these again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/10/sync-ical-to-the-icloud-what-to-do-if-it-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random post about cars</title>
		<link>http://www.shellbryson.com/2011/09/random-post-about-cars/</link>
		<comments>http://www.shellbryson.com/2011/09/random-post-about-cars/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 15:45:12 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Alfa]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[Citroen]]></category>
		<category><![CDATA[MiTo]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=645</guid>
		<description><![CDATA[I don&#8217;t know anything about cars. There, I said it. It just wasn&#8217;t something that ever did it for me. I mean, I admire the technology, but I don&#8217;t ever pretend to have the first clue about how car-things work, so long as it gets me from A to B. Cars were for me  just [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know anything about cars. There, I said it. It just wasn&#8217;t something that ever did it for me. I mean, I admire the technology, but I don&#8217;t ever pretend to have the first clue about how car-things work, so long as it gets me from A to B. Cars were for me  just really small, temperamental buses. Then, in 2008, I inherited dad&#8217;s beat-up old Citroen. 130,000 miles on the clock, green, mean and growly, and sprouting moss like old-man whiskers. This car was a tank to drive, but made out of something similar to tin foil when it came to safety. Don&#8217;t get me wrong, this was a good car, it worked, mostly, and while it lacked any finesse at all, it was our first car.</p>
<p><a href="http://www.shellbryson.com/wp-content/uploads/2011/09/IMG_0113.jpg"><img class="aligncenter size-medium wp-image-646 colorbox-645" title="Citroen AX" src="http://www.shellbryson.com/wp-content/uploads/2011/09/IMG_0113-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Sadly, our mean-green-machine was starting to develop other old-man symptoms. It didn&#8217;t like the cold, hacking up noxious clouds of stuff if you dared suggest venturing out when it was wet, or a little bit chilly. Frankly, I was scared stiff if that if we ever had an accident it&#8217;d be game over &#8211; pretty much no safety features. The radio, well that never worked.</p>
<p>In 2009, the government scrappage scheme kicked in. Even old beasts like or Citroen were suddenly worth something more than the £200 scrap metal fee. I think the car knew what was coming. Even on the day I had to drive it to the Alfa garage to part-ex for a whopping £2000 (car was worth a 10th of that, if lucky), it refused to start, draining the battery and kicking out the most awful black clouds. Eventually I did get it to limp to the garage, and I drove home with a beatiful Alfa MiTo 95 Veloce.</p>
<p><a href="http://www.shellbryson.com/wp-content/uploads/2011/09/IMG_5969.jpg"><img class="size-medium wp-image-649 aligncenter colorbox-645" title="MiTo 95 Veloce" src="http://www.shellbryson.com/wp-content/uploads/2011/09/IMG_5969-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>It&#8217;s funny, from not caring about cars at all, the MiTo made me love them &#8211; not particularly in a &#8220;petrol head&#8221; sort of way, but an admiration for the workmanship, and the fun that they can introduce into simply getting around the shops. The MiTos are really <em>fun</em> to drive. Two years on, the 2011 range of MiTos have just hit the marget with upgraded engines and lots of other mod-cons that make the techie in me coo with delight. There&#8217;s also no denying that the MiTo is a beautiful machine from a design perspective too.</p>
<p>The warrantee agreement on our black MiTo was about to run out, and facing a £320 2-year service fee, it was a good time to look at the newest model. We took the new 135 multiair model for a spin in Edinburghs bypass and it was just amazing. Unlike our first MiTo, these engines have a turbo, as well as ~40% more power and 10% fuel saving.</p>
<p>Yesterday we popped down to the Alfa showroom again, and there she was, our MiTo freshly delivered from Italy (erm&#8230; via Perth).</p>
<p><img class="size-medium wp-image-650 aligncenter colorbox-645" title="IMG_1627" src="http://www.shellbryson.com/wp-content/uploads/2011/09/IMG_1627-300x224.jpg" alt="" width="300" height="224" /></p>
<p>Cannot wait until we get to pick her up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/09/random-post-about-cars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anime Picks fall update (1.1)</title>
		<link>http://www.shellbryson.com/2011/09/anime-picks-fall-update-1-1/</link>
		<comments>http://www.shellbryson.com/2011/09/anime-picks-fall-update-1-1/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 22:05:53 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[anime picks]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=640</guid>
		<description><![CDATA[It&#8217;s been a little while since the relaunch of Anime Picks in March. The response to the release was better than we could have hoped, with a significant increase in traffic and great feedback. We&#8217;re over the moon with the growing success for the magazine. But, for us, we won&#8217;t ever be happy until Anime Picks becomes [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a little while since the relaunch of Anime Picks in March. The response to the release was better than we could have hoped, with a significant increase in traffic and great feedback. We&#8217;re over the moon with the growing success for the magazine. But, for us, we won&#8217;t ever be happy until <a title="Anime Picks" href="http://animepicks.co.uk">Anime Picks</a> becomes the default site for any anime lover. We have some way to go yet, and have been listening very closely to all feedback.</p>
<p>We&#8217;ve had an opportunity too to take stock of the elements of AP that work best, and review those that don&#8217;t work so well.</p>
<h2>Content</h2>
<p>We&#8217;ve commissioned new artwork, and we&#8217;re looking at expanding many sections of the magazine. While we have a fairly steady stream of excellent articles from various contributors, we&#8217;re pushing for more varied content.</p>
<h2>Magazine design</h2>
<p>A competition held earlier in the year helped generate some fantastic ideas that we&#8217;re planning on pulling into a refreshed design  magazine. Rather than a whole new design, we&#8217;re revisiting and improving the layout we introduced in March.</p>
<div id="attachment_642" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.shellbryson.com/wp-content/uploads/2011/09/ap11.jpg"><img class="size-medium wp-image-642 colorbox-640" title="ap11" src="http://www.shellbryson.com/wp-content/uploads/2011/09/ap11-300x97.jpg" alt="" width="300" height="97" /></a><p class="wp-caption-text">Anime Pick refreshed design</p></div>
<p>A few of the things we have planned:</p>
<ul>
<li>Improved menus</li>
<li>Refreshed graphics</li>
<li>New content page layouts</li>
<li>New content page menus</li>
<li>New &#8216;social&#8217; and &#8216;subscription&#8217; areas.</li>
</ul>
<h2>Video</h2>
<p>The video content hasn&#8217;t seen much love, and we have a project under way to deliver new videos over the coming months.</p>
<h2>Technology</h2>
<p>I was keen from the start to maintain AP at the cutting edge of web tech, without jeopardising cross-browser support. The up coming release takes us to the next level, with considerable refactoring of the WordPress templates under the hood to move us to full HTML5 support and the latest version of jQuery. We&#8217;re dropping support for older versions of Internet Explorer. The magazine shines in Chrome and FireFox.</p>
<p>These updates don&#8217;t change much visibly, but they help build a wider, more stable foundation for future updates (of which we have many planned).</p>
<h2>Future</h2>
<p>We have many plans, and time and advertisers willing we hope to continue the expansion of Anime Picks over the next few months and into 2012. It goes without saying that it&#8217;s a project the entire team is passionate about and would very much like to see it succeed. I&#8217;m really enjoying the fine-details of wrangling the technologies to get this to work. As a play-pen Anime Picks couldn&#8217;t be much more varied and fun, but as always with the nature of unpaid projects, time and resource are always outstripped by our ever-growing wish-list!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/09/anime-picks-fall-update-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP trainer: Object Orientated PHP</title>
		<link>http://www.shellbryson.com/2011/09/php-trainer-object-orientated-php/</link>
		<comments>http://www.shellbryson.com/2011/09/php-trainer-object-orientated-php/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 13:56:37 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[trainer]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=597</guid>
		<description><![CDATA[I thought it was time I took stock of some of the technologies I&#8217;ve been working on over the years. Thinking back over the tech I became briefly unstuck with, such as Object Orientated PHP, I thought I&#8217;d share some of the basics here. So, what follows are really, really simple code-snippits that may help [...]]]></description>
			<content:encoded><![CDATA[<p>I thought it was time I took stock of some of the technologies I&#8217;ve been working on over the years. Thinking back over the tech I became briefly unstuck with, such as Object Orientated PHP, I thought I&#8217;d share some of the basics here. So, what follows are really, really simple code-snippits that may help someone, somewhere, if they&#8217;re looking at making the move from function-based PHP to grand world of Object Orientation.</p>
<h2>PHP and OOP</h2>
<p>Object Orientated Programming has been around forever (I can remember hacking away at OO within Flash years ago). However, PHP has only had OO support in a usable form since PHP 5. If you&#8217;re using an older version of PHP, upgrade! It&#8217;s not worth the hairloss.</p>
<h2>Why Object Orientated PHP anyway?</h2>
<p>Anyone who has spent any quality time with PHP knows how beautifully messy the code can get in a remarkably short time. Especially if there are multiple folks working on the code. OOP at the simplest level is possibly the single best way to organise your code by breaking it up into small, distinct libraries of functionality (classes). Smaller units of code can be worked simultaneously, and in theory are easier to debug.</p>
<h2>The basics</h2>
<ul>
<li>A <em>class</em> is a &#8216;template&#8217; for building an object.</li>
<li>An <em>object</em> is an entity that &#8216;does stuff&#8217;.</li>
<li>An object can contain functions (called <em>Methods</em>) and/or data (called <em>Properties</em>).</li>
</ul>
<p>Classes are usually kept externally from your page code. This enables your classes to be included in any file you wish to access the functionality those classes offer using the PHP <em>include </em>directive.</p>
<p><p>
								<pre class="Plum_Code_Box"><code class="php">&lt;?php
  include(&quot;classes_lib.php&quot;);
?&gt;</code>
									</pre>
							</p></p>
<p>To create an object in PHP you use the new keyword. Example&#8230;</p>
<p><code>$n = new makeName;</code></p>
<p>&#8230;where <em>makeName</em> is the name of a class. <em>$n</em> is the name of our resulting object. All of the <em>methods</em> and <em>properties</em> that are part of the class makeName are available to <em>$n</em>.</p>
<h2>Example</h2>
<p>In our example here, I&#8217;ll create a simple object that takes a (hard coded) string and spits it back out onto the resulting page. Kind of pointless, but it demonstrates how all of this works in PHP.</p>
<p>index file (index.php):</p>
<p><p>
								<pre class="Plum_Code_Box"><code class="php">&lt;?php
  include(&quot;classes_lib.php&quot;);
?&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;OOP Example&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;&lt;?php displayTitle::title();?&gt;&lt;/h1&gt;
    &lt;?php
      $n = new makeName;
      $n -&gt; set_name(&quot;fred&quot;);
      print($n -&gt; get_name());
    ?&gt;
  &lt;/body&gt;
&lt;/html&gt;</code>
									</pre>
							</p></p>
<p>class file (classes_lib.php):</p>
<p><p>
								<pre class="Plum_Code_Box"><code class="php">&lt;?php
  class makeName {
    var $name;
    // setter
    function set_name($new_name) {
      $this-&gt;name = $new_name;
    }
    // getter
    function get_name() {
      return $this-&gt;name;
// gets the variable $name declared above. Note the &quot;-&gt;&quot; that gets property
//  value from $this object. Use $object -&gt; property / method
    }
  }
  
  class displayTitle {
    static function title() {
      echo &quot;&lt;h1&gt;This is the title&lt;/h1&gt;n&quot;;
    }
  }</code>
									</pre>
							</p></p>
<p>A <em>setter</em> is a method used for creating something, perhaps a bit of data, within the object. In our case, we give our setter a string (&#8220;Fred&#8221;) by calling the <strong>set_name</strong> method within our newly created $n object:</p>
<p><code>$n -&gt; set_name("fred");</code></p>
<p>This tells PHP we want to access the  set_name method and pass a string to it. Once the object contains that string, we can do other stuff with it. In our really, really simple example, we simply get that name back again using:</p>
<p><code>print($n -&gt; get_name());</code></p>
<p>The get_name() method is out <em>getter</em>.</p>
<p>I&#8217;ve included a second class to generate a title &#8211; displayTitle. This class contains a static method &#8211; a method that can be called without having to first create an object ($n in our first example). To access a static method, we need to tell PHP the name of the class and the name of the method within that class:</p>
<p><code>displayTitle::title();</code></p>
<h2>Next step</h2>
<p>Hopefully you&#8217;ll see that it&#8217;s not all that hard to build a reusable object. There are many things you can do with objects, but I&#8217;ll save that for another post.</p>
<p>Next steps, we could try and change the class to wrap the name in some pretty HTML. By doing this we then have a nice class that we can use over and over for generating nicely formatted names on the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/09/php-trainer-object-orientated-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android + iOS = future?</title>
		<link>http://www.shellbryson.com/2011/09/android-ios-future/</link>
		<comments>http://www.shellbryson.com/2011/09/android-ios-future/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 21:22:10 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Vega]]></category>
		<category><![CDATA[VegaComb]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=573</guid>
		<description><![CDATA[Over the past few weeks I&#8217;ve had a chance to play with an Android-based Advent Vega tablet. These little devices are surprisingly powerful, but also hamstrung with a couple of horrible issues. The first thing that struck me powering up the Vega for the first time is how indescribably crappy the displays is. A flash back to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.shellbryson.com/wp-content/uploads/2011/09/vega.jpg"><img class="alignright size-medium wp-image-575 colorbox-573" title="Vega running Android 3.2" src="http://www.shellbryson.com/wp-content/uploads/2011/09/vega-300x225.jpg" alt="" width="300" height="225" /></a>Over the past few weeks I&#8217;ve had a chance to play with an Android-based Advent Vega tablet. These little devices are surprisingly powerful, but also hamstrung with a couple of horrible issues.</p>
<p>The first thing that struck me powering up the Vega for the first time is how indescribably crappy the displays is. A flash back to the days of DSTN displays &#8211; remember those first generation flat screens? I&#8217;ll agree to cut the Vega a little slack, after all you&#8217;re still getting a fair bit of tablet without having to sacrifice your credit card on an Apple altar. Although it makes me wonder just how drunk their testers must&#8217;ve been (seriously, this screen is *bad*).</p>
<p>The second issue was a bit of a surprise. Now, anyone who knows me probably thinks I&#8217;m a die-hard i-device fan. If it has an Apple logo on it Sheru will love it. This isn&#8217;t fair. What I&#8217;m a fan of is ease of use, the &#8216;tactile&#8217; user experience when using mobile devices. The default (and official) version of Android installed on the Vega is truly awful. Think a bastardised and magnified Android phone screen with almost everything that makes using a tablet sexy well and truly nixed. Don&#8217;t even compare with an iOS based device. Clunky, ugly (okay, perhaps that one is in the eye of the beholder), unresponsive, hard to navigate and lacking basic features that I wouldn&#8217;t even think about. It&#8217;s not all doom and gloom though. Thanks to the dedication of a brave collegue, I soon had the Vega up and running on VegaComb, a custom repackaging of the latest version of Android. Happily I can report that it&#8217;s a night-and-day difference when it comes to the Vega. The device rocks along on its dual core Tegra chip, slick and smooth.</p>
<p>That&#8217;s not the end of the story though. Being a UI fan-boy, I was then able to have a good play with the latest Android offering and, frankly I&#8217;m disappointed. Isn&#8217;t Android supposed to be the flagship of the Open Source mobile world, standing tall against the Evil Apple? Android misses a few tricks, while at the same time managing to raise some interesting questions of Apple&#8217;s IOS too.</p>
<h3>Multitasking</h3>
<p>Back in the early days of iOS, one of the biggest points of criticism seemed to centred around the lack of any real multitasking. Apple fixed this in later versions with the double-tap task bar to access the switching and closing of apps. Perhaps this is a matter of taste (or possibly the retraining of my own muscle memory), but Androids equivalent via an on-screen task button feels clunky.</p>
<h3>Desktop</h3>
<p>I really don&#8217;t understand this continued desktop metaphor on Android devices. We&#8217;re talking mobile devices here. Screen space is an issue, people. So why is so much space wasted with window chromes and &#8216;desktops&#8217;. Apps soon crowd the tiny screens with their widgets, desktop style icons and Androids own UI elements. It makes little sense to me. I really believe full-screen is the way to go &#8211; or tiling. I actually like (don&#8217;t shoot me) Microsofts proposed solution to this in the Windows 8 prototypes recently on show. Tiles work well, letting you see &#8216;into&#8217; functionality without wasted screen space. This is definitely one up from iOS where screen after screen of tiny icons can be frustrating.</p>
<h3>The problem</h3>
<p>When I&#8217;m mobile, ease of use is a must. Imagine cold hands that are all thumbs. Some stuff I want to see quickly and clearly, at a glance. If I&#8217;m actively interacting with something, I want an uncluttered interface. I want that interface to work the same and look the same across all apps, because then I don&#8217;t have to think about the app itself. My focus should be on the task in hand, not trying to find my way around a seldom used app. Reading instructions is for people with too much time on their hands (take up golf, man!), not web sites to maintain and novels to finish writing.</p>
<h3>My wish</h3>
<p>I reckon there&#8217;s a sweet-spot in the middle. This can easily be demonstrated with Apple&#8217;s OSX Lion. Imagine full-screen apps for those primary tasks, and throw in screens of tiled widgets between.</p>
<h3>Useful stuff</h3>
<p>Got an Avent Vega? <a title="Android Vega ROM" href="http://forum.xda-developers.com/forumdisplay.php?f=953">Upgrade to Android 3.2 here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/09/android-ios-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random hail storm&#8230;</title>
		<link>http://www.shellbryson.com/2011/06/random-hail-storm/</link>
		<comments>http://www.shellbryson.com/2011/06/random-hail-storm/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 22:32:47 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Edinburgh]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=566</guid>
		<description><![CDATA[Edinburgh, I love you:]]></description>
			<content:encoded><![CDATA[<p>Edinburgh, I love you:</p>
<p><object width="620" height="374"><param name="movie" value="http://www.youtube.com/v/852Sjo62JXc?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/852Sjo62JXc?version=3" type="application/x-shockwave-flash" width="620" height="374" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/06/random-hail-storm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desktop metaphors and Windows 8</title>
		<link>http://www.shellbryson.com/2011/06/desktop-metaphors-and-windows-8/</link>
		<comments>http://www.shellbryson.com/2011/06/desktop-metaphors-and-windows-8/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 11:43:07 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=558</guid>
		<description><![CDATA[I&#8217;ve never been that much of a fan of the desktop metaphor. It&#8217;s awkward. It&#8217;s cumbersome. To me, it just doesn&#8217;t lend itself to creating that mental map of navigable &#8216;things&#8217;. Things on the desktop just never quite group together logically. They pile up, get lost behind each other, mimimized, in different spaces, or stacked in bizarrely stacked ways. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never been that much of a fan of the desktop metaphor. It&#8217;s awkward. It&#8217;s cumbersome.</p>
<p>To me, it just doesn&#8217;t lend itself to creating that mental map of navigable &#8216;things&#8217;. Things on the desktop just never quite group together logically. They pile up, get lost behind each other, mimimized, in different spaces, or stacked in bizarrely stacked ways.</p>
<p>99% of the time I&#8217;m working in one or two applications. I want them full-screen. I want to seamlessly switch between screens with the swipe of the mouse or fingers.</p>
<p>So, does the desktop metaphor even work?</p>
<p>Generally speaking I find the Apple OS X desktop the easiest environment to use &#8211; certainly the cleanest &#8211; apart from when it comes to organising windows. The most basic of tasks always feels &#8216;messy&#8217;, flicking between <em>spaces</em> and <em>expose</em> and multiple physical screens<em>.</em></p>
<p>Lessons are being learned from mobile environments where complication doesn&#8217;t work. Clean interfaces for small screens, simple naturalist interactions, these are the name of the game.</p>
<p>Videos of OSX Lion and the introduction of a iPad-like application view could be a step in the right direction. But I can&#8217;t help feeling that this is just another layer of complication on top of the desktop metaphor. It&#8217;s still the same old windowing-thing, with a lick of paint and a nod to full-screen apps.</p>
<p>Today videos of the Windows 8 desktop started floating around, and it really feels like an attempt to do something different. Not just another layer of fancy navigation.</p>
<p><object width="620" height="374"><param name="movie" value="http://www.youtube.com/v/p92QfWOw88I?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/p92QfWOw88I?version=3" type="application/x-shockwave-flash" width="620" height="374" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>/via Wired Magazine &#8211; <a title="Windows 8" href="http://www.wired.co.uk/news/archive/2011-06/02/windows-8-revealed">article here</a>.</p>
<p>I&#8217;m happy to see there being some real innovation, and a move away from the &#8216;traditional&#8217; windowing environment. It&#8217;s to early to call who&#8217;s got it right, Apple or Microsoft, but I&#8217;m pretty sure these are the first steps to changing the way interact with software on our desktop computers, hopefully for something far more <em>usable</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/06/desktop-metaphors-and-windows-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Portfolio</title>
		<link>http://www.shellbryson.com/2011/05/portfolio/</link>
		<comments>http://www.shellbryson.com/2011/05/portfolio/#comments</comments>
		<pubDate>Tue, 31 May 2011 16:32:08 +0000</pubDate>
		<dc:creator>Shell</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.shellbryson.com/?p=556</guid>
		<description><![CDATA[Spent my lunch today digging through old day-job projects. It amazing how quickly, and easily, projects that were hell-on-earth at the time are forgotten. I&#8217;ve updated the projects on this blog, but there are lots more to add.]]></description>
			<content:encoded><![CDATA[<p>Spent my lunch today digging through old day-job projects. It amazing how quickly, and easily, projects that were hell-on-earth at the time are forgotten. I&#8217;ve updated the projects on this blog, but there are lots more to add.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shellbryson.com/2011/05/portfolio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

