<?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>Sat, 28 Jan 2012 12:11:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<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>Goodbye and Good Riddance to Word Processors: A Better Way To Write Proposals</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/9tEEUfBHN7E/</link>
		<comments>http://alistairrobinson.co.uk/goodbye-and-good-riddance-to-wysiwyg-and-word-processors/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 02:45:13 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[pandoc]]></category>
		<category><![CDATA[pisa]]></category>
		<category><![CDATA[textile]]></category>
		<category><![CDATA[word processors]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[wysiwyg]]></category>
		<category><![CDATA[xhtml2pdf]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=991</guid>
		<description><![CDATA[A few days ago I tweeted: &#8220;Writing a proposal. Oh boy do I hate word processors. There must be a better way.&#8221; It turns out there is, though I ended up forging my own path to suit my skills and working methods. A little background&#8230; I need to produce decent looking proposals for web development [...]]]></description>
			<content:encoded><![CDATA[	<p>A few days ago I tweeted:</p>

	<p>&#8220;Writing a proposal. Oh boy do I hate word processors. There must be a better way.&#8221;</p>

	<p>It turns out there is, though I ended up forging my own path to suit my skills and working methods. A little background&#8230;</p>

	<p>I need to produce decent looking proposals for web development projects. Normally I bite the bullet and suffer the awkwardness of Word or OpenOffice or LibreOffice or something, and then export to <span class="caps">PDF</span>. It&#8217;s all very clever: it took some great minds to produce this software. But it really goes against the grain. It feels so wrong.</p>

	<p>I like plain old <strong>text</strong>, and as a web developer I&#8217;m used to defining the style of documents by hand, in <span class="caps">CSS</span>, rather than using another program to do it for me, <em>as I write</em>. I would go further and claim that this is not just a matter of personal taste: <em>word processors are bad for the world</em>. Sure, people are used to them, and they cannot imagine a better way, and &#8211; most importantly &#8211; there is probably no equally mature, friendly, well-supported and funded software in place to allow for a move away from them as things stand. But it does not follow from this that they are good.</p>

	<h3>What&#8217;s Wrong With Word Processing?</h3>

	<p>The name, to start with. But most of all <strong><span class="caps">WYSIWYG</span></strong>. One thing I&#8217;ve learned from web development is the importance of respecting the logical separation of style and content. <span class="caps">WYSIWYG</span> is not so respectful. Everything happens in the same place and at the same time. Effectively, documents are typeset as you go, character by character. This is silly.</p>

	<p>Formatting your document&#8217;s style has nothing to do with its content. What you are trying to say is a different concern from how it should look. And I do not mean that the two human operations are more conveniently handled by separate software operations. I mean that they are different <em>human</em>, <em>conceptual</em>, <em>natural</em> concerns. Of course it has to look good (although a. it <em>doesn&#8217;t</em> always have to, and b. even plain text looks way better than a clipartified Word document). Yes, of course your document has to conform to a company standard, or your own standard, and how it looks might be partly what you intend to convey. But all this precisely means that these standards and styles ought to be defined separately, beforehand, leaving you to get on with the writing: to concentrate on what it is you have to say. It is the difference between talking to somebody at a party and deciding what you are going to wear to that party.</p>

	<p>Using <span class="caps">WYSIWYG</span> software such as the horribly feature-rich <em>Word</em> is like going to a party with several changes of clothes and proceeding to change them every time you think that what you&#8217;re saying doesn&#8217;t go with stripes. Sure, do the best you can to look good, but <em>prepare</em> for that, by going shopping, trimming your beard, and putting on your best Y-fronts. After all that&#8217;s done you can get on with talking to people and getting drunk, safe in the knowledge that you&#8217;re looking great. Underdressed? Well, if you didn&#8217;t care enough to prepare, to research, and to tune your attire accordingly, then you shouldn&#8217;t care about being underdressed.</p>

	<p>Now, moving on from that straining analogy, the biggest benefit of separating style and content is that content becomes <em>independent</em> of how it is presented. If standards of presentation change, or a piece of writing needs to be reproduced in different formats, or you&#8217;ve finally got tired of Comic Sans, then you shouldn&#8217;t be going anywhere near your content to achieve the desired formatting changes. But word processors force you to do this. You actually have to open and edit your document, just to re-style it. This wrongheadedness has been spectacular in its worldwide detrimental impact.</p>

	<p>(Note that I&#8217;m quite ignorant of Word and the no-doubt very sophisticated setups that can be achieved in organizations where stanadardized presentation is important. For all I know maybe you <em>don&#8217;t</em> always have to go back and edit your document or re-assign a template of whatever. However, achieving this is just a workaround, and likely would not have a perfect success rate; it seems clear that the default expectation of the software is that you do mix up content and presentation.)</p>

	<p>And faced with the option, the <em>expectation</em>, to fiddle about with fonts and bullets, it takes discipline, imposed from above or by yourself, to beat down that natural inclination. This is not a matter of freedom. In my case, I have to struggle with formatting issues almost every time I write &#8211; or rather, <em>process</em> &#8211; one of these documents, because I might be using different word processors on different platforms with different fonts or whatever. This should not even be an issue, because we already <em>know</em>, deep down, that style and content are logically separate categories (note that this does not mean that they do not sometimes overlap). And in a company environment, standard templates for Word and detailed strictures and guidelines from management on formatting, fonts and colours, are awkward and only partly successful workarounds for a problem that would not exist without <span class="caps">WYSIWYG</span>.</p>

	<p>The writer of a document has expertise in the subject addressed by that document. They may not have expertise in typography and layout, and usually they do not. The latter, then, becomes nothing but a distraction and a huge waste of time. And &#8230; I didn&#8217;t ask you to send me a bloody Word attachment in the first place!</p>

	<p>The natural paradigm for me, which I get from web development, is to write stuff in a text file, and to define how it looks in another text file, and <em>only then</em> to view how it will look to the document&#8217;s recipient. I believe this should go for print documents as well as <span class="caps">HTML</span> web pages.</p>

	<p>It is already the way of things in printing, publishing and professional writing. I don&#8217;t believe Proust was worrying about typefaces when he painstakingly described the memory of a hawthorn bloom, and the prevalence of Word has not made this any less true of professional writers today. Why should any writer, or anyone who becomes a writer for brief periods &#8211; whether of poems or proposal documents or annual reports &#8211; have to worry about such things? Why has the division of labour, both human and machine, which is so thoroughly advanced in the modern world, been bypassed in this case?</p>

	<h3>Lightweight Markup</h3>

	<p>A few years ago I discovered <a href="http://thresholdstate.com/articles/4312/the-textile-reference-manual">Textile</a>, which is a lightweight markup language. What a Godsend. I can get on with <em>writing</em>:</p>

<div class="codecolorer-container text blackboard" style="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">h1. This is The Main Heading<br />
<br />
For a long time I used to go to bed early. Sometimes, when I had put out my candle, my eyes would close so quickly that I had not even time to say &quot;I'm going to sleep.&quot; And half an hour later the thought that it was time to go to sleep would awaken me; I would try to put away the book which, I imagined, was still in my hands, and to blow out the light; I had been thinking all the time, while I was asleep, of what I had just been reading, but my thoughts had run into a channel of their own, until I myself seemed actually to have become the subject of my book: a church, a quartet, the rivalry between François I and Charles V. This impression would persist for some moments after I was awake; it did not disturb my mind, but it lay like scales upon my eyes and prevented them from registering the fact that the candle was no longer burning. Then it would begin to seem unintelligible, as the thoughts of a former existence must be to a reincarnate spirit; the subject of my book would separate itself from me, leaving me free to choose whether I would form part of it or no; and at the same time my sight would return and I would be astonished to find myself in a state of darkness, pleasant and restful enough for the eyes, and even more, perhaps, for my mind, to which it appeared incomprehensible, without a cause, a matter dark indeed.<br />
<br />
h2. This is a Secondary Heading<br />
<br />
Furthermore, each one of the following is an item in an unordered list:<br />
<br />
* Something<br />
* Something else<br />
* And another thing<br />
<br />
As Oscar Wilde &quot;once said&quot;:http://upword.com/wilde/dorgrayp.html,<br />
<br />
bq. No artist desires to prove anything. Even things that are true can be proved. No artist has ethical sympathies. An ethical sympathy in an artist is an unpardonable mannerism of style. No artist is ever morbid. The artist can express everything.<br />
<br />
Now for some Latin. Lorem ipsum dolor sit amet, duo id viris posidonium signiferumque. Maluisset patrioque vis ad, eruditi imperdiet ex pro. At eirmod luptatum expetenda mei, vel impetus meliore oporteat ex, case postea vivendo per eu. Enim prima ridens an mel. Ne has clita scripserit, eam eu veri mundi dissentiet. Eros torquatos sed cu.</div></div>

	<p>All in a <em>text editor</em>. You know, like Notepad only with nice colours and productivity tools. There&#8217;s nothing and nobody messing around <em>processing</em> what I write. Processing comes later, based on separate settings that I have set up for the scenario.</p>

	<h3>My Great Solution Which, Though Great, Could Most Probably Be Vastly Improved Upon</h3>

	<p>Up till now I&#8217;ve only really used Textile to generate <span class="caps">HTML</span> for display on web sites, usually blog posts, but now that I&#8217;ve (mostly) moved away from Windows and on to Linux, manipulating text becomes all the more easy. I&#8217;ve created a nice wee setup to generate <span class="caps">PDF</span> documents styled with <span class="caps">CSS</span> straight from a Textile file. I should stress that this involves the terminal and bash scripts, so it&#8217;s probably for geeks only.</p>

	<p>The upshot is that when I want to write a proposal, I just run a couple of commands to set up a proposal project based on a template, and then get down to writing my document in Textile, and when I want to see what it&#8217;ll look like I just run ~/gopdf.sh, which generates a <span class="caps">PDF</span>.</p>

	<p>The gopdf.sh bash script does three things in order:</p>

	<p>A. Generates an <span class="caps">HTML</span> file from the textile file using pandoc<br />
B. Generates a <span class="caps">PDF</span> from the <span class="caps">HTML</span> file using xhtml2pdf<br />
C. Opens the <span class="caps">PDF</span></p>

	<p><img src="http://alistairrobinson.co.uk/wp-content/uploads/2012/01/Screenshot-at-2012-01-24-092801.png" alt="pdf screenshot" title="Screenshot at 2012-01-24 09:28:01" width="600" height="543" class="alignleft size-full wp-image-994" /></p>

	<p>(If I had actually got to the stage where I&#8217;ve built up a nice <span class="caps">PDF</span> stylesheet I would have shown you something more fancy, but there you go. And the sharp-eyed among you will notice that the line of text immediately following the list is squashed up to it. This might be a problem with pandoc&#8217;s understanding of textile, which is not perfect, favouring the alternative Markdown as it does. You can include <span class="caps">HTML</span> in among the Textile markup, so a line break here is easy to achieve, or else a <span class="caps">CSS</span> bottom margin would probably do it, and would probably be the better choice.)</p>

	<h3>What it Allows Me to Do</h3>

	<p>Before I describe how I make all this possible, here in more detail is what I now do every time I get a new client who wants a proposal.</p>

	<p><strong>One</strong></p>

	<p>So I meet with Bob of Bob&#8217;s Cake Company fame, and he tells me he wants a cake web app. I say sure, no problem, then I go home, start up Linux and create a folder called bobs_cake_company, and cd into it. Then&#8230;</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">~/startdoc.sh proposal</div></div>

<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">subl .</div></div>

	<p>The first command copies over my standard proposal template folder to bobs_cake_company as a sub-folder called &#8220;proposal&#8221;. The second one just opens the current folder, bobs_cake_company, in <a href="http://www.sublimetext.com/2">Sublime Text 2</a> (I seem to remember doing some things to get that &#8220;subl&#8221; command working, but I&#8217;m not sure what. Probably just a symlink.)</p>

	<p><strong>Two</strong></p>

	<p>I write the document in the file that is there waiting for me, proposal.textile. Remember, by writing I just mean writing. Not fiddling with margins or choosing bullets or struggling with alignment issues or fixing pasted text or making sure that the screenshot isn&#8217;t blurry or anything else like that.</p>

	<p><strong>Three</strong></p>

	<p>In the terminal&#8230;</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">compass watch</div></div>

	<p>This generates a stylesheet from the <span class="caps">SASS</span> files in which I define the <span class="caps">CSS</span> stylings. Full disclosure: currently my method is in its early stages so I don&#8217;t yet have a good standard <span class="caps">CSS</span> stylesheet for <span class="caps">PDF</span>s. I&#8217;ll be building this as I go along for a project or two before I can just leave it alone. So right now I&#8217;m actually running this Compass watcher when I begin writing, because I&#8217;m styling as I go, like a human word processor. Not for long.</p>

	<p><strong>Four</strong></p>

	<p>Then in the terminal (in a new tab):</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">~/gopdf.sh proposal</div></div>

	<p>This creates a <span class="caps">PDF</span> (or overwrites the one that already exists), and then opens it in the default <span class="caps">PDF</span> viewer. Thereafter I just run &#8220;~/gopdf.sh proposal&#8221; whenever I want to see my changes in the <span class="caps">PDF</span>.</p>

	<p><strong>Five</strong></p>

	<p>Send proposal to client and have a cigarette.</p>

	<h3>Making it All Possible</h3>

	<p>The process I&#8217;ve just described depends on a few pre-existing elements:</p>

	<ul>
		<li>pandoc</li>
		<li>xhtmlpdf</li>
		<li>startdoc.sh bash script</li>
		<li>gopdf.sh bash script</li>
		<li>a proposal_template folder with goodies in it</li>
		<li>Compass (optional)</li>
		<li>Sublime Text 2 (optional)</li>
		<li>A dangerous, expensive and anti-social nicotine addiction (optional)</li>
	</ul>

	<p>You do the following stuff once only.</p>

	<p><strong>Get pandoc</strong>: <a href="http://johnmacfarlane.net/pandoc/">Pandoc</a> is a Haskell library that converts between lots of different kinds of documents. I would have used it alone had it been able to convert Textile and <span class="caps">CSS</span> to <span class="caps">PDF</span> directly. (I couldn&#8217;t make it work and concluded that pandoc couldn&#8217;t do it, but I could be wrong.)</p>

	<p><a href="http://johnmacfarlane.net/pandoc/installing.html">Installation instructions are here</a></p>

	<p><strong>Get xhtml2pdf</strong>: <a href="http://www.xhtml2pdf.com/">xhtml2pdf</a> is a python package that generates <span class="caps">PDF</span> files from <span class="caps">HTML</span> and <span class="caps">CSS</span>. It can be installed with easy_install or pip and also available to download <a href="http://pypi.python.org/pypi/xhtml2pdf/#downloads">here</a></p>

	<p><strong>If you are so inclined, get Compass</strong>: <a href="http://compass-style.org/">Compass</a> is a <span class="caps">CSS</span> authoring framework built on Ruby and <a href="http://sass-lang.com/"><span class="caps">SASS</span></a>. You write in <span class="caps">SASS</span> and Compass generates <span class="caps">CSS</span> files for you. The latter are what you actually run on the server. I&#8217;ve been using it for a year or so and I love it. One of the reasons I like it is just because I can avoid the curly braces and semi-colons of <span class="caps">CSS</span> itself. I&#8217;m addicted to significant whitespace. (Though it&#8217;s worth noting that they&#8217;ve been going after designers and have opted to make their <span class="caps">SCSS</span> syntax the default because <span class="caps">SASS</span> looks too much like programming).</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">gem install compass</div></div>

	<p>More details on installing Compass <a href="http://compass-style.org/install/">here</a></p>

	<p><strong>If you need a great text editor, get Sublime Text 2</strong>:It&#8217;s all the rage, and for good reason. <a href="http://www.sublimetext.com/2">Get it here</a></p>

	<p><strong>Create startdoc.sh</strong>:</p>

<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>alistair<span style="color: #000000; font-weight: bold;">/</span>projects<span style="color: #000000; font-weight: bold;">/</span>proposal_template <span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$1</span><br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> proposal.textile <span style="color: #007800;">$1</span>.textile</div></div>

	<p>This copies the proposal template folder, renames it depending on your argument, and also renames the .textile file.</p>

	<p><strong>Create gopdf.sh</strong>:</p>

<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
pandoc <span style="color: #660033;">--email-obfuscation</span>=none <span style="color: #660033;">-s</span> <span style="color: #660033;">-S</span> <span style="color: #660033;">-c</span> stylesheets<span style="color: #000000; font-weight: bold;">/</span>print.css <span style="color: #007800;">$1</span>.textile <span style="color: #660033;">-o</span> <span style="color: #007800;">$1</span>.html <span style="color: #660033;">-s</span> <span style="color: #660033;">-S</span> <span style="color: #660033;">-c</span> stylesheets<span style="color: #000000; font-weight: bold;">/</span>print.css <span style="color: #007800;">$1</span>.textile <span style="color: #660033;">-o</span> <span style="color: #007800;">$1</span>.html<br />
python makepdf.py <span style="color: #007800;">$1</span>.html <span style="color: #007800;">$1</span>.pdf<br />
gnome-open <span style="color: #007800;">$1</span>.pdf</div></div>

	<p>This is where the action happens. It runs pandoc to convert from Textile to <span class="caps">HTML</span> &#8211; along with print.css &#8211; and then runs makepdf.py (which in turn runs xhtml2pdf, as we shall see) to take <strong>proposal.html</strong> and generate <strong>proposal.pdf</strong>.</p>

	<p><strong>Create the proposal_template folder</strong></p>

	<p>We need to create a standard proposal template that will thereafter be copied over to a new project any time you run ~/startdoc.sh. It consists of a folder structure which looks like this:</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">proposal_template<br />
&nbsp; &nbsp;|-documentation<br />
&nbsp; &nbsp;|-images<br />
&nbsp; &nbsp;|-sass<br />
&nbsp; &nbsp; &nbsp;---print.sass<br />
&nbsp; &nbsp;|-stylesheets<br />
&nbsp; &nbsp;|---fonts<br />
&nbsp; &nbsp;config.rb<br />
&nbsp; &nbsp;makepdf.py<br />
&nbsp; &nbsp;proposal.textile</div></div>

	<p>The folder <strong>sass</strong> contains the Compass <span class="caps">SASS</span> file; <strong>stylesheets</strong> contains the <span class="caps">CSS</span> that is produces from the <span class="caps">SASS</span>, namely print.css; <strong>config.rb</strong> is the Compass config file; and <strong>makepdf.py</strong> runs xhtml2pdf, but is itself executed by the <strong>gopdf.sh</strong> bash script. The folder <strong>fonts</strong> contains font-files that can be included in the <span class="caps">PDF</span> by using @font-face in the stylesheet.</p>

	<p>Once all this is copied over by startdoc.sh, <strong>proposal.textile</strong> is where all the writing happens.</p>

	<p>The Python script, <strong>makepdf.py</strong>, looks like this:</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;">from</span> xhtml2pdf <span style="color: #ff7700;font-weight:bold;">import</span> pisa<br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span><br />
<br />
pdf <span style="color: #66cc66;">=</span> pisa.<span style="color: black;">CreatePDF</span><span style="color: black;">&#40;</span><br />
&nbsp; <span style="color: #008000;">file</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;r&quot;</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #008000;">file</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;wb&quot;</span><span style="color: black;">&#41;</span><br />
&nbsp; <span style="color: black;">&#41;</span><br />
<br />
pdf.<span style="color: black;">dest</span>.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></div>

	<p>This is called in <strong>gopdf.sh</strong>, specifically this line:</p>

<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python makepdf.py <span style="color: #007800;">$1</span>.html <span style="color: #007800;">$1</span>.pdf</div></div>

	<p>So running <strong>~/gopdf.sh proposal</strong> will get pisa to take proposal.html and generate proposal.pdf. Pisa, by the way, is the original name &#8211; or central core &#8211; of xhtml2pdf.</p>

	<p>In the near future I hope to fill the standard print.css with lots of proposal-specific stylings, and proposal.textile will probably contain my standard section headings and table of contents.</p>

	<p>By the way, when creating the standard template, the Compass stuff can be set up automatically by running the following command.</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">compass create --syntax sass</div></div>

	<p>(If you like the <span class="caps">SASS</span> syntax, that is)</p>

	<h3>WordPress</h3>

	<p>I&#8217;m writing this in Textile right now, but it struck me that I only had a WordPress blog to post it to. I can use Textile for my <a href="http://critique-of-pure-reason.com">philosophy blog</a>, because I built the engine myself in Django, but I hadn&#8217;t got far in the past trying to get Textile working in WordPress. Thankfully, Veeti Paananen has provided a plugin, <a href="https://github.com/rojekti/Simple-Textile/">Simple-Textile</a> which seems to work nicely.</p>

	<p>It&#8217;s really time to move this blog, and a redesign is probably overdue.</p>

	<h3>Afterthoughts</h3>

	<p>If you&#8217;re not a coder, but you&#8217;re an author or just do a lot of writing, and you don&#8217;t have to worry too much about making your words look good enough for Bob of Bob&#8217;s Cake Company to print out &#8212; but you do want a nice, pleasing, peaceful, distraction-free writing environment, then there are some nice minimalist editors out there at the moment, such as <a href="http://www.ommwriter.com/">OmmWriter</a> and <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a>.</p>

	<p>I get basically the same thing in Sublime Text when I put it in &#8220;distraction-free mode&#8221;, so my programming and web design editor also functions as a nice place to write about <a href="http://critique-of-pure-reason.com">Wittgenstein, Heidegger, Karl Marx and the evils of traffic control</a>.</p>

	<p>But when it comes to writing something big or complex like a book or a thesis, folks sometimes opt for specialist software, such as editors that revolve around the <a href="http://www.latex-project.org/intro.html">LaTex</a> typsetting markup system. These are usually built on the same paradigm that I&#8217;ve been describing, namely the separation of style and content, which is especially important with documents primarily intended for professional print publishing. Word processors are strictly for home and office use, and I imagine those in the world of printing never touch them with a bargepole. It must be galling that word processors are these days thought to be the last word in setting and styling type, because while they have cast that noble profession into obscurity &#8211; though certainly not into obsolescence &#8211; their own ability to do it well is tragically lacking. Next time you&#8217;re in a print shop ask them what they think of Microsoft Word, so long as you don&#8217;t find anti-Microsoft rants boring.</p>

	<p>Thanks to all of the wonderful and generous programmers out there without whom I would likely still be shouting at Word like a madman.</p>

	<h3>Further Reading</h3>

	<p>I&#8217;m not the only one, you know.</p>

	<p><a href="http://www.mymac.com/2004/01/why-do-i-hate-word-processors/">Why Do I Hate Word Processors?</a><br />
<a href="http://ricardo.ecn.wfu.edu/~cottrell/wp.html">Word Processors: Stupid and Inefficient</a><br />
<a href="http://www.conradiator.com/downloads/pdf/WhatHasWYSIWYG_done2us.pdf">What has <span class="caps">WYSIWYG</span> done to us?</a></p><img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/9tEEUfBHN7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/goodbye-and-good-riddance-to-wysiwyg-and-word-processors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/goodbye-and-good-riddance-to-wysiwyg-and-word-processors/</feedburner:origLink></item>
		<item>
		<title>The WordPress White Screen of Death</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/ff8yIRE1rlE/</link>
		<comments>http://alistairrobinson.co.uk/the-wordpress-white-screen-of-death/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:05:58 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=988</guid>
		<description><![CDATA[This is the kind of thing that happens out of nowhere when you&#8217;re in the middle of finishing off something simple, and sends you into a rage shouting &#8220;What the fucking hell&#8230;this is just bizarre!&#8221; and so on, until you finally fix it by fiddling about intuitively, and then just move on. For once, professional [...]]]></description>
			<content:encoded><![CDATA[<p>This is the kind of thing that happens out of nowhere when you&#8217;re in the middle of finishing off something simple, and sends you into a rage shouting &#8220;What the fucking hell&#8230;this is just <em>bizarre!</em>&#8221; and so on, until you finally fix it by fiddling about intuitively, and then just move on. For once, professional discipline compels me to record the problem and its solution, partly for my own benefit but also to help others avoid the drastic solutions offered in several places on the web.</p>
<p>After working primarily in Django for the last while I had to do some WordPress work yesterday, implementing SEO improvements to one of our e-commerce client&#8217;s web site. I added a function to functions.php and got everything working nicely, but then I went to /wp-admin only to find a blank screen, with no error messages. Neither could I find anything in the server error logs. I could get to /wp-login.php and seemingly log in succesfilly, but then the same thing would happen &#8211; I couldn&#8217;t get in to the back end, even though the public site was working just fine.</p>
<p>Most of the proposed and unsurprisingly successful fixes I found in blogs and on the WordPress support forums involved re-installing WordPress, but one suggestion stood out: <strong>delete any blank lines at the end of your functions.php file</strong>. I&#8217;m in the habit of adding extra lines at the bottom of a file to give me more space to work in my text editor, so this looked promising. And it worked.</p>
<p>I don&#8217;t know why.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/ff8yIRE1rlE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/the-wordpress-white-screen-of-death/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/the-wordpress-white-screen-of-death/</feedburner:origLink></item>
		<item>
		<title>You Might Like to Try…</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/BJK1mRSYjrk/</link>
		<comments>http://alistairrobinson.co.uk/you-might-like-to-try/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 15:07:49 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=986</guid>
		<description><![CDATA[critique-of-pure-reason.com I haven&#8217;t been blogging here much because I&#8217;ve been doing it over at my philosophy blog, critique-of-pure-reason.com. Go take a look and leave a comment, if you&#8217;re into that sort of thing. If you&#8217;re here for web development&#8230;I really should write something soon. I&#8217;ve just launched chop-chop.co.uk, and it&#8217;s worth a write-up, as it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://critique-of-pure-reason.com/" title="critique-of-pure-reason.com"><img src="http://static.jamalrob.webfactional.com/images/alistairrobinson.co.uk/screenshot_critique_big.png" /></a><br />
<a href="http://critique-of-pure-reason.com/" rel="external">critique-of-pure-reason.com</a></p>
<p>I haven&#8217;t been blogging here much because I&#8217;ve been doing it over at my philosophy blog, <a href="http://critique-of-pure-reason.com/" rel="external">critique-of-pure-reason.com</a>. Go take a look and leave a comment, if you&#8217;re into that sort of thing. If you&#8217;re here for web development&#8230;I really should write something soon. I&#8217;ve just launched <a href="http://www.chop-chop.co.uk/" rel="external">chop-chop.co.uk</a>, and it&#8217;s worth a write-up, as it&#8217;s my first large project using Django &#8211; But I may wait until I&#8217;ve done the reservations system. Here&#8217;s a screenshot:</p>
<p><a href="http://www.chop-chop.co.uk/" title="chop-chop.co.uk"><img src="http://static.jamalrob.webfactional.com/inventive/images/screenshot_chopchop_big.png" /></a></p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/BJK1mRSYjrk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/you-might-like-to-try/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/you-might-like-to-try/</feedburner:origLink></item>
		<item>
		<title>Granular Convection Can Improve Your Life</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/Z_wmgRsBvQM/</link>
		<comments>http://alistairrobinson.co.uk/granular-convection-can-improve-your-life/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 17:21:20 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[food]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[brazil nut]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[granular]]></category>
		<category><![CDATA[muesli]]></category>
		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=983</guid>
		<description><![CDATA[Every morning, when I have my fruit-filled nut-rich luxury muesli (with dollops of greek yoghurt and plenty of honey), I shake the box rhythmically from side-to-side before pouring it into the bowl. As a result, I get the biggest, tastiest, juiciest bits, and avoid the dust. I&#8217;ve been using this technique ever since, as a [...]]]></description>
			<content:encoded><![CDATA[<p>Every morning, when I have my fruit-filled nut-rich luxury muesli (with dollops of greek yoghurt and plenty of honey), I shake the box rhythmically from side-to-side before pouring it into the bowl. As a result, I get the biggest, tastiest, juiciest bits, and avoid the dust. I&#8217;ve been using this technique ever since, as a child, I saw a television programme &#8211; maybe it was the great Johnny Ball &#8211; explaining <strong>granular convection</strong>, otherwise known as the Brazil nut effect. When you vibrate a granular material, the big bits rise to the top.</p>
<p>Ever since I learned about it I&#8217;ve made use of it in everyday life, increasingly without thinking about it; but it&#8217;s not something I would necessarily have picked up anyway. It&#8217;s not intuitive: <em>I had to be told about it</em>. It&#8217;s a different kind of thing from hitting a nail with a hammer, because it requires the application of a counter-intuitive principle; and yet just like using a hammer it becomes a part of my complement of skills and tools. Actually, perhaps it&#8217;s more that it&#8217;s a <em>mental</em> tool, as opposed to the hammer, which is physical. A hammer requires conscious use, but it requires no conscious application of scientific knowledge. We intimately <em>know</em> the physics of a hammer blow, but some phenomena, like granular convection, are remote from us: they are not built into our bodies.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/c3p3VMNpWGw?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/c3p3VMNpWGw?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>In this video, the guy is demonstrating the effect with exactly the same muesli that I eat every morning. It&#8217;s ideal for the purposes of a demo because it&#8217;s full of brazil nuts. But he&#8217;s doing it wrong &#8211; all you have to do is shake it gently from side to side &#8211; so I&#8217;m sceptical about his explanation of how it works.</p>
<p>I&#8217;ve come to regard it as quite ordinary, but there is more to it than first appears. The particles actually divide and circulate in a flowing motion, very much like liquid convection. I don&#8217;t know how it works. But then, nobody really does.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/Z_wmgRsBvQM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/granular-convection-can-improve-your-life/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/granular-convection-can-improve-your-life/</feedburner:origLink></item>
		<item>
		<title>Enlightenment Bullshit</title>
		<link>http://feedproxy.google.com/~r/alistairrobinson/~3/JzbieObalpY/</link>
		<comments>http://alistairrobinson.co.uk/enlightenment/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 01:17:07 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[descartes]]></category>
		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://alistairrobinson.co.uk/?p=981</guid>
		<description><![CDATA[I&#8217;m in the middle of a large Django project, my first one using the framework. It&#8217;s bloody wonderful, it really is. I don&#8217;t understand why Django developers aren&#8217;t going on about it more &#8211; about how lovely it is to work with. Developing web sites in Django is a beauty-full experience. I didn&#8217;t know it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the middle of a large <a href="http://en.wikipedia.org/wiki/Django_(web_framework)">Django</a> project, my first one using the framework. It&#8217;s bloody wonderful, it really is. I don&#8217;t understand why Django developers aren&#8217;t going on about it more &#8211; about how <em>lovely</em> it is to work with. Developing web sites in Django is a <em>beauty-full</em> experience. I didn&#8217;t know it could be like this. I don&#8217;t know what it&#8217;s like to find Enlightenment in the way the Buddha talks about it, and I don&#8217;t even really know what it&#8217;s like to meditate, but this approaches what I imagine they mean.</p>
<h3>Pony-Powered Enlightenment Bullshit</h3>
<p>This sounds like bullshit, of course, and I confess I&#8217;m spinning this out more than is warranted, but there is an immense calm, neatness and harmony about developing with Django. Everything&#8217;s at <em>just</em> the right level; everything fits together in <em>just </em> the right way. Everything&#8217;s in the right place, everything&#8217;s in nice little pieces that fit together like a jigsaw.</p>
<p>You know when you read a textbook and you get the feeling that the author knows exactly what you&#8217;ll have trouble with? Or a teacher who always seems to be able to anticipate your difficulties. Well that&#8217;s what it&#8217;s like to work in Django. There have been countless occasions where I have exclaimed, after a bit of struggling, &#8220;oh, you mean I can just do this!&#8221; Just where you need it to be, it&#8217;s all done for you. You know the bits I mean: the tedious shit. The painful repeated Ctrl-C Ctrl-V crap that you go through every time you do a form.</p>
<p>Django is high-level, <em>but in a low-level way</em>. There&#8217;s no fucking about with shitty interfaces, arcane meta-languages and strange customs, just to put a website up that has editable content; there&#8217;s none of the horrible <em>mess</em> of PHP; there&#8217;s no need to download three thousand PHP files and work with a horribly complex interface just to set up a <em>wee blog for God&#8217;s sake</em>. With Django, you build things up yourself, in just the way you want. If you think this sounds like a lot of work, it&#8217;s not &#8211; it&#8217;s way <em>less</em> work, because Django knows roughly the kind of things you&#8217;ll be doing. </p>
<p>I confess that I never got around to trying a <em>PHP</em> MVC framework. No doubt all this great stuff I&#8217;m talking about is largely owing to the general MVC pattern, rather than to Django itself &#8211; but I&#8217;m not so sure. Django&#8217;s helper classes, such as forms, make the <em>whole</em> web development experience fun. Anyway, it&#8217;s so much nicer to write in Python.</p>
<h3>Demon-Driven Enlightenment Bullshit</h3>
<p><img src="http://static.jamalrob.webfactional.com/images/alistairrobinson.co.uk/screenshot_critique_big.png" alt="critique-of-pure-reason.com" /></p>
<p>(This section doesn&#8217;t have much bullshit in it actually, but I couldn&#8217;t stand to leave the first two titles unbalanced.)</p>
<p>I&#8217;ve been blogging over at my philosophy blog, <a href="http://critique-of-pure-reason.com/">critique-of-pure-reason.com</a>, which is why this is the first post here for a long &#8211; shit, it&#8217;s October already! That blog and the studies from whence its content sprouts have been taking up a lot of my time. Right now I&#8217;m studying scepticism, in particular Descartes, who <a href="http://en.wikipedia.org/wiki/Meditations_on_First_Philosophy">suggested</a> that for all I know I might be dreaming at this moment, or I might be the victim of a malicious deceiver demon who is creating all of my perceptions for me; so I cannot take my perceptions for what they seem to be, and so I have no ground for the belief that I am sitting at my computer writing; even though I bloody well <em>know </em> I&#8217;m not dreaming.</p>
<p>Now, you would think that &#8220;I bloody well <em>know</em> I&#8217;m not dreaming&#8221; would be absolutely inadmissable in philosophy, but most answers to Descartes seem to be saying something similar, especially those from Moore and Wittgenstein. Anyway, that&#8217;s enough of that. This is neither the time nor the place. <a href="http://critique-of-pure-reason.com/"><em>This</em> is the place if you&#8217;re interested</a>. I did the blog engine from scratch in Django, by the way. Have I mentioned how much I like Django? Come to think of it though, the site&#8217;s sadly lacking in navigation, categories, tags and all that. Well, I did it over a single weekend so what do you expect?</p>
<p>So I&#8217;ve been staying up till all hours poring over philosophical papers from the journal <em>Mind</em>, just trying to prove that I&#8217;m not dreaming. It&#8217;s not as fruitless as it sounds though: mountains and valleys of thought are appearing from over the horizon. I&#8217;m moving ever nearer, exploring the foothills on my way to the dizzy precipices of [insert more bullshit here].</p>
<h3>Not Enough Hours</h3>
<p>And that&#8217;s not to mention all the music: saxophone, piano, theory and composition. And the maths. I&#8217;m working through a book of undergraduate mathematics, and Euclid&#8217;s Elements &#8211; oh and I&#8217;m half-way through a textbook on logic. Am I insane? Is this whole paragraph a cliché? I think it is you know. Fuck.</p>
<img src="http://feeds.feedburner.com/~r/alistairrobinson/~4/JzbieObalpY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://alistairrobinson.co.uk/enlightenment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/enlightenment/</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 [...]]]></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 at the wonderful absurdity of my situation.</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 [...]]]></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 [...]]]></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 [...]]]></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>8</slash:comments>
		<feedburner:origLink>http://alistairrobinson.co.uk/e-commerce-in-the-uk-for-web-designers/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.181 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-02-10 15:51:43 -->

