<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Alistair Robinson, Web Development &amp;c</title>
	
	<link>http://alistairrobinson.co.uk</link>
	<description />
	<lastBuildDate>Mon, 02 Aug 2010 18:22:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/alistairrobinson" /><feedburner:info uri="alistairrobinson" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Back to Music</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/SD1bMixY4YM/</link>
		<comments>http://alistairrobinson.co.uk/back-to-music/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 02:37:49 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[music]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[mouthpiece]]></category>
		<category><![CDATA[practice]]></category>
		<category><![CDATA[practise]]></category>
		<category><![CDATA[sax]]></category>
		<category><![CDATA[saxophone]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=977</guid>
		<description><![CDATA[I&#8217;ve taken up saxophone practise again after a break of six or seven months. Giving up was precipitated by getting a new mouthpiece that turned out to be very hard to play. I could only play for a few minutes before my lip collapsed, my tone became uneven in the upper register, and my intonation [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve taken up saxophone practise again after a break of six or seven months. Giving up was precipitated by getting a new mouthpiece that turned out to be very hard to play. I could only play for a few minutes before my lip collapsed, my tone became uneven in the upper register, and my intonation went all over the place. I knew it was a good mouthpiece, not because the brand had a great reputation, and not because I&#8217;d read somewhere that it was good, and not because it was expensive; I knew it was good because it just sounded amazing, made playing across the break easy, and sounded evenly throughout the registers. For the first few minutes, that is. After that, I was beaten.</p>
<p>At the time, the obvious conclusion was that I was crap. I had struggled intensively for two years (after a few years of half-hearted and infrequent practise) and imagined I had become quite good, and suddenly my unquestionably good quality new mouthpiece (and my newly-purchased tuner) had revealed that it was all an illusion. I would have to go back to square one.</p>
<p>At the same time I was really getting into web development, revelling in the freedom of working from home, discovering new techniques and technologies like I never had done when I was doing it as a nine-to-five job. The saxophone just fell by the wayside.</p>
<h3>Creative Tentacles</h3>
<p>Emerging from a fairly large project recently my creative tentacles began to reach outwards again, feeling for a juicy challenge. I&#8217;ve said many times that my life lurches from one exclusive obsession to another, and it was at this time, just a few weeks ago, that I began to be conscious of this lack of balance. I remain enthusiastic about the web development, but it is less obsessive, and I&#8217;ve found room for the saxophone once again.</p>
<p>I went to a teacher to see if he could help me out, and I practised hard, sounding terrible most of the time. This was heartbreaking, so when I came upon my old mouthpiece one day while I was looking for something else I thought, hell, why not give it a go? As soon as I began playing, it was as if my talent had suddenly been handed back to me. I&#8217;ve been practising with this, the old, mouthpiece now for a week or so and I&#8217;m actually <em>enjoying</em> practise again. I sound good, and I can play tunes, and <em>scales are pleasurable</em>.</p>
<p>Even if my embouchure is generally lacking &#8211; in that it&#8217;s only fit for a particular kind of narrow jazz-style mouthpiece &#8211; I&#8217;m happy. I can live with that (for the time being at least).</p>
<h3>Disposition</h3>
<p>What to make of this experience? It&#8217;s the kind of thing that could easily get me down: <em>half a year of musical progress down the drain!</em> Six months of progress on an instrument, if you&#8217;re practising every day, is hugely valuable.</p>
<p>But I don&#8217;t feel depressed. I&#8217;m looking for the positives. I listen to my playing and I realize I&#8217;m paying more attention to the intonation. I struggled to keep my throat open when I was fighting with the fancy new mouthpiece, and this has helped me generally.</p>
<p>But really what it comes down to is that if you choose to view a period in your life as a good, useful experience, then it <em>becomes</em> a good, useful experience.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/SD1bMixY4YM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/back-to-music/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/back-to-music/</feedburner:origLink></item>
		<item>
		<title>Irritation in Waterstone’s</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/kL70PTzRjEg/</link>
		<comments>http://alistairrobinson.co.uk/irritation-in-waterstones/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 14:30:33 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[places]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[irritation]]></category>
		<category><![CDATA[waterstones]]></category>
		<category><![CDATA[whispering]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=975</guid>
		<description><![CDATA[I have to say to begin with that despite initial appearances this is not a grumpy old man piece. At least, it&#8217;s not exactly my intention to voice petty gripes just for the sake of voicing them.
I was in the basement of Waterstone&#8217;s at the west end of Princes Street. Three young members of staff, [...]]]></description>
			<content:encoded><![CDATA[<p>I have to say to begin with that despite initial appearances this is not a grumpy old man piece. At least, it&#8217;s not exactly my intention to voice petty gripes just for the sake of voicing them.</p>
<p>I was in the basement of Waterstone&#8217;s at the west end of Princes Street. Three young members of staff, one female and two male, were talking loudly. The males were teasing the woman in a deliberately petty, repetitive fashion. I was quite distracted by this incessant stupid chatter, and although I was in a public place and we can&#8217;t expect the silence of a library in a high street shop, I was irritated. I think I was justified:</p>
<p>1. Different standards and conventions &#8211; loose codes of conduct &#8211; apply on different floors of a bookshop. We do expect a quieter, more peaceful atmosphere on floors other than the ground floor.</p>
<p>2. There are chairs on these floors so that you can sit and read. In general, the shop itself creates the peaceful ambience or the expectation of it.</p>
<p>3. I&#8217;ve been in this particular Waterstone&#8217;s many times and the basement is normally very quiet and peaceful. This is probably one reason for my frequent visits.</p>
<p>4. On this occasion, there was no other sound in the room, so their loudness was unnecessary, uncivil and discourteous.</p>
<p>5. This loudness was just one aspect of their swaggering manner, in which they showed a disregard for the customers, acting as if we were not there and as if the whole room belonged to them. This was manifest in their movements and bearing, the way they would talk across the full width of the room even if there were people in between, and so on.</p>
<p>In any case, I was irritated. I was trying to choose between two books based on what I could gather from their prefaces about the standard of knowledge required to read them. The unpredictable monkey-like noises of the staff &#8211; interspersed with their occasional macaw-like screeches &#8211; made it difficult to concentrate.</p>
<h3>Transformation</h3>
<p>But then something unexpected happened. There was suddenly a new noise: <em>whispering</em>, between two customers, a middle-aged man and woman, who must have just come down the stairs. That someone should think it suitable to whisper was absurd enough, given that the staff continued to dribble out their inanities for everyone to hear; but, worse than that, the whispering was <em>loud</em>, considerably louder than most normal speech. I don&#8217;t have proof of it, but I&#8217;d guess that if they had talked at a normal, quiet volume, I would hardly have noticed them.</p>
<p>If you&#8217;ve never heard loud whispering, let me tell you: it&#8217;s bloody irritating. I think this is partly because it&#8217;s so stupid, more than because of the intrinsic qualities of the sound.</p>
<p>Anyway, there I was, trying to read a preface to a book on mathematics, my ears buffeted by irregular waves of jungle-like cacophony coming from the staff and scoured by the rasping voiceless speech of the whisperers; and I wasn&#8217;t irritated any more. I just smiled.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/kL70PTzRjEg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/irritation-in-waterstones/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/irritation-in-waterstones/</feedburner:origLink></item>
		<item>
		<title>An Epic Search For an Epic Search For Truth</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/1-jsb4y93Dk/</link>
		<comments>http://alistairrobinson.co.uk/an-epic-search-for-an-epic-search-for-truth/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 22:06:19 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=974</guid>
		<description><![CDATA[
Logicomix, An Epic Search For Truth
By Apostolos Doxiadis, Christos Papadimitriou, Alecos Papadatos and Annie Di Donna
I have enjoyed comics since I was a child, when, fascinated and entranced by Hergé&#8217;s Adventures of Tintin, I argued heatedly with my friends, who all preferred Asterix.
I still read Tintin occasionally, and I enjoy more consciously grown-up graphic novels, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://static.jamalrob.webfactional.com/critique/content/logicomix_cover.jpg" alt="Logicomix cover" /></p>
<p><strong><em>Logicomix, An Epic Search For Truth</em></strong><br />
By Apostolos Doxiadis, Christos Papadimitriou, Alecos Papadatos and Annie Di Donna</p>
<p>I have enjoyed comics since I was a child, when, fascinated and entranced by Hergé&#8217;s Adventures of Tintin, I argued heatedly with my friends, who all preferred Asterix.</p>
<p>I still read Tintin occasionally, and I enjoy more consciously grown-up graphic novels, but I never thought I’d be treated to a comic-book account of Bertrand Russell’s quest to establish the foundations of mathematics. The idea of such a book is incredible, yet here it is, a story told passionately and illustrated beautifully, which does justice to the men and their ideas. And they’re all in here: Frege, Hilbert, Cantor, Gödel and Wittgenstein&#8230;.</p>
<p><a href="http://critique-of-pure-reason.com/an-epic-search-for-an-epic-search-for-truth/">Read the rest on my philsophy blog, critique-of-pure-reason.com &raquo;</a></p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/1-jsb4y93Dk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/an-epic-search-for-an-epic-search-for-truth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/an-epic-search-for-an-epic-search-for-truth/</feedburner:origLink></item>
		<item>
		<title>Certainly Not My Kind of Book</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/PyDrGZEVplE/</link>
		<comments>http://alistairrobinson.co.uk/certainly-not-my-kind-of-book/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 15:14:54 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[roger scruton]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=969</guid>
		<description><![CDATA[Oddly for someone whose political affiliations have always lain in the left tradition, I&#8217;m more and more fascinated by, and attracted to, the philosophy of Roger Scruton, who is a conservative. I find his manner of setting forth arguments &#8211; both in writing and on television &#8211; to be irresistible. It&#8217;s somehow both gentle and [...]]]></description>
			<content:encoded><![CDATA[<p>Oddly for someone whose political affiliations have always lain in the left tradition, I&#8217;m more and more fascinated by, and attracted to, the philosophy of <a href="http://en.wikipedia.org/wiki/Roger_Scruton">Roger Scruton</a>, who is a conservative. I find his manner of setting forth arguments &#8211; both in <a href="http://www.amazon.co.uk/Modern-Philosophy-Introduction-Roger-Scruton/dp/1844131068/">writing</a> and on <a href="http://www.youtube.com/watch?v=65YpzZrwKI4">television</a> &#8211; to be irresistible. It&#8217;s somehow both gentle and passionate. But it&#8217;s more than that: I really do agree with many of his ideas.</p>
<p>Anyway, I was looking at <a href="http://www.amazon.co.uk/Roger-Scruton-Philosopher-Dover-Beach/dp/1847060137/">Mark Dooley&#8217;s biography</a> of Scruton on Amazon and noticed this 5-star review:</p>
<blockquote><p>This certainly is not my kind of book. It is a Christmas present for which I was asked so clearly it IS the kind of book enjoyed by the person who asked for it.</p></blockquote>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/PyDrGZEVplE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/certainly-not-my-kind-of-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/certainly-not-my-kind-of-book/</feedburner:origLink></item>
		<item>
		<title>CSS Abstracted: Update</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/FdR9jpvwoaU/</link>
		<comments>http://alistairrobinson.co.uk/css-abstracted-update/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 22:13:33 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[compilers]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[pre-processor]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sass]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=930</guid>
		<description><![CDATA[In a recent post I described my first foray into&#8230;well now, what am I supposed to call them? CSS frameworks? No, that doesn&#8217;t work, because Blueprint and YUI and 960 and others are often described as such. CSS meta-frameworks? That appeals to me, but it&#8217;s rather obscure. CSS compilers? Yes, perhaps.
But wait. There are CSS [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://alistairrobinson.co.uk/css-abstracted/">recent post</a> I described my first foray into&#8230;well now, what am I supposed to call them? CSS frameworks? No, that doesn&#8217;t work, because Blueprint and YUI and 960 and others are often described as such. CSS meta-frameworks? That appeals to me, but it&#8217;s rather obscure. CSS compilers? Yes, perhaps.</p>
<p>But wait. There are CSS compilers, and then there are the libraries and frameworks and plugins that are built around them. Well, I guess that&#8217;s where the term &#8220;meta-framework&#8221; comes in.</p>
<p>One such meta-framework is <a href="http://compass-style.org/docs/">Compass</a>, which is built around the core language and compiler <a href="http://sass-lang.com/">Sass</a>. I mentioned Compass briefly in my other post. At the time, I had dismissed it as being more than I required, or more than I wanted to get into, but in the end I realized if I was going down this route at all I might as well do it right &#8211; and Compass does it right. It seems by far the most thorough, mature solution I&#8217;ve found, with a good heritage and a lot of success.</p>
<p>So that&#8217;s what I&#8217;ve settled on using now. There might be some kind of tighter integration achievable if you&#8217;re using Rails, but what I&#8217;m doing is using it to generate CSS as I locally develop a site in Wordpress, and the same for a site built on the <a href="http://get-simple.info/">GetSimple</a> CMS, and a Django project as well. You can use it with anything, and when you come to deploy it you can exclude all the Compass stuff, leaving no trace of it on the live site, except perhaps in the tell-tale auto-generated layout of the CSS code.</p>
<p>Your best bet is probably to go read the excellent <a href="http://compass-style.org/docs/">documentation</a>, but here&#8217;s some basic stuff from my own experiences&#8230;</p>
<p>Initial steps:</p>
<p>1. <a href="http://www.ruby-lang.org/en/downloads/">Install Ruby</a><br />
2. <a href="http://docs.rubygems.org/read/chapter/3">Install Ruby Gems</a><br />
(if you&#8217;re on a Mac you may have these already. I guess you could find out by carrying out the next step)</p>
<p>3. Install Compass from the command line:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&gt; gem install compass</div></div>
<p>With these installed, whenever I begin a project I set up Compass in the theme or template directory by running the following command inside that directory:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&gt; compass create --syntax sass</div></div>
<p>There are loads more options for the create command (See the <a href="http://compass-style.org/docs/">documentation</a>). Note also I&#8217;m using the SASS syntax, because I prefer it. There are two choices, and projects default to SCSS. See <a href="http://sass-lang.com/">here</a> for more information on the differences.</p>
<p>Incidentally, it&#8217;s interesting that SCSS is now the default syntax for Sass (confusingly, the name of the language/compiler is also the name of one of its two syntaxes). The SCSS syntax looks just like CSS itself, and the idea is to lessen the unfamiliarity for designers who are already very skilled in CSS. After all, there&#8217;s no reason in principle why they should have to learn a new syntax in order to take advantage of the power of Sass and Compass, which is independent of the syntax, and independently valuable.</p>
<p>However, I&#8217;m sticking with the SASS syntax, because I find it neater and easier to write, and I don&#8217;t mind admitting that it&#8217;s simply a welcome novelty.</p>
<p>That create command creates a configuration file, <strong>config.rb</strong>, and three directories, most important of which are <strong>src</strong> and <strong>stylesheets</strong>. <strong>src</strong> is the where you write the code, and <strong>stylesheets</strong> contains the generated CSS.</p>
<p>The last essential piece of the puzzle is how the CSS is generated when you&#8217;re developing. All you need to do is run the following command in the directory in which you set up Compass:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&gt; compass watch</div></div>
<p>This runs in the background and watches for changes, then re-generates the CSS when it finds them.</p>
<h3>Getting ready to code</h3>
<p>I&#8217;m currently working with a config.rb that looks like this:</p>
<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'ninesixty'</span><br />
<span style="color:#008000; font-style:italic;"># Require any additional compass plugins here.</span><br />
<br />
project_type = <span style="color:#ff3333; font-weight:bold;">:stand_alone</span><br />
<span style="color:#008000; font-style:italic;"># Set this to the root of your project when deployed:</span><br />
http_path = <span style="color:#996600;">&quot;/&quot;</span><br />
css_dir = <span style="color:#996600;">&quot;stylesheets&quot;</span><br />
sass_dir = <span style="color:#996600;">&quot;src&quot;</span><br />
images_dir = <span style="color:#996600;">&quot;/images&quot;</span><br />
output_style = <span style="color:#ff3333; font-weight:bold;">:compact</span><br />
line_comments = <span style="color:#0000FF; font-weight:bold;">false</span><br />
<span style="color:#008000; font-style:italic;"># To enable relative paths to assets via compass helper functions. Uncomment:</span><br />
relative_assets = <span style="color:#0000FF; font-weight:bold;">true</span></div></div>
<p>It&#8217;s good when starting out to use a _base.sass &#8220;partial&#8221; to set up your variables and imports. Mine looks like this:</p>
<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@import</span> compass<span style="color:#006600; font-weight:bold;">/</span>reset<br />
<span style="color:#0066ff; font-weight:bold;">@import</span> compass<span style="color:#006600; font-weight:bold;">/</span>utilities<br />
<span style="color:#0066ff; font-weight:bold;">@import</span> <span style="color:#006666;">960</span><span style="color:#006600; font-weight:bold;">/</span>grid<br />
<span style="color:#0066ff; font-weight:bold;">@import</span> compass<span style="color:#006600; font-weight:bold;">/</span>css3<br />
<span style="color:#0066ff; font-weight:bold;">@import</span> my_mixins.<span style="color:#9900CC;">sass</span><br />
<br />
<span style="color:#006600; font-weight:bold;">//</span> VARS<br />
<span style="color:#ff6633; font-weight:bold;">$box_shadow_color</span>: <span style="color:#008000; font-style:italic;">#666</span><br />
<span style="color:#ff6633; font-weight:bold;">$light_grey</span>: <span style="color:#008000; font-style:italic;">#DBD7CA</span><br />
<span style="color:#ff6633; font-weight:bold;">$bg_blue_color</span>: <span style="color:#008000; font-style:italic;">#AFE4E4</span><br />
<span style="color:#ff6633; font-weight:bold;">$bg_pink_color</span>: <span style="color:#008000; font-style:italic;">#FBBBC0</span><br />
<span style="color:#ff6633; font-weight:bold;">$bg_orange_color</span>: <span style="color:#008000; font-style:italic;">#FDBB79</span><br />
<span style="color:#ff6633; font-weight:bold;">$font_family</span>: <span style="color:#996600;">&quot;Georgia&quot;</span>, <span style="color:#996600;">&quot;Times New Roman&quot;</span>, <span style="color:#996600;">&quot;Serif&quot;</span><br />
<br />
<span style="color:#006600; font-weight:bold;">//</span> OVERRIDE DEFAULTS<br />
<span style="color:#ff6633; font-weight:bold;">$default</span><span style="color:#006600; font-weight:bold;">-</span>border<span style="color:#006600; font-weight:bold;">-</span>radius: 3px<br />
<span style="color:#ff6633; font-weight:bold;">$default</span><span style="color:#006600; font-weight:bold;">-</span>text<span style="color:#006600; font-weight:bold;">-</span>shadow<span style="color:#006600; font-weight:bold;">-</span>h<span style="color:#006600; font-weight:bold;">-</span>offset: 0px<br />
<span style="color:#ff6633; font-weight:bold;">$default</span><span style="color:#006600; font-weight:bold;">-</span>text<span style="color:#006600; font-weight:bold;">-</span>shadow<span style="color:#006600; font-weight:bold;">-</span>v<span style="color:#006600; font-weight:bold;">-</span>offset: 0px<br />
<span style="color:#ff6633; font-weight:bold;">$default</span><span style="color:#006600; font-weight:bold;">-</span>text<span style="color:#006600; font-weight:bold;">-</span>shadow<span style="color:#006600; font-weight:bold;">-</span>blur: 5px<br />
<span style="color:#ff6633; font-weight:bold;">$ninesixty_grid_width</span> = 960px<br />
<span style="color:#ff6633; font-weight:bold;">$ninesixty_columns</span> = <span style="color:#006666;">24</span><br />
<br />
<span style="color:#006600; font-weight:bold;">+</span>font<span style="color:#006600; font-weight:bold;">-</span>face<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;Tuesday Regular&quot;</span>, font<span style="color:#006600; font-weight:bold;">-</span>files<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;tuesday-webfont.woff&quot;</span>, woff, <span style="color:#996600;">&quot;tuesday-webfont.ttf&quot;</span>, truetype, <span style="color:#996600;">&quot;tuesday-webfont.svg&quot;</span>, svg<span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#996600;">'tuesday-webfont.eot'</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>See <a href="http://compass-style.org/docs/tutorials/best_practices/">here</a> for more on Compass best practices.</p>
<h3>Mixins</h3>
<p>Notice at the top of the base partial I&#8217;m importing another partial file, <strong>_my_mixins.sass</strong>. Mixins are wonderful: they let you collect together styles and mix them into your stylesheet wherever you like. Compass comes with many of them, but you can also define your own, which is what _my_mixins.sass is for:</p>
<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">=my_hover_link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; text<span style="color:#006600; font-weight:bold;">-</span>decoration: none<br />
&nbsp; <span style="color:#006600; font-weight:bold;">&amp;</span>:hover, <span style="color:#006600; font-weight:bold;">&amp;</span>:focus<br />
&nbsp; &nbsp; text<span style="color:#006600; font-weight:bold;">-</span>decoration: underline<br />
<br />
=my_focus<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">&amp;</span>:focus<br />
&nbsp; &nbsp; outline: dotted 1px <span style="color:#008000; font-style:italic;">#222</span></div></div>
<p>These are used in the actual stylesheet source code (eg. in screen.sass) like this:</p>
<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a<br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>my_hover_link<br />
&nbsp; color: <span style="color:#008000; font-style:italic;">#004379</span></div></div>
<h3>Grids</h3>
<p>I&#8217;m also using the 960 grid system (Compass also comes with Blueprint). With Compass, using a grid system is very nice indeed.</p>
<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;">#wrap</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>grid<span style="color:#006600; font-weight:bold;">-</span>container<br />
<span style="color:#008000; font-style:italic;">#content</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>grid<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span>,<span style="color:#006666;">16</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>alpha<br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>clearfix<br />
<span style="color:#008000; font-style:italic;">#side</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>grid<span style="color:#006600; font-weight:bold;">-</span>prefix<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span>,<span style="color:#006666;">16</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>grid<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">5</span>,<span style="color:#006666;">16</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>omega<br />
&nbsp; <span style="color:#006600; font-weight:bold;">+</span>clearfix</div></div>
<p>One thing that&#8217;s good about this set-up is that you can code using a grid system without using any unsemantic class names like &#8220;prefix_2 grid_8.&#8221; Compass takes care of that when it generates the CSS. Effectively you&#8217;re using the grid as it really should be used, only in design and development. Compass calculates the relevant widths for your semantically-named elements, based on the 960 mixins, and there&#8217;s no underlying skeleton of unsemantic classes left behind in your HTML and CSS.</p>
<p>NOTE: Using +grid-container instead of +grid-system(12) means you don&#8217;t end up with all the 960 grid classes in your style sheet, which won&#8217;t be required because of your use of the mixins.</p>
<p>This is just the basics. There&#8217;s lots of stuff online, but you can&#8217;t do better than the <a href="http://compass-style.org/docs/">Compass documentation</a>, and it&#8217;s worth taking a look at the site of <a href="http://chriseppstein.github.com/">Chris Eppstein</a>, the man we have to thank for it all.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/FdR9jpvwoaU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/css-abstracted-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/css-abstracted-update/</feedburner:origLink></item>
		<item>
		<title>E-commerce for Small Business in The UK: A Starting Point For Web Developers</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/xELeOy9Y90w/</link>
		<comments>http://alistairrobinson.co.uk/e-commerce-in-the-uk-for-web-designers/#comments</comments>
		<pubDate>Sat, 22 May 2010 05:52:32 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[3d secure]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[rbs]]></category>
		<category><![CDATA[shopp]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[worldpay]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=932</guid>
		<description><![CDATA[NOTE: see the comments for updates about how this went in the end.
I think I&#8217;ve unearthed a conspiracy. In the wonderful world of the world-wide web (that&#8217;s WWWWW for short), with so much information available, and so many companies selling online, surely there must be a collection of standard procedures for implementing an online shop, [...]]]></description>
			<content:encoded><![CDATA[<p><em>NOTE: see the comments for updates about how this went in the end.</em></p>
<p>I think I&#8217;ve unearthed a conspiracy. In the wonderful world of the world-wide web (that&#8217;s <span class="caps">WWWWW</span> for short), with so much information available, and so many companies selling online, surely there must be a collection of standard procedures for implementing an online shop, and reliable sources of information covering them? Apparently not. How else to explain this except an evil conspiracy? In particular, an evil conspiracy against web designers and developers.</p>
<p>This post is drawn from an e-mail that I sent to a tech savvy client, a small business owner. The email summarized their options for e-commerce, in the specific context of the UK, and it was the result of some hours of research. Reading it over later I realized it could be useful to web developers, given the aforementioned global conspiracy. It is therefore my duty as a good web citizen to reveal this sacred, jealously guarded information &#8211; despite the dangers.</p>
<p>NOTE: I&#8217;ve called it a starting point, but really this post is just a record of my <em>own</em> starting point, and there&#8217;s a bias here towards Wordpress.</p>
<h3>Introduction</h3>
<p>There is one way of selling online that I won&#8217;t really go into here, which is selling through your regular PayPal account or with Google Checkout. These are pretty good options, because they&#8217;re so easy, but most businesses don&#8217;t want customers being directed away to PayPal or Google when they check out. A more integrated solution is preferable because it gives customers confidence in the professionalism of the business; the business can have direct access to its product, order and customer data within a single system; and you &#8211; the developer &#8211; get more control all round. That&#8217;s what this post is really about, but the shopping cart software mentioned here can work nicely with the simpler PayPal set-up as well.</p>
<p>An online shop that accepts credit cards usually needs these four things:</p>
<ul>
<li>An Internet Merchant Account (<span class="caps">IMA</span>)</li>
<li>A Payment Gateway</li>
<li>Some shopping cart software (including product listings, product pages, a cart and a checkout page)</li>
<li>(in some cases optional) Shop <span class="caps">CMS</span> (admin for shipping rates, product management, inventory, order management, etc.)</li>
</ul>
<p>The shopping cart and <span class="caps">CMS</span> can normally be treated as separate and independent. For the payment gateway and <span class="caps">IMA</span>, I would normally recommend PayPal&#8217;s Website Payments Pro, which bundles these together. But if a substantial portion of your market is in the UK, there&#8217;s a problem:</p>
<h3>Maestro and 3D Secure</h3>
<p>This is where it gets complicated. In fact, it looks to me like the whole thing&#8217;s a bit of a mess.</p>
<p>Mastercard enforces the use of <a href="http://en.wikipedia.org/wiki/3-D_Secure">3D secure</a> to process Maestro payments (and this is becoming very common for payments with the other cards too). All Maestro transactions will be declined if this isn&#8217;t implemented. 3D Secure is an extra step in the checkout process, which allows real-time authentication with the customer&#8217;s bank. It commonly comes in the guise of &#8220;Verified by Visa&#8221; and &#8220;Mastercard SecureCode&#8221;. In some implementations it&#8217;s optional &#8211; the customer can skip it &#8211; because not all cards are required to be authenticated like this, but a Maestro payment just won&#8217;t complete successfully without a 3D secure authentication.</p>
<p><img src="http://alistairrobinson.co.uk/wp-content/uploads/2010/05/3dsecure.jpg" alt="" title="3dsecure" width="397" height="424" class="alignleft size-full wp-image-936" /></p>
<p>Before you go down this route it might be worth weighing up the pros and cons of 3D secure:</p>
<p><strong>Pros</strong></p>
<ul>
<li>Lets you take Maestro payments</li>
<li>Can give customers more confidence in buying stuff online (in theory)</li>
<li>Reduces <a href="http://en.wikipedia.org/wiki/Chargeback">chargebacks</a></li>
<li>It could be that, as people in the UK have become more used to it, they have come to <em>expect</em> it</li>
</ul>
<p>	<strong>Cons</strong></p>
<ul>
<li>Yet another step in the process of checking out – this is known to lead to a reduction of sales</li>
<li>Restricts your options for e-commerce software and payment gateways</li>
<li>From a development point of view, implementing 3D secure can be tricky, depending on the kind of solution you choose</li>
</ul>
<p>With Website Payments Pro, it&#8217;s up to you to set up 3D Secure. Seemingly as an afterthought they recommend using some kind of product from a company called <a href="http://www.cardinalcommerce.com/">Cardinal</a>, but I&#8217;ve no idea what Cardinal actually provide, and their web site is no help. I sent them an enquiry but received nothing in response. This didn&#8217;t give me much confidence, so I looked for some other solution, i.e., a payment gateway that had embraced 3D Secure and knew how to implement it.</p>
<p>Turns out there is one that&#8217;s popular in the UK: <span class="caps">RBS</span> Worldpay. They offer <a href="http://www.rbsworldpay.com/products/index.php?page=ecom&#38;amp;c=UK">three account options</a>, including one that &#8211; like Payments Pro &#8211; bundles together the <span class="caps">IMA</span> and the gateway. The crucial thing is that WorldPay implements 3D Secure.</p>
<h3><span class="caps">RBS</span> WorldPay</h3>
<p>At the time of writing I haven&#8217;t implemented the gateway, so I can&#8217;t say too much about it now. I also won&#8217;t say anything about WorldPay&#8217;s interesting (in the loosest sense) recent history, but you should check it out because it puts things in perspective.</p>
<p>What I&#8217;ve discovered so far is that there are essentially two ways of implementing WorldPay: <a href="http://www.rbsworldpay.com/support/bg/index.php?page=development&#38;amp;sub=integration&#38;amp;c=UK"><span class="caps">HTML</span> redirect</a> (or Hosted Payment Pages, which appears to be the newer name) and <a href="http://www.rbsworldpay.com/support/bg/index.php?page=development&#38;amp;sub=xml"><span class="caps">XML</span> Direct</a>.</p>
<p><span class="caps">HTML</span> Redirect is the easier option. When the user checks out they&#8217;re redirected away to the WorldPay site, where all the hard stuff is taken care of.  You may be familiar with <span class="caps">HTML</span> Redirect from seeing this <strong>beautiful interface</strong>:</p>
<p><img src="http://alistairrobinson.co.uk/wp-content/uploads/2010/05/worldpay.jpg" alt="" title="worldpay" width="500" height="271" class="alignleft size-full wp-image-935" /></p>
<p>Yes, I know: there&#8217;s no way you&#8217;re having this ugliness anywhere near your lovely design. But according to the WorldPay site, you can customize this page, in line with your own design. I don&#8217;t yet know just how customizable it is: looking at what documentation there is (not an easy task in itself), I&#8217;m sceptical how far you can go with it.</p>
<p>I must warn you that browsing the WorldPay site for good information is a painful experience. It has the feel of a collection of documents assembled from disparate sources by a robot with little sympathy for, or understanding of, the requirements of human beings. I suppose this is fairly common with such massive corporate organizations, but it&#8217;s a real shock when you&#8217;ve been used to dealing with small, focused companies with a dedication to openness on the web.</p>
<p>It took a couple of messages to WorldPay technical support to find out that there was another way: <span class="caps">XML</span> Direct. This allows a more complete integration with your site, because all the processing is done in the background, rather than with a redirection. The implications are that you&#8217;ll need to make damn sure you&#8217;ve got a secure system. <span class="caps">RBS</span> have a process for assessing your set-up, and further procedures for testing and activation.</p>
<p>For an alternative to <span class="caps">RBS</span> WorldPay that also supports 3D secure, check out <a href="http://www.sagepay.com/">SagePay</a></p>
<h3><span class="caps">PCI</span> Compliance</h3>
<p>Aside from any particular requirements of your gateway, generally a secure setup is one that is <a href="http://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard"><span class="caps">PCI</span> compliant</a>.</p>
<p>With <span class="caps">HTML</span> Redirect and the hosted solutions (option 1 below), you don&#8217;t need to be <span class="caps">PCI</span> Compliant at all, because you&#8217;re not actually storing credit card numbers on file or in a database. It&#8217;s your payment gateway (eg. WorldPay or Website Payments Pro) or shopping cart service that has to be <span class="caps">PCI</span> compliant. However, your gateway may still require you to pass some level of security-checking.</p>
<p>With <span class="caps">XML</span> Direct, you do need to pass some <span class="caps">PCI</span> Compliance tests, and that&#8217;s a whole other can of worms I&#8217;m not going to open right now, because I&#8217;m still not sure exactly what&#8217;s inside. Worms, yes, but what kind? And do they bite?</p>
<h3>SSL/HTTPS/Encryption</h3>
<p>You might not be storing credit card numbers, but you may need to transmit them securely, in which case you will need to buy an <span class="caps">SSL</span> certificate and have it installed on your web server. Basically, if your checkout page resides on your web server, as part of the site, you will need <span class="caps">SSL</span>. But if it&#8217;s hosted, as it is with WorldPay <span class="caps">HTML</span> Redirect or one of the complete hosted shopping cart solutions (option 1 below), you&#8217;re not transmitting anything sensitive so <span class="caps">SSL</span> is not required.</p>
<h3>Software Option 1: Hosted</h3>
<p>Examples: <a href="http://www.ecwid.com">Ecwid</a>, <a href="http://www.foxycart.com/">Foxycart</a>, <a href="http://www.shopify.com">Shopify</a></p>
<p>With hosted e-commerce, you sign up to a service that provides a cart and checkout process, all hosted on their servers. General shop settings &#8211; shipping, taxes, coupons and product types &#8211; are all administered on their site.</p>
<p>The big advantage is that they they&#8217;re the ones who need to have the <span class="caps">SSL</span> encryption and security, and they wrap up the whole checkout process very nicely, so there&#8217;s not much in that area you have to worry about.</p>
<p>I&#8217;ve set up a shop with FoxyCart and <a href="http://modxcms.com/">MODx</a>, and while there&#8217;s a lot of work to be done if you need product management built into your <span class="caps">CMS</span>, setting up the customized cart and checkout pages is a breeze.</p>
<ul>
<li>They handle <span class="caps">SSL</span> and <span class="caps">PCI</span> compliance</li>
<li>No 3D secure/Maestro (because they&#8217;re responsible for implementing it and Ecwid, Foxycart and Shopify haven&#8217;t done so yet, although they&#8217;re working on it)</li>
<li>Your data is on their servers</li>
<li>Separate place to manage shop (ie. separate from the rest of the website)</li>
</ul>
<p><strong>Ecwid</strong> (Free)</p>
<ul>
<li>Very fast, very easy, and very tempting</li>
<li>But no <span class="caps">API</span> and not very configurable</li>
<li>Depends on JavaScript</li>
</ul>
<p><strong>Foxycart</strong> ($19/month)</p>
<ul>
<li>Very configurable</li>
<li>Total control over the design of the hosted pages</li>
<li><span class="caps">API</span> and XML feed to get data from their servers to yours (allowing you to integrate this data with your database and <span class="caps">CMS</span>)</li>
<li>Cart depends on JavaScript</li>
</ul>
<p><strong>Shopify </strong>(From $29 to $699/month)<br />Look at that price-range. That indicates a pretty mature kind of product, and I get the feeling this might be one of the best hosted solutions out there, but I don&#8217;t know much about it. But it&#8217;s built with Ruby on Rails so it must be super cool, right?</p>
<h3>Software Option 2. Self-hosted / Integrated</h3>
<p>Examples: Wordpress plugins <a href="http://www.instinct.co.nz/e-commerce/">WP e-commerce</a> and <a href="http://shopplugin.net/">Shopp</a></p>
<p>I recently split off a Wordpress site into two development branches, one with Wp e-commerce and the other with Shopp. I&#8217;m very impressed with this type of software solution. I don&#8217;t see any reason why you couldn&#8217;t implement any size of shop, and there&#8217;s loads of <span class="caps">CMS</span> features covering just about everything. I went with Shopp in the end, but they&#8217;re pretty similar in functionality.</p>
<ul>
<li>You have their software installed on your server (ie. the server I&#8217;m hosting the site on)</li>
<li>You keep all the data on your server</li>
<li>You don&#8217;t have to log in to another site to manage your shop</li>
<li>Shop <span class="caps">CMS</span> for product, order and customer management etc., integrated into your site CMS</li>
<li>Configurable</li>
<li>Often requires an <span class="caps">SSL</span> certificate</li>
<li>Could require PCI Compliance, depending on how you implement it</li>
<li>Maestro support is possible (if using <span class="caps">RBS</span> WorldPay or something similar like SagePay)</li>
<li>But no WorldPay gateway option out-of-the-box</li>
</ul>
<p><strong>WP e-commerce</strong> (free, or $195 for the business gold cart)</p>
<ul>
<li>Open source</li>
<li>Configurable, customizable</li>
<li>Ability to create a custom gateway integration</li>
<li>The free version withholds some functionality that in most cases is a necessity, such as multiple images per product. You could probably code this in yourself if you wanted to avoid the cost.</li>
</ul>
<p><strong>Shopp</strong> (One-off $55)</p>
<ul>
<li>Open source</li>
<li>Configurable, customizable</li>
<li>Ability to create a custom gateway integration</li>
</ul>
<h3>Software Option 3: Self-hosted Standalone <span class="caps">CMS</span></h3>
<p>Example: <a href="http://www.magentocommerce.com/">Magento</a></p>
<ul>
<li>You have their software installed on your server, alongside your web site <span class="caps">CMS</span></li>
<li>All-in-one shopping cart, product and order management package</li>
<li>You keep the data on your server</li>
<li>Open source</li>
<li>Separate dedicated <span class="caps">CMS</span> for your shop (not integrated into your site <span class="caps">CMS</span>)</li>
<li>Tonnes of features</li>
<li>Potentially difficult to configure and integrate</li>
<li>Requires an <span class="caps">SSL</span> certificate</li>
<li>Could require PCI Compliance, depending on how you implement it</li>
<li>Maestro support possible (if using <span class="caps">RBS</span> WorldPay or SagePay)</li>
<li>But no WorldPay gateway option out-of-the-box</li>
</ul>
<p>Something like Magento should be seriously considered. It&#8217;s very featureful, and I hear they recently implemented 3D secure. However, setting up and configuration could be time-consuming, and systems like these can be pretty bloated, slow and clunky.</p>
<h3>Conclusion</h3>
<p>If you need to take Maestro payments &#8211; and there are still a lot of those cards around &#8211; you can&#8217;t really go with option 1. The other options all have built-in support for several gateways, but unfortunately not WorldPay. This means some unavoidable work on your part to hook things up. Whether you go with option 2 or 3 depends solely on the needs of the client and your own development decisions.</p>
<p>In the forthcoming weeks I&#8217;ll be implementing the gateway &#8211; perhaps developing a WorldPay module for Shopp in the process &#8211; so I&#8217;ll be posting about that. If the Guardians of the Sacred Secrets of E-commerce haven&#8217;t tracked me down, that is.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/xELeOy9Y90w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/e-commerce-in-the-uk-for-web-designers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/e-commerce-in-the-uk-for-web-designers/</feedburner:origLink></item>
		<item>
		<title>Everyone a Philosopher King</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/_C6j9WyF380/</link>
		<comments>http://alistairrobinson.co.uk/everyone-a-philosopher-king/#comments</comments>
		<pubDate>Thu, 20 May 2010 21:50:00 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[plato]]></category>
		<category><![CDATA[politicians]]></category>
		<category><![CDATA[republic]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=933</guid>
		<description><![CDATA[There&#8217;s an old adage that wanting to become a politician should disqualify you from becoming one. I just found it in Plato&#8217;s Republic, Book 7 520-521. Perhaps that&#8217;s where it comes from?
The state whose rulers come to their duties with least enthusiasm is bound to have the best and most tranquil government, and the state [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s an old adage that wanting to become a politician should disqualify you from becoming one. I just found it in Plato&#8217;s <em>Republic</em>, Book 7 520-521. Perhaps that&#8217;s where it comes from?</p>
<blockquote><p>The state whose rulers come to their duties with least enthusiasm is bound to have the best and most tranquil government, and the state whose rulers are eager to rule is worst.</p></blockquote>
<p>For Plato this means that rulers must be philosophers: those who have attained the knowledge of the absolute Good, which resides in the heavenly realm of eternal fixed forms of which the so-called real world that we live in is but a poor reflection. These philosophers, as well as being more just, wise and good than others owing to their appreciation of the absolute forms of wisdom, justice and Good, also have better things to do than deal with the messy affairs of ordinary people. But this is exactly why they should be encouraged or compelled to do so, in Plato&#8217;s perfect society.</p>
<p>So Plato&#8217;s strictly hierarchical, non-democratic state makes sense. But there is another way.</p>
<p>Let&#8217;s agree that a desire for political power is indeed a bad characteristic for a politician or ruler, and that politics is best done by people who are good at doing something else and would rather do that, and also that it&#8217;s much preferable if rulers are just and wise and good. But at this point we can branch off towards a different solution if we reject some other assumptions of Plato:</p>
<p>1. The mundane world of change, the world that we all know &#8211; of love and music and sight and sound and science &#8211; is an inferior, transient reflection or shadow of a realm of pure unchanging forms. You cannot learn the truth of justice and good unless you can appreciate this higher realm.</p>
<p>2. In any imagined human society there will be only a certain tiny class of people who have innate philosophical abilities and proclivities, and whose abilities have also benefited from good nurturing. Only they can know the higher realm, so only they can be consistently just and wise and good.</p>
<p>If we reject these then we can imagine a world in which <em>everyone</em> is a ruler. Only in a society of power hierarchies do there exist people who hunger for power. As Plato says,</p>
<blockquote><p>If you get, in public affairs, men who are so morally impoverished that they have nothing they can contribute themselves, but who hope to snatch some compensation for their own inadequacy from a political career, there can never be good government.</p></blockquote>
<p>This can only happen when it&#8217;s possible to be a professional politician.</p>
<p>Instead, every person should be a part-time politician, and centralized government swept away. Participating in making decisions that affect the whole community would be a duty. And by participation I don&#8217;t mean occasionally electing professionals and hoping for the best, but government by the people. This is real democracy, not the Athenian democracy that Plato disparages, with its class divisions and concentrated power (though they are not the reasons he disparages it). But no doubt you could argue that even my sort of democracy would lead to those evils in the end.</p>
<p>But in a world where all have the ability to reach their potential, every person could indeed become a philosopher ruler, ruling himself and, in partnership with others, his community and society. Living in the thick of mundane existence is no impediment to philosophizing as Plato assumed, and it is not incompatible with being just and wise and good.</p>
<p>If it sounds like I&#8217;m promoting just another Utopia, well, yes, but isn&#8217;t it a better kind of Utopia than Plato&#8217;s?</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/_C6j9WyF380" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/everyone-a-philosopher-king/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/everyone-a-philosopher-king/</feedburner:origLink></item>
		<item>
		<title>CSS Abstracted</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/bA_xUUZtACc/</link>
		<comments>http://alistairrobinson.co.uk/css-abstracted/#comments</comments>
		<pubDate>Sat, 01 May 2010 20:51:08 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[clevercss]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[compilers]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[scaffold]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=927</guid>
		<description><![CDATA[Half way through the development of my last site I decided to use PHP files for CSS. I had a few stylesheets, and I found I was constantly going from one to the other to copy and paste hex colour codes. And then later, if I wanted to change a colour, I&#8217;d have to change [...]]]></description>
			<content:encoded><![CDATA[<p>Half way through the development of my last site I decided to <a href="http://css-tricks.com/css-variables-with-php/">use PHP files for CSS</a>. I had a few stylesheets, and I found I was constantly going from one to the other to copy and paste hex colour codes. And then later, if I wanted to change a colour, I&#8217;d have to change it in all those different places. That really is no way to work.</p>
<p>The answer to this, of course, is variables (or constants), so that you can define your colours in one place. Trouble is, CSS don&#8217;t got none. In fact, CSS is lacking <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets#Limitations">in several important ways</a>. What it boils down to is that we struggle to get around the fact that CSS doesn&#8217;t work like a programming language. In other words, it&#8217;s not logical, intuitive or consistent.</p>
<h3>Cognitive Dissonance</h3>
<p>I&#8217;ve been saying for a while that the affection many people say they have for CSS must be born of their triumph in finally getting the bloody thing to work. I know this feeling. There&#8217;s power in there to do what you need, and it <em>can</em> be fun. We must get some kind of neuro-chemical reward when we creatively delve into the details of CSS and finally emerge with something approaching what we were going for.</p>
<p>In fact, this is a classic example of the psychology of rationalization, prompted by <a href="http://en.wikipedia.org/wiki/Cognitive_dissonance">cognitive dissonance</a>. The time and energy we spend on CSS compels us to believe that it is good, because if we doubted that, there would be an unacceptable inconsistency in our lives.</p>
<p>It&#8217;s how web developers remain sane: by lying to themselves.</p>
<p>There is a joy in arranging your stylesheets logically, breaking them down into sections, successfully and efficiently tackling the issues of specificity and inheritance. But this is only because there&#8217;s <em>so much room for improvement</em> in CSS. It&#8217;s so easy to write it badly, with repetition and redundancy everywhere. And even if you write it well, maintenance is still a hassle. Why should we have to deal with these difficulties when there already exist models and paradigms, in the world of programming, that could make things much simpler if applied to CSS?</p>
<p>Often you hear the objection that the abstraction of CSS is only for those who haven&#8217;t done the hard work in learning it properly. That kind of attitude stinks, in my opinion. Specifically, it stinks of self-justification, conservatism and protectionism. It is the bitter form of the rationalization that aims at avoiding conginitive dissonance.</p>
<p>CSS won&#8217;t be around for ever. It was expedient, and learning it has been a necessary evil. A heroic endeavour, it&#8217;s true: the prominent designers, developers and standards advocates who have cracked it and shared their knowledge with the rest of us are web heroes, no doubt about it. But that doesn&#8217;t mean we should continue to celebrate the endeavour if it&#8217;s no longer necessary.</p>
<h3>First Steps</h3>
<p>So in my last site I put things into practice in a very basic way. Here&#8217;s <em>config.css.php</em>:</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><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;?php</span><br />
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-type: text/css; charset: UTF-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #000088;">$grey</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#aaaaaa'</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$light</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#efefef'</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$pink</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#e66586'</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>And here&#8217;s the fake stylesheet <em>main.css.php</em>:</p>
<div class="codecolorer-container css blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?php<br />
include_once<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'config.css.php'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
<br />
echo &lt;&lt;&lt;EOT<br />
<br />
<span style="color: #cc00cc;">#blog</span> <span style="color: #6666ff;">.article</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> $grey<span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#blog</span> <span style="color: #6666ff;">.article</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> $light<span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">solid</span> <span style="color: #933;">2px</span> $pink<span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
EOT<span style="color: #00AA00;">;</span><br />
?<span style="color: #00AA00;">&gt;</span></div></div>
<p>In the HTML you link to the stylesheet in the normal way, but specifying the PHP file instead of a CSS file.</p>
<p>True, you could use regular CSS classes for this, but do you really want to pollute your HTML with classes with names like &#8220;dark&#8221; and &#8220;box-shadow-colour&#8221; ? Just think how horrible that could get.</p>
<p>That&#8217;s all very well, but it&#8217;s still really just CSS. It&#8217;s also going to be slightly slower (not that I&#8217;ve noticed), and it&#8217;s a bit of a hack anyway. It&#8217;s akin to the way that PHP is peppered through HTML, and that&#8217;s not a great model.</p>
<p>That&#8217;s where CSS compilers or frameworks come in. One example is <a href="http://wiki.github.com/anthonyshort/csscaffold/">CSScaffold</a>. With Scaffold you can use <em>mixins</em> to group together properties into reusable chunks. They work a bit like functions or classes in programming, and Scaffold comes with lots of them ready to use. Also, the big advantage of Scaffold over the way I described above is that it will serve the generated CSS files directly if they&#8217;ve already been cached.</p>
<h3>Enter Python</h3>
<p>But Scaffold still stubbornly clings to the CSS syntax, and it wants you to integrate it into your code. What I really wanted, as well as relief from semi-colons and curly braces, was a way of generating CSS, not on the fly in production, but only during development, so that the live site would only ever serve plain old CSS files with no server processing. So I became much more enthusuastic when I found <a href="http://sandbox.pocoo.org/clevercss/">CleverCSS</a>, which is a way of doing this kind of thing with Python.</p>
<p>This&#8230;</p>
<div class="codecolorer-container css blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grey <span style="color: #00AA00;">=</span> <span style="color: #cc00cc;">#aaaaaa</span><br />
light <span style="color: #00AA00;">=</span> <span style="color: #cc00cc;">#efefef</span><br />
pink <span style="color: #00AA00;">=</span> <span style="color: #cc00cc;">#e66586</span><br />
<br />
<span style="color: #cc00cc;">#blog</span><span style="color: #00AA00;">:</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">450px</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><br />
&nbsp; <br />
&nbsp; .article<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;">10px</span> <span style="color: #cc66cc;">0</span><br />
<br />
&nbsp; &nbsp; a<span style="color: #00AA00;">:</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> $grey - <span style="color: #cc66cc;">76</span><br />
<br />
&nbsp; &nbsp; &nbsp; &amp;<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> $light.darken<span style="color: #00AA00;">&#40;</span><span style="color: #933;">50%</span><span style="color: #00AA00;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #993333;">solid</span> <span style="color: #933;">2px</span> $pink</div></div>
<p>&#8230;on the execution of <em>clevercss.convert</em> produces this&#8230;</p>
<div class="codecolorer-container css blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#blog</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">450px</span><span style="color: #00AA00;">;</span><br />
&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 />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#blog</span> <span style="color: #6666ff;">.article</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#blog</span> <span style="color: #6666ff;">.article</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#5e5e5e</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#blog</span> <span style="color: #6666ff;">.article</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777777</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">solid</span> <span style="color: #933;">2px</span> <span style="color: #cc00cc;">#e66586</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></div>
<p>A few things to notice in the CleverCSS code: no semi-colons or curly braces; the indentation defines the hierarchy; the use of the ampersand to refer to the parent element for the hover; the arithmetical expression <strong>$grey &#8211; 76</strong>; and the method call <strong>$light.darken(50%)</strong>.</p>
<p>I&#8217;m beginning to use this now to generate and update CSS files as I develop a Wordpress site. If I find that it&#8217;s not right I can easily switch over to something else, or just go back to doing CSS directly &#8211; with no harm done and no time wasted.</p>
<p>But CleverCSS is in Python, not PHP, so I can&#8217;t very easily weave it into the fabric of the operational code, even if I want to. Instead, here&#8217;s the technique I&#8217;ve come up with:</p>
<p>1. Let&#8217;s say in my CSS folder I&#8217;ve got <em>main.clvr</em> and <em>forms.clvr</em>, which never get uploaded to the web server*<br />
2. I do the styling code in these files<br />
3. When I want to see the changes to the web page, I run a Python script from the command line in the CSS folder:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ make_css.py</div></div>
<p>4. Now I&#8217;ve got <em>main.css</em> and <em>forms.css</em></p>
<p>*Note that you can use any extension you want</p>
<p>Here&#8217;s <em>make_css.py</em>:</p>
<div class="codecolorer-container python blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">import</span> clevercss<br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">fnmatch</span><br />
<br />
clevercss_files = <span style="color: #dc143c;">fnmatch</span>.<span style="color: #008000;">filter</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">listdir</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;.&quot;</span><span style="color: black;">&#41;</span>, <span style="color: #483d8b;">&quot;*.clvr&quot;</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #008000;">file</span> <span style="color: #ff7700;font-weight:bold;">in</span> clevercss_files:<br />
&nbsp; f = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #008000;">file</span>, <span style="color: #483d8b;">&quot;r&quot;</span><span style="color: black;">&#41;</span><br />
&nbsp; css = clevercss.<span style="color: black;">convert</span><span style="color: black;">&#40;</span>f.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; parts = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">splitext</span><span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: black;">&#41;</span><br />
&nbsp; f = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>parts<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> + <span style="color: #483d8b;">&quot;.css&quot;</span>, <span style="color: #483d8b;">&quot;w&quot;</span><span style="color: black;">&#41;</span><br />
&nbsp; f.<span style="color: black;">write</span><span style="color: black;">&#40;</span>css<span style="color: black;">&#41;</span><br />
&nbsp; f.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></div>
<p>This finds all the CleverCSS files and runs <strong>clevercss.convert</strong> on their contents, writing the output of each to a CSS file.</p>
<p>I&#8217;m really enjoying this technique, but it isn&#8217;t perfect. Running the script is an extra step, and that in itself might be enough to put some people off. And CleverCSS, at least the version I have, has no support for custom functions, mixins or macros, as far as I can tell. And debugging in Firebug is on the generated CSS, so you have to relate it back to the CleverCSS yourself.</p>
<p>As it happens, these problems are solved in CSS compilers such as <a href="http://compass-style.org/">Compass</a>, which uses the SASS language. SASS is comparable to CleverCSS but seems to offer a bit more, including <a href="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins">mixins</a>. Compass takes things further: it has a bunch of standard mixins and plugins, support for grid frameworks like 960.gs and Blueprint, and it can integrate into several web app frameworks. Also, it listens for changes to your files so that you don&#8217;t have to repeatedly run a script to produce the actual CSS.</p>
<p>But I&#8217;m not ready for that kind of commitment. In any case it would be unsuitable for a Wordpress site. </p>
<p>I&#8217;m very new to this methodology so I&#8217;m not necessarily recommending it. The debates continue about whether CSS itself should eventually provide these things, and whether CSS abstraction is just for programmers and not designers &#8211; but in principle I believe it&#8217;s a step in the right direction.</p>
<p>I&#8217;ve only mentioned a few of these languages and frameworks, but there&#8217;s a tonne of others out there, all with different syntax. An argument could easily be made that they&#8217;re just adding another layer of clutter, when we&#8217;ve no idea what&#8217;s going to happen with web standards and browsers. These solutions are transient and half-baked, and far less established than CSS itself.</p>
<p>However, used as a convenience in the way I&#8217;ve described, it doesn&#8217;t introduce any difficulty into development or obscurity into the finished application, which remains just PHP, MySQL, HTML, JavaScript and CSS.</p>
<p>Over the last couple of years there&#8217;s been a lot of activity around this. Here are some great articles, with good debates in the comments:<br />
<a href="http://www.codinghorror.com/blog/2010/04/whats-wrong-with-css.html">What&#8217;s Wrong With CSS</a><br />
<a href="http://wiseheartdesign.com/articles/2010/01/18/the-demise-of-css-why-sass-and-languages-like-it-will-triumph/">The Demise of Plain CSS</a><br />
<a href="http://chriseppstein.github.com/blog/2009/09/20/why-stylesheet-abstraction-matters/">Why Stylesheet Abstraction Matters</a></p>
<p><a href="http://wiki.github.com/anthonyshort/csscaffold/">CSScaffold</a><br />
<a href="http://sandbox.pocoo.org/clevercss/">CleverCSS</a><br />
<a href="http://sass-lang.com/">SASS</a><br />
<a href="http://compass-style.org/">Compass</a></p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/bA_xUUZtACc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/css-abstracted/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/css-abstracted/</feedburner:origLink></item>
		<item>
		<title>Mashing, Hacking and Bodging: The Django Adventure Begins</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/6un-FHqfIjg/</link>
		<comments>http://alistairrobinson.co.uk/mashing-hacking-and-bodging-the-django-adventure/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 23:26:49 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=926</guid>
		<description><![CDATA[These have been on my to-do list for a while:
1. Write some site or application in Django
2. Begin doing test-first programming
3. Begin using Subversion
4. Learn Python
Notice the order of these items. My sensible self says I should do it the other way around. &#8220;You&#8217;re not hacking PHP now, you know. This is serious stuff. A [...]]]></description>
			<content:encoded><![CDATA[<p>These have been on my to-do list for a while:</p>
<p>1. Write some site or application in <a href="http://www.djangoproject.com/">Django</a><br />
2. Begin doing <a href="http://en.wikipedia.org/wiki/Test-driven_development">test-first programming</a><br />
3. Begin using <a href="http://subversion.apache.org/">Subversion</a><br />
4. Learn <a href="http://www.python.org/">Python</a></p>
<p>Notice the order of these items. My sensible self says I should do it the other way around. &#8220;You&#8217;re not hacking PHP now, you know. This is serious stuff. A strategic and organized approach will benefit you and others.&#8221;</p>
<p>I find it disturbingly easy to reject these sensible admonishments. Who wants to be sensible? So I&#8217;m taking the items in the order presented above, and I&#8217;m currently at step 1, tentatively building a real-world side-project in Django, which may come to something. In fact, I&#8217;m fairly sure we&#8217;ll use it just amongst ourselves, at least (here at <a href="http://www.inventivemanagement.co.uk/">Inventive Management</a>).</p>
<p>So I find myself getting and posting to REST APIs, doing basic authentication, parsing XML and outputting it to Django templates with custom template filters &#8211; all before I&#8217;ve even created my first model. And I don&#8217;t even know the difference between a module and a package, or a list and a tuple, and I&#8217;m still kind of hazy about what an &#8220;application&#8221; is, in the Django sense. And the list goes on.</p>
<p>Crazy? I don&#8217;t know. I don&#8217;t believe I&#8217;m the only person who learns in this way. I recently watched a video about embracing failure. I&#8217;ve really taken to this idea, so I intend to fail as much as possible to super-accelerate my learning.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/6un-FHqfIjg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/mashing-hacking-and-bodging-the-django-adventure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/mashing-hacking-and-bodging-the-django-adventure/</feedburner:origLink></item>
		<item>
		<title>The Resources of The World Are Limitless</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/Ng65HL70Si4/</link>
		<comments>http://alistairrobinson.co.uk/the-worlds-resources-are-limitless/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 22:00:06 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[environment]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[agriculture]]></category>
		<category><![CDATA[industry]]></category>
		<category><![CDATA[malthus]]></category>
		<category><![CDATA[malthusianism]]></category>
		<category><![CDATA[population]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=921</guid>
		<description><![CDATA[I struggled to come up with a web development angle for this one. I had a brief hope of executing some dazzling metaphorical sleight of hand when I read Thomas DeGregori&#8217;s discussion of the &#8220;usability&#8221; of rocks among proto-humans, but in the end I gave up and decided just to roll with it&#8230;
The world&#8217;s resources [...]]]></description>
			<content:encoded><![CDATA[<p>I struggled to come up with a web development angle for this one. I had a brief hope of executing some dazzling metaphorical sleight of hand when I read Thomas DeGregori&#8217;s discussion of the &#8220;usability&#8221; of rocks among proto-humans, but in the end I gave up and decided just to roll with it&#8230;</p>
<p>The world&#8217;s resources are limitless. I&#8217;m not joking. In a world of finite materials &#8211; and a finite 88 keys on a piano &#8211; resources are no more limited than are melodies and harmonies. Even if we stick to the Western musical scale, we will never run out of tunes. This is because tunes are not raw materials, somehow just <em>there</em>, waiting to be discovered: they come into being with the creativity of people.*</p>
<p>The same is true of resources. I&#8217;ve just discovered this wonderful phrase:</p>
<p><em>Resources Are Not, They Become</em></p>
<p>It was coined by economist Erich Zimmermann and has since been taken up in argument against the persistently rearing ugly head of <a href="http://en.wikipedia.org/wiki/Thomas_Robert_Malthus" rel="external">Malthus</a> (e.g. brilliantly by Thomas R. DeGregori [1]). No matter how many times Malthus has been disproven &#8211; by humanity&#8217;s ingenuity, and famously in more recent times in the <a href="http://en.wikipedia.org/wiki/Simon-Ehrlich_wager" rel="external">Simon-Ehrlich wager</a> &#8211; still he keeps popping up in various forms, currently in the guise of environmentalism. It&#8217;s boring to have to keep on defending humans from this conservative, misanthropic idea, but it&#8217;s all the rage at the moment, so I guess we have to.</p>
<p>The difference with today&#8217;s Malthusians is that they do not target the poor and the Africans and the Indians, as Malthusians once did. At least, they <em>pretend</em> not to. Their main target is the Western lifestyle, with its supposed over-consumption. But this leads them to attack the poorer countries&#8217; efforts to develop too, for example in their opposition to the construction of dams to control the effects of monsoons in India or the use of GM crops in Africa. In their view of the world, people are better kept in their place, in small numbers at the mercy of nature. People are always the problem.</p>
<h3>My Cat&#8217;s Electric Blanket Once Belonged to Alfred Russel Wallace&#8217;s Grandmother</h3>
<p>I believe that people are not the problem, but the solution. People are not drains on society but contributors to it, and the more people there are, the more ideas we generate. The concept behind <em>Resources are not, they become</em> is that resources are not found but <em>created</em>, by the application of ideas. Petroleum was not a resource for the people of the neolithic. It only became one when we learned how to get it and use it, and when we had a need for it. Likewise, it will no doubt <em>cease</em> to become one when we work out how to use something better.</p>
<p>Like music and language, human society is open-ended. There will always be new music; in language there will always be novel phrases that make sense (I submit this: &#8220;my cat&#8217;s electric blanket once belonged to Alfred Russel Wallace&#8217;s grandmother&#8221;); and there will always be new resources. The ever-changing ideas and techniques of people continue to remake the world and society. It is simplistic and ahistorical to see the world&#8217;s resources as an ever-dwindling cake.</p>
<p>I think the big problems are under-development and poverty. And this of course means that <em>policies</em> are partly to blame. In the decades following Malthus India was seen as a lost cause, with a population growing so fast that it could not possibly sustain itself. Indeed, famine was celebrated by many in Britain as a natural check on over-population (incredibly, that odious idea lives on here and there even now). In the event, after suffering seven famines under British misrule, it was <a href="http://www.indiaonestop.com/Greenrevolution.htm" title="India's Green Revolution" rel="external">technology and complementary policy</a> that ensured that, today, India has been famine-free since independence in 1947, even while the population has grown unimaginably.</p>
<p>I conclude from all this that policies seeking to prevent development &#8211; for example, calling a halt to the Gibe III dam in Ethiopia or banning GM crops &#8211; are, potentially, profoundly bad for humanity; and therefore that ideas and campaigns promoting such policies should be vigorously challenged.</p>
<p><b>Note:</b> I&#8217;d like to provide some context here by adding that, by most measures, things are getting better for people throughout the world, as summarized in <a href="http://www.newscientist.com/data/images/archive/2725/27250901.jpg" rel="external">this collection of graphs from <em>New Scientist</em></a>.</p>
<p>*If you&#8217;re inclined to pick apart the analogy, how about this: the keys represent chemical elements, chords represent raw materials (there is a certainly a sense in which basic harmonies were <em>discovered</em>), and melodies and chord sequences (thus incorporating <em>time</em>) represent resources. I think that works, even without bringing in microtones.</p>
<p>[1] <em>Resources Are Not, They Become: an Institutional Theory</em>, Thomas R. De Gregori, Journal of Economic Issues 21, 1987, included in <a href="http://books.google.co.uk/books?id=DJquyEyd0AIC" rel="external">Evolutionary theory in the social sciences, Volume 4</a> by William M. Dugger and Howard J. Sherman.</p>
<p><b>Further reading:</b><br />
<a href="http://en.wikipedia.org/wiki/Simon-Ehrlich_wager" rel="external">The Simon-Ehrlich Wager</a> on Wikipedia<br />
<a href="http://www.wired.com/wired/archive/5.02/ffsimon_pr.html" rel="external">The Doomslayer</a> by Ed Regis, Wired 5.02, February 1997<br />
<a href="http://www.ejsd.org/public/journal_article/12" rel="external">The Post War Intellectual Roots Of The Population Bomb</a> by Pierre Desrochers and Christine Hoffbauer in <a href="http://www.ejsd.org/" rel="external">The Electronic Journal of Sustainable Development</a><br />
<a href="http://www.spiked-online.com/index.php/site/issues/C202" rel="external">No to Neo-Malthusianism</a> at <a href="http://www.spiked-online.com/" rel="external">Spiked Online</a></p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/Ng65HL70Si4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/the-worlds-resources-are-limitless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/the-worlds-resources-are-limitless/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.633 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-08-20 08:46:58 -->
