<?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>CoffeePowered &#187; p52</title>
	<atom:link href="http://coffeepowered.co.uk/category/p52/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeepowered.co.uk</link>
	<description>The online ramblings of Paul Stanton</description>
	<lastBuildDate>Wed, 30 Jun 2010 19:46:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Project52 fail</title>
		<link>http://coffeepowered.co.uk/2010/03/project52-fail/</link>
		<comments>http://coffeepowered.co.uk/2010/03/project52-fail/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 15:59:31 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[p52]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=483</guid>
		<description><![CDATA[So at the start of the year I pledged my allegiance to the #p52 movement and aimed to write 1 new blog post per week for a year. I failed. So this is where I recant multiple excuses to explain my failure. While I got off to a good start with some posts that generated [...]]]></description>
			<content:encoded><![CDATA[<p>So at the start of the year I pledged my allegiance to the #p52 movement and aimed to write 1 new blog post per week for a year.</p>
<p>I failed.</p>
<p><a href="http://www.flickr.com/photos/jameson42/4210338580/" class="image_left"><img src="http://farm3.static.flickr.com/2704/4210338580_505867fbb2_m.jpg" /></a>So this is where I recant multiple excuses to explain my failure. While I got off to a good start with some posts that generated a fair number of comments everything seems to be happening at once and the amount of &#8216;free&#8217; time I can devote to writing has all but vanished into thin air for a short while. As well as some new projects coming my way in my &#8216;day job&#8217; which I&#8217;ve been working flat-out on for a couple of weeks I&#8217;ve also started to dip my toe back into the freelance waters and have been working on a couple of small projects on an evening as well as off bits of wedding planning here and there and the odd job interview to mix things up a bit leaving very little time to blog. Plus (and I know @garyvee might disagree) there&#8217;s 24, Lost and a whole host of other fine television programming which demand my attention.</p>
<p>I do plan on, and want to write regularly but once a week just doesn&#8217;t seem sustainable for a whole year, life and work will invariably get in the way. I&#8217;d rather take the time to write posts than crack out half-assed ones every week. So I&#8217;m handing in my #p52 membership card and commemorative plate and will be writing when I can from now on.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/03/project52-fail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An analogy for progressive enhancement</title>
		<link>http://coffeepowered.co.uk/2010/02/an-analogy-for-progressive-enhancement/</link>
		<comments>http://coffeepowered.co.uk/2010/02/an-analogy-for-progressive-enhancement/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:07:41 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[analogy]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[sales]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=455</guid>
		<description><![CDATA[As a designer I often have to explain the concept of progressive enhancement and graceful degradation to clients to try and explain why their site doesn&#8217;t look the same in every browser. Selling concepts I endured a misspent youth in retail sales and one of the things I&#8217;m good at is finding the best way [...]]]></description>
			<content:encoded><![CDATA[<p>As a designer I often have to explain the concept of progressive enhancement and graceful degradation to clients to try and explain why their site doesn&#8217;t look the same in every browser.</p>
<h3>Selling concepts</h3>
<p>I endured a misspent youth in retail sales and one of the things I&#8217;m good at is finding the best way to sell things to clients, even if it&#8217;s a concept like progressive enhancement rather than a physical product, the concept can be &#8216;sold&#8217; in a way that the client understands and, more importantly, accepts.</p>
<p>Let&#8217;s start with the definition from Wikipedia:</p>
<blockquote><p>Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic mark-up, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth or more advanced browser software an enhanced version of the page.<br /><cite><a href="http://en.wikipedia.org/wiki/Progressive_enhancement">Wikipedia</a></cite></p></blockquote>
<p>While this is a clear and concise definition it does assume a certain level of knowledge and so isn&#8217;t the most ideal method to explain the concept to clients.</p>
<p>I tend to use analogies to explain a lot of things to people, taking something that may be alien to them, such as the differing capabilities of web browsers, and use something they may be familiar with to explain the point. My favourite analogy uses games consoles as a replacement for web browsers.</p>
<h3>my favourite analogy</h3>
<p>So let’s take a popular sports game, Say &#8216;Tiger Woods Golf&#8217;, this game is available on just about every popular games console on the market such as the Nintendo Wii, Xbox 360 and Playstation 3 as well as handheld consoles such as the Nintendo DS, does the game look the same on each console? Absolutely not! It&#8217;s physically impossible and there&#8217;s a clear and defined difference with games consoles, the &#8216;high-end&#8217; consoles like the 360 and PS3 cost the most, and undoubtedly give the best visual representation of the game, with better textures, realistic faces, perfect trees and water effects but the Nintendo Wii, having less power will have blockier graphics, jagged edges and rougher details like trees and water. The games don&#8217;t look exactly the same, but the most important thing is that &mdash; despite these obvious visual differences &mdash; it doesn&#8217;t stop you playing a round of golf.</p>
<p><img src="http://coffeepowered.co.uk/wp-content/uploads/2010/02/tigerwoodsyall.jpg" /><br />
Image showing the difference between the game on the Wii (left) and the 360 (right)</p>
<p>Every client I&#8217;ve ever explained this to has understood the analogy really well. Nearly all own, or have owned games consoles or have children with them and so can understand that a £300 console might give a better overall experience than a £150 console, even if the game costs the same. The game is designed to take advantage of the increased power available in high end machines, and cut back on certain things on low end machines to make sure that you can still do the core task in the game. Everyone will remember owning an older system when they were younger and wouldn&#8217;t expect their Atari, NES or Master System to be able to cope with the latest video games on the market, but they could still get a game that would let them play a round of golf. Even if the balls are square.</p>
<h3>the &#8216;convincers&#8217;</h3>
<p>There&#8217;s a couple of conscious decisions here which help to &#8216;sell&#8217; the analogy, Firstly: games such as Tiger Woods Golf, Fifa Football or Formula 1 are extremely widespread and mainstream, you can be sure that even if your audience isn&#8217;t familiar with a specific game, they know the sport. You can tailor the analogy on-the-fly with the client also, if you know they&#8217;re a football fan, switch to Fifa Football as your reference.</p>
<p>Secondly: I use a sports game as they&#8217;re the most likely to be ported across all major consoles and contain familiar elements which stay consistent regardless of the platform, such as golf courses, race tracks or sports stadiums. It&#8217;s the graphical detail that is the major difference and this is what we&#8217;re using to compare.</p>
<p>Thirdly: sports games attract huge investment and sponsorship and sell and make millions. This helps to sell the fact that even EA Sports, with their millions of dollars can make a game look the same across every console.</p>
<h3>what about you?</h3>
<p>Do you have a favourite analogy? what do you use to explain certain things to clients? It doesn&#8217;t have to be progressive enhancement, hit up the comment box below and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/02/an-analogy-for-progressive-enhancement/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Using PHP&#8217;s alternate syntaxes</title>
		<link>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/</link>
		<comments>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 08:00:57 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[control structures]]></category>
		<category><![CDATA[elseif]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=348</guid>
		<description><![CDATA[If you&#8217;ve ever worked with PHP you&#8217;ll be more than familiar with the use of if/elseif/else conditional statements, these statements often become large and unweildy, especially when HTML is mixed in with PHP, causing a problems with code readability. There are a couple of alternate ways to write these statements which can improve your code. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever worked with PHP you&#8217;ll be more than familiar with the use of if/elseif/else conditional statements, these statements often become large and unweildy, especially when HTML is mixed in with PHP, causing a problems with code readability. There are a couple of alternate ways to write these statements which can improve your code.</p>
<h3>if..endif syntax</h3>
<p>We&#8217;ll start with a simple example of a &#8216;regular&#8217; statement which includes a foreach and an if statement which is extremely common among PHP scripts.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Result1'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Result2'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Now, just for funzies, let&#8217;s make this a tiny bit more complex and mix in some HTML markup in there for good measure, just like you&#8217;d see in, say, a WordPress template where we&#8217;re jumping back and forth between HTML and PHP mode.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result1&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> &nbsp;<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result2&lt;/p&gt; <br />
<span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>See the closing braces on lines 9 &#038; 10? With a relatively small example like this you can scan back through the code to see wether they close the if or the elseif. Now imagine a much larger statement, the only way to find out what the closing brace actually closes is to either pay attention to the tab levels (providing the tab levels have been maintained properly), or to read back through the whole statement and match them up. There is an alternate syntax which makes life a little easier. </p>
<h4>Alternate syntax</h4>
<p>By using the alternate if..elseif syntax we can replace those closing braces with something a little more useful.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result1&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> &nbsp;<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result2&lt;/p&gt; <br />
<span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>This alternate syntax is expecially useful when mixing PHP and HTML and works for <strong>if/while/for</strong> control structures.</p>
<h3>Ternary operator</h3>
<p>For simple evaluations you can use the ternary operator which is a slimline version of an if/else statement, for example, the following statement which pluralises a string based on an integer variable.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> 1<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'comment'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comments</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h4>Alternate syntax</h4>
<p>Using the ternary operator this can be condensed to a single line:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'comment'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comments</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h3>Have a try!</h3>
<p>By learning and adopting these alternate syntaxes you will ensure that your code remains readable and maintainable, especially if you&#8217;re writing code to be used by other people. Give them a try!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Redesigning Coffeepowered</title>
		<link>http://coffeepowered.co.uk/2010/01/redesign/</link>
		<comments>http://coffeepowered.co.uk/2010/01/redesign/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 09:29:34 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[coffeepowered]]></category>
		<category><![CDATA[moleskine]]></category>
		<category><![CDATA[sketches]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=261</guid>
		<description><![CDATA[Regular readers may have noticed that things look a little different around here! I achieved one of my pet project goals for 2010 by redesigning coffeepowered from the ground up. I thought I&#8217;d write a little about the design process I went through and how the design evolved from the wildly different vision I had [...]]]></description>
			<content:encoded><![CDATA[<p>Regular readers may have noticed that things look a little different around here! I achieved one of my pet project goals for 2010 by redesigning coffeepowered from the ground up. I thought I&#8217;d write a little about the design process I went through and how the design evolved from the wildly different vision I had in mind when I started.</p>
<h3>Why redesign?</h3>
<p>I first registered the coffeepowered.co.uk domain in 2007 and over time my use of the site has changed. In 2007 it served as a freelance identity with a basic online portfolio, then in 2008/2009 I scaled back the freelance angle of the site and used it as a landing page which linked off to my various and disparate identies around the web. While I still like that approach I felt that I needed to build the site back up to be my main online identity and as well as injecting some life into my previously feeble attempts at blogging. I will also be working on a new portfolio in the near future to highlight some of the projects I&#8217;ve been involved with recently (which can be currently seen on my CV).</p>
<h3>Sketching concepts</h3>
<p><a href="http://www.flickr.com/photos/paulstanton/4272007865/in/set-72157623204747478/" class="image_left"><img src="http://farm5.static.flickr.com/4070/4272007865_109f1aef79_m.jpg" /></a></p>
<p>Before any photoshop layers were created or lines of code were written I sharpened my pencil and went to work in my <a href="http://www.flickr.com/photos/paulstanton/4276186271/">Stuff and Nonsense Moleskine</a>, I started with some basic wireframe sketches which roughly blocked out areas of content for the homepage and a couple of inside pages.</p>
<p>I had a clear idea in my mind at this stage which involved using the same leather texture I had previously in the header of the site as I loved the embossed text and stitching, as you can probably tell at this point the design ended up taking a vastly different direction during my design process so I&#8217;ll probably keep the leather and stitching for another design in the future.</p>
<p><a href="http://www.flickr.com/photos/paulstanton/4272751280/in/set-72157623204747478/"  class="image_right"><img src="http://farm3.static.flickr.com/2757/4272751280_11693f62f3_m.jpg" /></a></p>
<p>After the wireframes I started sketching some individual elements which I wanted to implement, one of those which persisted throughout the design was the &#8216;Macbook Mission&#8217; thermometer graph. As I&#8217;m saving for a new Macbook I wanted to have a bit of fun with the situation and have an old-school fundraising thermometer like we used to always have on T.V. when I was a kid. Immediately the idea of working in the Apple logo into the thermometer came to me and a couple of pencil strokes later, I knew that I had to use it!</p>
<p><a href="http://www.flickr.com/photos/paulstanton/4272751798/in/set-72157623204747478/" class="image_center"><img src="http://farm5.static.flickr.com/4030/4272751798_cbc405e5e1_b.jpg"></a></p>
<h3>Designing in the browser</h3>
<p><a href="http://www.flickr.com/photos/paulstanton/4276523896/" class="image_left"><img src="http://farm5.static.flickr.com/4055/4276523896_387bffba32_m.jpg" /></a></p>
<p>While I do the majority of my design these days in the browser, I did fire up Photoshop at this stage to throw together some visuals for the main page frame and to draw the Macbook Mission thermometer to see how it looked.</p>
<p>After coming to a layout which I was generally happy with, I moved into the browser as quickly as possible and started building the design concepts as a custom WordPress theme, styling and laying out the main blog elements according to the baseline and vertical grid that I&#8217;d worked out in Photoshop.</p>
<p>I wanted to experiment with font embedding on this project and during my daily browsing I&#8217;d spotted the wonderful <a href="http://new.myfonts.com/fonts/typodermic/tandelle/">Tandelle</a> font which I wanted to implement. As this font was available on <a href="http://typekit.com/">Typekit</a> I was able to quickly and easily bring it into the design, initially within the blog comments section and loved the aesthetic immediately however Tandealle really didn&#8217;t work with the leather/elegant look I had previously been working with. I did initially play with Typekit to include this font but during the build I opted to take the opportunity to play with &#8216;proper&#8217; @font-face embedding seeing as the font family was only $13.95 from <a href="http://myfonts.com">myfonts.com</a></p>
<p><a href="http://www.flickr.com/photos/racecarphotos/899737778/" class="image_center"><img src="http://farm5.static.flickr.com/4031/4275799399_9c1de4c2e7_o.jpg"></a></p>
<blockquote><p>&ldquo;the font reminded me of the numbers painted on the side of racing cars &mdash; to which I pay a minor homage in my blog comments bubble&rdquo;</p></blockquote>
<p>I sat for quite a while staring at Tandelle and having my mind swim with vintage race car imagery, the font reminded me of the numbers painted on the side of racing cars &mdash; which I pay a minor homage in my blog comments bubble &mdash; and this was the major turning point in the design. After spending a while flicking through vintage racing car photography I took away a couple of simple visual cues which I wanted to focus on.</p>
<ul>
<li><strong>use of uppercase, large fonts</strong></li>
<li><strong>faded, predominantely one-colour-on-white colour pallette</strong></li>
<li><strong>horizontal striping</strong></li>
</ul>
<p><a href="http://www.flickr.com/photos/paulstanton/4272014053/" class="image_left"><img src="http://farm3.static.flickr.com/2693/4272014053_157138ec17_m.jpg" /></a></p>
<p>I kept the layout I&#8217;d wireframed initially and started to tweak the look and feel based around the new direction, redesigning the header section based on the typography and style I&#8217;d been researching and ended up very happy with the result, I brought in a paper texture to give the background some depth and to extend the muted colour theme around the site itself and set about re-theming some of the other elements.</p>
<p>I&#8217;d never been happy with the original &#8216;ribbon&#8217; type navigation but in keeping with the very vague &#8216;vintage race car&#8217; aesthetic I worked in a flag type motif which seemed to work quite well. I tried to keep the elments of my inspiration quite abstract even though in my own mind I had quite a strong source of inspiration, I didn&#8217;t want to over-do the theme.</p>
<p><a href="http://www.flickr.com/photos/paulstanton/4272755868/" class="image_right"><img src="http://farm3.static.flickr.com/2668/4272755868_1106b1e80d_m.jpg" /></a></p>
<p>Overall I felt that by doing the vast majority of my design work on paper and in the browser &mdash; avoiding Photoshop where possible &mdash; enabled me to very quickly change design direction and experiment with a completely different design aesthetic quickly and easily. I&#8217;ll definately be relying on my sketchbook more as a major tool when designing new sites as it seemed to bring back a skill I&#8217;d forgotten I have. During my academic life I had an interest in automotive engineering and was involved in building an electric racing car and petrol powered go-kart from scratch. This involved a significant amount of technical drawing which I quite enjoyed and I felt come back naturally as I worked with my mechanical pencil, pigment liners and french curves. I might have to try and find my old technical drawing portfolio to use it in a future design, I wonder if exploded diagrams of axles and gear assemblies might be good inspiration.</p>
<blockquote><p>&ldquo;Overall, I felt that by doing the vast majority of my design work on paper and in the browser &mdash; avoiding Photoshop where possible &mdash; enabled me to change design direction very fast and experiment with a completely different design aesthetic quickly and easily.&rdquo;</p></blockquote>
<h3>Degrading gracefully</h3>
<div class="image_right"><img src="http://coffeepowered.co.uk/wp-content/uploads/2010/01/coffee_fontsize.jpg"></div>
<p>One of the issues with using the Tandelle font arose in situations where the browser didn&#8217;t support @font-face. I&#8217;m using Tandelle for headings and navigation items and based on my 18px typographic baseline, the elements using Tandelle are set to 4em. For browsers not supporting @font-face the font stack falls back to Helvetica Neue and eventually Arial. This is fine for the x-height of all the fonts but far to large for the character width as Tandelle is a far narrower font than either Helvetica or Arial.</p>
<p>I used the <a href="http://www.modernizr.com/">modernizr</a> script to allow me to test if the browser was capable of supporting @font-face, if so then the headings were set to 4em, if not then they were set to a more sensible 2em. There were also other minor positioning rules which differed for each situation so modernizr allowed me to test the capabilities of the browser and deliver a slightly tweaked design to suit.</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">h2 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'Tandelle Regular'</span><span style="color: #00AA00;">,</span> HelveticaNeue<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">'Helvetica Neue'</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0 0 <span style="color: #933;">0.25em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #6666ff;">.fontface</span> h2 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">4em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<h3>What&#8217;s next?</h3>
<p><a href="http://www.flickr.com/photos/paulstanton/4272758702/" class="image_left"><img src="http://farm3.static.flickr.com/2747/4272758702_0e057caa94_m.jpg" /></a></p>
<p>There&#8217;s still lots to do on the site such as the portfolio and contact section, and I&#8217;ve had a couple of ideas on how to develop the footer a bit further, all in all I&#8217;m extremely happy with it and I hope I&#8217;ll be sticking with this design for a while. What do you think? Hit up the comment box below! If you&#8217;d like to see more of the sketches that I did during this design you can <a href="http://www.flickr.com/photos/paulstanton/sets/72157623204747478/">take a look at the set on Flickr</a> and <strong>if you take pity on me, you could dontate to my Macbook Mission!</strong> (details at the top of this page) <img src='http://coffeepowered.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/redesign/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Nurturing my pet projects</title>
		<link>http://coffeepowered.co.uk/2010/01/nurturing-my-pet-projects/</link>
		<comments>http://coffeepowered.co.uk/2010/01/nurturing-my-pet-projects/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 10:36:57 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[pet projects]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=210</guid>
		<description><![CDATA[I&#8217;ve been dabbling in web design and development for 10 years now, and for as long as I can remember I&#8217;ve had one or more pet projects on the go. At the start of the year I decided that I&#8217;d like to devote some more of my personal time to these pet projects, whether that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been dabbling in web design and development for 10 years now, and for as long as I can remember I&#8217;ve had one or more pet projects on the go. At the start of the year I decided that I&#8217;d like to devote some more of my personal time to these pet projects, whether that means playing with some of the newest toys like HTML5 and CSS3, or simply finishing writing some long-neglected functionality to improve the project as a whole.</p>
<p>I sometimes struggle with the common problem of finding time to devote to pet projects, making sure I don&#8217;t neglect my day-job or my fiancée and while some people may advocate working until the early hours of the morning, it&#8217;s not an option for everyone (and I like my sleep), but as Elliot said recently: &#8220;<a href="http://24ways.org/2009/a-pet-project-is-for-life-not-just-for-christmas">A pet project is for life, not just for Christmas</a></p>
<p>So, for my second <a href="http://project52.info/">#p52</a> blog, I thought I&#8217;d write a little about the pet projects I currently have on the go and list some of the immediate goals for each which I hope to achieve in the next few weeks. I decided to cut some straggling projects loose and concentrate on two, for now.</p>
<h3><a href="http://coffeepowered.co.uk">coffeepowered.co.uk</a></h3>
<p>I&#8217;m in the middle of a complete redesign of my personal site &mdash; including this blog &mdash; in an effort to consolidate some of the contrasting elements I have here &#038; there. The new site will have a portfolio section which features some of my work in a more detailed way than on my CV.</p>
<h4>Goals for Jan/Feb</h4>
<ul>
<li>Complete and release the new design</li>
<li>Continue with Project52</li>
</ul>
<h3><a href="http://homeofmuppets.com">homeofmuppets.com</a></h3>
<p>This is my long-term pet project. Created in 2001 this site revolves around a small group of friends from various parts of the world and still chugs along despite the rise of social networking sites over the past few years, albeit in a stripped-down form. Last year I started a rebuild of the codebase in the CakePHP framework, and it&#8217;s still missing some core functionality.</p>
<h4>Goals for Jan/Feb</h4>
<ul>
<li>Implement OAuth based user login/registration</li>
<li>Finish the design rollout</li>
</ul>
<h3>What about you?</h3>
<p>Are you nurturing any pet projects? What techniques do you use to make sure you&#8217;re devoting enough time to them and not neglecting them? Hit the comment box below and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/nurturing-my-pet-projects/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CSS coding standards</title>
		<link>http://coffeepowered.co.uk/2010/01/css-coding-standards/</link>
		<comments>http://coffeepowered.co.uk/2010/01/css-coding-standards/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 20:04:58 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[maintainable css]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=182</guid>
		<description><![CDATA[Well, it&#8217;s now 2010 and as usual, January brings with it many self-made promises and resolutions, one of mine is to write more, even if it&#8217;s just quick tips &#038; tricks rather than lengthy diatribes which I always want to write, but never seem to find the time. During the back end of last year [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s now 2010 and as usual, January brings with it many self-made promises and resolutions, one of mine is to write more, even if it&#8217;s just quick tips &#038; tricks rather than lengthy diatribes which I always want to write, but never seem to find the time.</p>
<p>During the back end of last year I started to experiment with one of the more boring aspects of CSS, but one of the most rewarding in the long-term: How I actually write, organise and maintain my CSS files. These are relatively minor tweaks, but I thought I&#8217;d share them in case anyone finds them useful.</p>
<p>I&#8217;d just like to note that these are my personal preferences, you may disagree entirely with the way I do things and that&#8217;s fine, feel free to drop a comment below if you&#8217;d like!</p>
<h3>Single vs. Multi-line</h3>
<p>So lets get this out of the way, I hate single line CSS rules, they&#8217;re a pain-in-the-ass to navigate and can cause problems with some source control tools which may only tell you which line has changed and not which property has changed specifically or when running your code through the validator and getting errors which refer to specific line numbers as well as times when you might not have syntax highlighting to help you quickly visually identify properties and values (such as viewing CSS in Firebug).</p>
<p>I&#8217;ve never written my CSS rules as single-line and I doubt I&#8217;ll ever start.</p>
<h3>Ordering of declarations</h3>
<p>One of my most common bugbears is with the ordering of declarations, a lot of the CSS files I come across in my &#8216;day job&#8217; are simply not ordered in any meaningful way, some have a semblance of ordering based on the personal preferences of the designer and may have width &#038; height rules together, floats and positions together for example, this always differs from designer to designer.</p>
<p>The best way to order declarations is alphabetically, it makes it far easier to scan through and visually locate a specific declaration, especially in large rules. Also, for teams of multiple designers it&#8217;s far easier to add declarations to an existing rule as they simply slot in alphabetically.</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ul<span style="color: #cc00cc;">#nav_primary</span> li a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span>0 <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p></p>
<h3>Curly braces</h3>
<p>This might be one of those decisions where people think &#8220;Does that *really* matter?&#8221;, but I&#8217;ve started to place my closing brace on the same line as the last declaration. The reason behind this is to improve the visual distinction between rules which helps when scanning quickly through a large CSS document.</p>
<p>Previously, I&#8217;d place the closing brace on it&#8217;s own line, like this:</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">h1 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0 0 <span style="color: #933;">18px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #00AA00;">&#125;</span><br />
h2 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.333em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #00AA00;">&#125;</span><br />
h3 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.1667em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>
Now that the brace follows the last declaration it improves the spacing between rules, or course I could simply add another line after each rule, but that simply adds to the filesize and needlessly pads out the document. This method also places all of the selectors on their own tab level which helps when scanning through to locate a selector.</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">h1 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0 0 <span style="color: #933;">18px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
<br />
h2 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.333em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
<br />
h3 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.1667em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p></p>
<h3>Closing semi-colon</h3>
<p>The closing semi-colon on the last declaration of a CSS rule is optional, while some people will no-doubt argue that dropping this will lead to smaller filesizes I&#8217;d always argue that long-term maintainability is more important, especially on larger projects with multiple developers or for projects which are handed to clients to maintain themselves.</p>
<p>By keeping the closing semi-colon in place anyone can quickly dive into the file and add rules without needing to worry about where the semi-colons are.</p>
<h3>Further reading</h3>
<p>I&#8217;ve only skimmed the surface of CSS coding standards to highlight some of the ways I like to do things, If you&#8217;re interested in making your CSS more readable, and especially more maintainable then I&#8217;d highly recommend you read the PDF version of this BarCamp presentation by Natalie Downe on <a href="http://natbat.net/2008/Sep/28/css-systems/">&#8220;CSS Systems for writing maintainable CSS&#8221;</a> which is a must-read and chock-full of excellent advice.</p>
<h3>What do you do?</h3>
<p>Do you have any personal preferences when it comes to writing your CSS? Feel free to hit the comment box below and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/css-coding-standards/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>
