<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Xophmeister&#039;s World</title>
	<atom:link href="http://xoph.co/feed/" rel="self" type="application/rss+xml" />
	<link>http://xoph.co</link>
	<description>Renaissance Blog</description>
	<lastBuildDate>Wed, 22 Feb 2012 09:41:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>你好</title>
		<link>http://xoph.co/20120216/ni-hao/</link>
		<comments>http://xoph.co/20120216/ni-hao/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 21:20:34 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Phonetics and Phonology]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[中文]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=668</guid>
		<description><![CDATA[My other half is Chinese, so naturally I am learning Mandarin &#8212; and some Shanghainese &#8212; from her. (What can I say: I&#8217;m the scholarly type and she&#8217;s a good teacher!) Anyway, like, I&#8217;m sure, many a Westerner embarking on &#8230; <a href="http://xoph.co/20120216/ni-hao/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My other half is Chinese, so naturally I am learning Mandarin &#8212; and some Shanghainese &#8212; from her. (What can I say: I&#8217;m the scholarly type and she&#8217;s a good teacher!) Anyway, like, I&#8217;m sure, many a Westerner embarking on learning a tonal language, I find it difficult to properly modulate my voice: so let me share a phonetic technique that I&#8217;ve developed!</p>
<p>Try to retract the base of your tongue, flattening and broadening the back, while speaking. This has a three-fold effect, conducive to speaking Chinese:</p>
<ul>
<li>By tensing the muscle, you have slightly more control over your tongue, so you can move it more agilely. This is necessary for the quick response required when changing tones.</li>
<li>Retracting the tongue opens the oral cavity, giving more potential to change your voice&#8217;s frequency and hence produce the different tones.</li>
<li>A bonus effect is that doing this puts the tip of your tongue in a better place to produce the many sibilant and retroflex sounds which are common in Mandarin.</li>
</ul>
<p>Having said all that, I&#8217;m still pretty bad at it! I find it particularly difficult to do falling tones at the beginning of words. (I cannot say 姐姐 to save my life!) My guess as to why this might be is because, while English obviously doesn&#8217;t have tones, an intonation pattern is manifested through stress, giving &#8212; as English usually stresses the first syllable &#8212; a rising tonal quality.</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20120216/ni-hao/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Friend Lily</title>
		<link>http://xoph.co/20120208/my-friend-lily/</link>
		<comments>http://xoph.co/20120208/my-friend-lily/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 22:28:31 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Linguistics]]></category>
		<category><![CDATA[Syntax]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=662</guid>
		<description><![CDATA[Here&#8217;s a curious bit of syntax. I make the following grammaticality judgements: I made it friendly. I made something. That thing is friendly. I made it friendlily. I made something. I did so in a friendly manner. * I wrote &#8230; <a href="http://xoph.co/20120208/my-friend-lily/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a curious bit of syntax.<br />
<span id="more-662"></span><br />
I make the following grammaticality judgements:</p>
<ol>
<li>I made it friendly.<br />
<em>I made something. That thing is friendly.</em></li>
<li>I made it friendlily.<br />
<em>I made something. I did so in a friendly manner.</em></li>
<li>* I wrote it friendly.</li>
<li>I wrote it friendlily.<br />
<em>I wrote something. That thing is friendly. ≫ I wrote something. I did so in a friendly manner.</em></li>
</ol>
<p><em>Friendlily</em> is a bit of an unusual word, but it is a legitimate adverb. What&#8217;s strange is that in my usage in (4), my default reading is that of an adjective; whereas the adverbial reading is marked. Stranger still is that when using the real adjective &#8212; <em>friendly</em> &#8212; I find this ungrammatical; or, at best, barely acceptable. I can correct (3), according to my grammar, by adding an infinitival copula or by being (presumably) explicit about the semantic selection:</p>
<ul>
<li>I wrote it <em>to be</em> friendly.</li>
<li>I wrote it <em>in a</em> friendly style.</li>
</ul>
<p>However, paradoxically, this has changed the semantics. Something along the lines of, &#8220;I wrote something. I did so to be friendly.&#8221; This is particularly true in the first example, whereas the binding in the second example is ambiguous; both err towards the adverbial reading.</p>
<p>What&#8217;s going on here? Why does <em>make</em> work as you&#8217;d expect, but <em>write</em> doesn&#8217;t? (Indeed, it seems that most verbs don&#8217;t work.) Why is it that, if you change <em>it</em> to something non-pronominal, it fixes things:</p>
<ul>
<li>I wrote something friendly.<br />
<em>I wrote something. That thing is friendly.</em></li>
<li>I wrote something friendlily.<br />
<em>I wrote something. I did so in a friendly manner.</em></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20120208/my-friend-lily/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The World&#8217;s Prose Mix</title>
		<link>http://xoph.co/20120123/the-worlds-prose-mix/</link>
		<comments>http://xoph.co/20120123/the-worlds-prose-mix/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 15:07:35 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Ethnography]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=552</guid>
		<description><![CDATA[According to Wikipedia, at the time of writing there are a total of 205 sovereign states; including those that are disputed. That&#8217;s at least 205 different cultures, so the question is: Are there any concentrations of peoples in the world &#8230; <a href="http://xoph.co/20120123/the-worlds-prose-mix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://en.wikipedia.org/wiki/List_of_sovereign_states">Wikipedia</a>, at the time of writing there are a total of 205 sovereign states; including those that are disputed. That&#8217;s <em>at least</em> 205 different cultures, so the question is: Are there any concentrations of peoples in the world that represent all of these? If I were to look, the first places which I&#8217;d examine are the so called <a href="http://en.wikipedia.org/wiki/Global_city">&#8220;Global Cities&#8221;</a>. The most prominent and, anecdotally, most diverse of which being London and New York City.</p>
<p>Now, suppose we can select 205 people from one of these cities, each representing their own home country, what now? Well, we&#8217;re all human and we all have stories, flavoured by our cultural heritage; so we write! That is, we set up a <a href="http://en.wikipedia.org/wiki/Round-robin_story">round-robin story</a> where everyone in our group gets an equal share (e.g., a page each).</p>
<p>Potentially, all our authors would write in their own language, so we&#8217;d need a cohort of translators so everyone understands what&#8217;s going on, as well as producing a coherent end product. Furthermore, some kind of editorial control would need to be exercised, that steers and plans the characters and plot; however, beyond that, creative freedom is afforded to our authors.</p>
<p>An alternative &#8212; although much more ambitious &#8212; idea would be to focus on linguistic diversity, rather than sovereign cultures. This pushes the number of potential contributors through the roof and, with it, the potentially impossible task of translation! (Let alone the logistical burden of finding volunteers across the world.) Therefore, instead of writing a round-robin story, how about a dialogue-free film, where each person acts as screenwriter and co-director for a scene?</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20120123/the-worlds-prose-mix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apostrophe&#8217;s War</title>
		<link>http://xoph.co/20120116/apostrophes-war/</link>
		<comments>http://xoph.co/20120116/apostrophes-war/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 10:45:18 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Linguistics]]></category>
		<category><![CDATA[Orthography and Grammatology]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=582</guid>
		<description><![CDATA[With a title like &#8220;Apostrophe&#8217;s War&#8221;, you&#8217;ll be forgiven in thinking that this is yet another trite rant on the supposed abuse of the apostrophe in contemporary written English. However, those who know me as a linguist may think I &#8230; <a href="http://xoph.co/20120116/apostrophes-war/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With a title like &#8220;Apostrophe&#8217;s War&#8221;, you&#8217;ll be forgiven in thinking that this is yet another trite rant on the supposed abuse of the apostrophe in contemporary written English. However, those who know me as a linguist may think I am writing to counter this barbarian prescriptivism with scientific purity.</p>
<p>No and no!<br />
<span id="more-582"></span><br />
Many will be familiar with the notion of &#8220;Grammar Nazis&#8221;: a cohort of lunatics and those whom have too much time on their hands who believe that proper English usage is that which has been passed on to them through hallowed, Victorian texts. Immutable laws that afford derision towards anyone who doesn&#8217;t adhere!</p>
<p>Of course, these laws are largely bullshit. They were derived from, what was considered at the time, the pure languages of the classical world: Latin and Ancient Greek. Things like, &#8220;don&#8217;t split infinitives&#8221; and &#8220;you can&#8217;t end a sentence with a preposition&#8221;. These processes, if they can be done at all, lead to ungrammaticality in these languages; but English is not Latin or Ancient Greek. Of course, it borrows a lot and shares its ancestry with their Indo-European roots, but the point about language is that it is not immutable. There is a notion of grammaticality &#8212; you can&#8217;t just randomly string words together &#8212; but it is much more subtle and innate than these prescriptive rules abide. Language is a fluid, living entity.</p>
<p>So what about the humble apostrophe?</p>
<p>Well, in <em>written</em> English, the apostrophe is used in several circumstances: it indicates possession (i.e., a genitive case marker, of sorts) and also contraction (morphosyntactic elision). The confusion comes when both of these effects are applied simultaneously, or with plurals, which share a morpheme. For example, this infamously occurs with pronouns: &#8220;its&#8221; is the possessive form of &#8220;it&#8221;, whereas &#8220;it&#8217;s&#8221; is short for &#8220;it is&#8221;; given that that genitive usage is perhaps more marked, this is a mistake familiar to any English teacher, proofreader and editor alike!</p>
<p>This misuse is what upsets people. There&#8217;s even an &#8220;<a href="http://www.apostrophe.org.uk/">Apostrophe Protection Society</a>&#8221; for the truly militant! A recent article on <a href="http://languagelog.ldc.upenn.edu/nll/?p=3703">Language Log</a>, however, highlights how misinformed this attitude is. The author makes the point very well by countering the argument with numerous and esteemed counterexamples and, importantly, without turning it into an argument between prescriptivists and descriptivists. Allow me to build on this:</p>
<p>From a morphological and phonological point-of-view, it is clear that the genitive morpheme is identical to the plural morpheme and the contracted copula. That is, for example, you can&#8217;t disambiguate between &#8220;dogs&#8221; [dɒgz] and &#8220;dog&#8217;s&#8221; [dɒgz], nor &#8220;its&#8221; [ɪts] and &#8220;it&#8217;s&#8221; [ɪts]. Syntactically, however, we can easily make a distinction based on the local context: our aforementioned innate ability to parse a sentence&#8217;s grammatical structure.</p>
<p>You&#8217;ll have noticed that I emphasised &#8220;written English&#8221; above: this wasn&#8217;t an accident! We thus see the point that the apostrophe is nothing more than an orthographic convention &#8212; merely part of the writing system &#8212; used to disambiguate between the various, overloaded forms. Just as commas are used to hint at prosodic phrase boundaries, its purpose is to make assimilating linguistic information in written form (i.e., reading) easier through consistency.</p>
<p>So now, back to the argument against apostrophe misuse. Personally, I would have to agree: not from a linguistic point-of-view, but from the belief that orthographic conventions, even those as bizarre as English&#8217;s, aren&#8217;t an inherently bad thing. By using a common style &#8212; spelling and punctuation &#8212; we can help to ensure comprehensibility and understanding in writing.</p>
<p>Of course, it&#8217;s not unto me (nor anyone) to say what is orthographically right and wrong. It, like any aspect of linguistics, must be allowed to evolve organically: in Shakespeare&#8217;s time, as the Language Log article demonstrates, apostrophes were not used; nowadays, they are expected, but seemingly in decline. The momentum of the corpus is of course a factor &#8212; writing systems obviously change more slowly than natural, spoken language &#8212; but change is indeed inevitable.</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20120116/apostrophes-war/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Endianness</title>
		<link>http://xoph.co/20120110/endianness/</link>
		<comments>http://xoph.co/20120110/endianness/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 13:59:14 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Orthography and Grammatology]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=571</guid>
		<description><![CDATA[In computer science, there&#8217;s a concept known as &#8220;endianness&#8221;. It refers to the order in which data is stored: &#8220;big endian&#8221; means that we start with the most significant bit and move to the least; &#8220;little endian&#8221; is the other &#8230; <a href="http://xoph.co/20120110/endianness/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In computer science, there&#8217;s a concept known as &#8220;endianness&#8221;. It refers to the order in which data is stored: &#8220;big endian&#8221; means that we start with the most significant bit and move to the least; &#8220;little endian&#8221; is the other way around. For example, the decimal number 123, in 8-bits, can be represented as either 01111011 (<img src='http://s0.wp.com/latex.php?latex=2%5E6+%2B+2%5E5+%2B+2%5E4+%2B+2%5E3+%2B+2%5E1+%2B+2%5E0&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='2^6 + 2^5 + 2^4 + 2^3 + 2^1 + 2^0' title='2^6 + 2^5 + 2^4 + 2^3 + 2^1 + 2^0' class='latex' />) in big endian, or 11011110 (<img src='http://s0.wp.com/latex.php?latex=2%5E0+%2B+2%5E1+%2B+2%5E3+%2B+2%5E4+%2B+2%5E5+%2B+2%5E6&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='2^0 + 2^1 + 2^3 + 2^4 + 2^5 + 2^6' title='2^0 + 2^1 + 2^3 + 2^4 + 2^5 + 2^6' class='latex' />) in little. There are engineering reasons as to why one would choose one representation over the other.</p>
<p>Human, rather than binary encoded data often &#8212; at least from my anecdotal experience &#8212; follow the big endian model. For example, while this may be an artefact of the technology behind it, phone numbers follow a pattern like &#8220;country, area, number, extension&#8221;. Arguably, it&#8217;s much more logical as the most important part comes first, then tailing off. However, there are a number of inconstancies in some widely used formats; perhaps arising from the definition of &#8220;most important&#8221; differing from a purely quantitative scale.<br />
<span id="more-571"></span></p>
<h1>Examples</h1>
<h2>Time and Date</h2>
<p>In British English, we say the date as &#8220;day of the month, month, year&#8221;: today is 10<sup>th</sup> January, 2012. This is little endian as the year is the category that has the most weight. Paradoxically, time (as in the time of day) is expressed in big endian: &#8220;hours, minutes, seconds, etc.&#8221;. Time of day and date are both forms of time &#8212; indeed, the date can be seen as the next order of magnitude, after time of day &#8212; so why the mix?</p>
<p>Presumably, this is because the time of day and date are not often expressed simultaneously, in every day conversation, and because we (or, at least, the British) have different priorities when referring to each. That is, it&#8217;s more important to know the day &#8212; something one tends to forget &#8212; over the year.</p>
<p>Of course, in other cultures, we see different models. Chinese, as we shall see in the next section, is consistently big endian: the (Western) date is expressed in the form &#8220;2012年1月10日&#8221;, the same order as time. This is also the format taken by the ISO, the International Standards Organisation, in <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>.</p>
<p>Then there&#8217;s US English, to really muddle things, which expresses the date as &#8220;month, day of the month, year&#8221; (e.g., January 10<sup>th</sup>, 2012). This ordering is grossly inconsistent &#8212; it&#8217;s neither big nor little endian &#8212; and my only assumption behind its inception is some kind of prescriptive or stylistic custom.</p>
<h2>Postal Addresses</h2>
<p>When we send a letter, in the West, the person we send it to is the most important, followed by their home, town, region and country. With the exception of postal codes, which are usually appended near the end of the address as a mechanical routing aid, this little endian format is ubiquitous.</p>
<p>In China, however, it&#8217;s written the other way around: the country comes first, reducing finally to the recipient&#8217;s name. At first glance, the big endian format appears to be a tad impersonal. Perhaps, but think how much easier it is for the postal service to route: they can look at the first line and know which district to send it to, then that district office can forward it to the appropriate city by reading the next line, continuing the process until we reach our destination. In a country the size of China, the big endian format could well speed up delivery time; which doesn&#8217;t seem so impersonal, after all!</p>
<h2>Domain Names, URLs and E-Mail Addresses</h2>
<p>Again, these examples are somewhat biased by their technological underpinnings, but bear with me!</p>
<p>The domain name system is little endian: the top level domain (<code>.</code>) comes at the right and we traverse downwards by writing leftwards. For example, in <code>xoph.co</code>, <code>.xoph</code> is a subdomain of <code>.co</code>, which sits below the root. Again, this is probably because the lower nodes in the domain tree are &#8220;more important&#8221;, in human terms, than the umbrella levels: You don&#8217;t care about <code>.co</code> &#8212; nothing sits there, anyway &#8212; but the <code>.xoph</code> subdomain is where things get interesting. This is also the way in which we, at least in English, read: e.g., the Amazon company, in the UK (<code>amazon.co.uk</code>), or the mail server at the Wikipedia organisation (<code>mail.wikipedia.org</code>), etc.</p>
<p>However, then it&#8217;s mixed into the big endian URL system, which starts with the domain name &#8212; which itself is in little endian but is the most significant part of the URL &#8212; followed by an increasingly variegated filesystem path. E-mail addresses, on the other hand, preserve the little endianness of the domain name only if the account name, which is largely arbitrary, maintains little endianness: e.g., <code>j.doe@example.com</code> is little endian, but <code>doej@example.com</code> is mixed.</p>
<h2>Bookshelves</h2>
<p>If you read from left-to-right, the front cover of a book is the left side and you progress through. When you&#8217;re done, you put your book on the shelf and, because the spine faces outwards, the front of the book is now on the right-hand-side. This effect is compounded with multiple volumes, which would be stacked left-to-right, but whose contents (from the perspective of someone looking at them in a bookshelf) are now mixed endian.</p>
<p>This effect isn&#8217;t limited to left-to-right writing systems. Right-to-left would have the same problem, just that everything is in the opposite direction. The only possible exception I can think of, when limited to horizontal writing systems, is modern Japanese: this is usually written left-to-right (like English), but starts on the far-right page (what a Westerner would call the last page) and works its way leftwards (towards the Western front page). Thus, when shelved, endianness is monotonic; but, of course, at the expense of a mixed endian page order!</p>
<p>The change in orientation, when shelving, means that we must always have mixed endianness somewhere, in this situation!</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20120110/endianness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>D Quine</title>
		<link>http://xoph.co/20111229/d-quine/</link>
		<comments>http://xoph.co/20111229/d-quine/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 18:07:36 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[D]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=555</guid>
		<description><![CDATA[I have taken it upon myself to learn the D programming language: My motivation for doing so is involved, but bear with me! What passes for &#8220;software development&#8221; at my day job is perhaps closer akin to herding kittens. I &#8230; <a href="http://xoph.co/20111229/d-quine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have taken it upon myself to learn the <a href="http://dlang.org/">D programming language</a>: My motivation for doing so is involved, but bear with me!<br />
<span id="more-555"></span></p>
<ul>
<li>What passes for &#8220;software development&#8221; at my day job is perhaps closer akin to herding kittens. I need something more sophisticated to realise my ideas.</li>
<li>I like C &#8212; it&#8217;s the only &#8220;proper language&#8221; I know &#8212; and it obviously has a lot of inertia behind it, but the above point has made me rather lazy! To this end, whilst I&#8217;ve been procrastinating about it for the best part of a decade, learning C++ now (but not necessarily never) more comprehensively is also off the cards.</li>
<li>I don&#8217;t, for entirely anecdotal reasons, like Java. Besides, I want a systems language &#8212; so Python et al. are also out &#8212; where I can get my hands dirty (or, proverbially, &#8220;wield the chainsaw&#8221;) if needs be. The same goes for the likes of Objective-C and, especially, C#; despite the effect they would have on my employability!</li>
</ul>
<p>D&#8217;s design seems to fit these parameters and its agenda of cleanly implementing modern and interdependent development models has piqued my curiosity. While it may still be considered a tad &#8220;obscure&#8221;, with its rich community and backing from programming heavyweights, I feel in safe hands!</p>
<p>(n.b., The correspondence with my other half&#8217;s first initial, while an added bonus, didn&#8217;t affect my decision!)</p>
<p>Anyway, as such, as part of my autodidactic endeavour, I have written a quine in D. That is, for those not in the know, a programme whose only function is to output its own source code:</p>
<pre class="brush: d; gutter: true">import std.stdio;

void main() {
  char q = 34;
  string[] quine = [
    &quot;import std.stdio;&quot;,
    &quot;&quot;,
    &quot;void main() {&quot;,
    &quot;  char q = 34;&quot;,
    &quot;  string[] quine = [&quot;,
    &quot;    &quot;,
    &quot;    ];&quot;,
    &quot;&quot;,
    &quot;  for(auto i = 0; i &lt; 5; i++)&quot;,
    &quot;    writeln(quine[i]);&quot;,
    &quot;  for(auto i = 0; i &lt; quine.length; i++)&quot;,
    &quot;    writeln(quine[5], q, quine[i], q, &#039;,&#039;);&quot;,
    &quot;  for(auto i = 6; i &lt; quine.length; i++)&quot;,
    &quot;    writeln(quine[i]);&quot;,
    &quot;}&quot;,
    ];

  for(auto i = 0; i &lt; 5; i++)
    writeln(quine[i]);
  for(auto i = 0; i &lt; quine.length; i++)
    writeln(quine[5], q, quine[i], q, &#039;,&#039;);
  for(auto i = 6; i &lt; quine.length; i++)
    writeln(quine[i]);
}</pre>
<p>A simple <code>diff</code> confirms the result and it&#8217;s a little more interesting than &#8220;Hello, World!&#8221;. That said &#8212; I&#8217;ll be honest &#8212; all I&#8217;ve done here is translate the Java quine, on <a href="http://en.wikipedia.org/wiki/Quine_(computing)#Example">Wikipedia</a>, into D; not exactly the greatest of challenges. As such, perhaps I will work on a more original version to redeem myself!</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20111229/d-quine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sanitising with Insanity</title>
		<link>http://xoph.co/20111215/sanitising-with-insanity/</link>
		<comments>http://xoph.co/20111215/sanitising-with-insanity/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 14:26:28 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Day Job]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Developer]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=548</guid>
		<description><![CDATA[I do a lot of hacking around in an Oracle database and my chosen tool to interrogate the data is Oracle SQL Developer. Sometimes, I have to transfer the contents of one table into another schema and, because I don&#8217;t &#8230; <a href="http://xoph.co/20111215/sanitising-with-insanity/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I do a lot of hacking around in an Oracle database and my chosen tool to interrogate the data is <a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html">Oracle SQL Developer</a>. Sometimes, I have to transfer the contents of one table into another schema and, because I don&#8217;t have the necessary permissions, I have to do this by taking a script backup and then restoring it (i.e., running it against the other schema).</p>
<p>Unfortunately, SQL Developer&#8217;s SQL backups cannot, in general, be run without modification to restore successfully. As such, because I have been learning to use my editor of choice more powerfully, I have written a <a href="http://vim.org/">VIM</a> macro to sanitise SQL Developer&#8217;s output.<br />
<span id="more-548"></span></p>
<h1>Implementation</h1>
<p>In SQL Developer, you can export a record set to a SQL script. This process generates a straightforward script of <code>insert</code> statements. Unfortunately, this cannot necessarily be run from within SQL Developer because, if any <code>&amp;</code> character appears in a string, SQL Developer considers this as a prompt for user input! As such, we have to replace all these <code>&amp;</code>s with the string concatenated with its ASCII equivalent: <code>chr(38)</code>.</p>
<p>Moreover, the SQL Developer output enquotes the table name in the <code>insert</code> statements, which it subsequently doesn&#8217;t recognise. So we also have to mitigate against this! Finally, as we are using these scripts to do a backup-restore process, the original table data should first be purged and the newly inserted transactions committed.</p>
<p>We can do this by executing the following VIM macro:</p>
<pre class="brush: text; gutter: true">:%g/\v('|")([^\1]{-})\1/:s/\v('|")([^\1]{-})\&amp;([^\1]{-})\1/\1\2\1||chr(38)||\1\3\1/g
:%s/\v('|")\1\|\|([^|\1]{-})\|\|\1\1/\2/g
2ggwwlviw"ayggOtruncate table ^[pA;
^[:exe '%s/\(''\|"\)\('.@a.'\)\1/\2/g'
Go
commit;</pre>
<p>If this code is, say, yanked into register <code>q</code>, it can be called in normal mode by running <code>@q</code>. (Note that <code>^[</code> is the escape character: this can be entered, in insert mode, by typing Ctrl+V &#8212; Ctrl+Q in Windows &#8212; followed by Esc.) Now let me try to explain how this garbled mess of VIM commands works!</p>
<p>The first line uses VIM&#8217;s <code>global</code> command to find quoted strings. That is, strings that begin with either a quote or double-quote mark, then followed by any number of characters (apart from the original quote character) and then the closing quote. We use <code>very magic</code> to avoid excessive backslashes. Then, with these matched patterns, we check if they contain an <code>&amp;</code> symbol internally: if they do, we use the <code>substitute</code> command to replace them with a respectively enquoted <code>||chr(38)||</code>.</p>
<p>The reason why we use the <code>global</code> command, here, as well as a lazy regular expression is because, despite my logic, it didn&#8217;t work the other way around. A greedy expression matched too much, even though it was told not to, and a normal substitution didn&#8217;t match multiple hits per line, again even though it was told otherwise.</p>
<p>Anyway, for example:</p>
<pre class="brush: text; gutter: true">"foo &amp; bar" 'foo &amp; bar"
'bar &amp; foo'
'&amp;'</pre>
<p>&#8230;will magically transform to:</p>
<pre class="brush: text; gutter: true">"foo "||chr(38)||" bar" 'foo &amp; bar"
'bar '||chr(38)||' foo'
''||chr(38)||''</pre>
<p>Note that it doesn&#8217;t match unbalanced quotes and, in the case of a single <code>&amp;</code> character, we end up concatenating with empty strings. This is fixed in the second line of the macro, which simply cleans up these redundancies.</p>
<p>The third line does the following:</p>
<ul>
<li>Go to the second line in the file (<code>2gg</code>). This is because, in the SQL Developer output, the first line is a comment and so the <code>insert</code> statements don&#8217;t start until line two.</li>
<li>We then move the the beginning of the table name in the <code>insert</code> statement. This is done by passing over the first two words (<code>ww</code>) &#8212; <code>insert</code> and <code>into</code> &#8212; and then moving one character to the right (<code>l</code>), because the table name is in quotes.</li>
<li>Moving into visual mode, we select the word under the cursor (<code>viw</code>). This is the table name, which we then yank into register <code>a</code> (<code>"ay</code>).</li>
<li>Next we go to the beginning of the file (<code>gg</code>), open up a line above it (<code>O</code>) and insert the SQL statement to delete current table data: <code>truncate table</code>. We then switch back into normal mode to put the contents of register <code>a</code> (<code>p</code>) at the cursor position, appended (<code>A</code>) with a semi-colon.</li>
</ul>
<p>The following line is a bit of VIM metaprogramming! We can&#8217;t use the contents of a register as a search pattern, so we have to dynamically write the VIM command and execute it with <code>:exe</code>. This <code>substitution</code> replaces the enquoted table name with just bare table names, using the contents of register <code>a</code>.</p>
<p>Finally, in the last two lines of the macro, we move to the end of the file and open up a new line, below. We then insert the SQL <code>commit</code> statement and we&#8217;re done!</p>
<h1>Demonstration</h1>
<p>Here&#8217;s an example of SQL Developer&#8217;s output:</p>
<pre class="brush: plsql; gutter: true">REM INSERTING into myTable
Insert into "myTable" (TEXT) values ('foo &amp; bar');
Insert into "myTable" (TEXT) values ('&amp;');</pre>
<p>&#8230;and here&#8217;s what my macro will do to it, ready to run as a restoration script against any schema containing the appropriate table definition from within SQL Developer:</p>
<pre class="brush: plsql; gutter: true">truncate table myTable;

REM INSERTING into myTable
Insert into myTable (TEXT) values ('foo '||chr(38)||' bar');
Insert into myTable (TEXT) values (chr(38));

commit;</pre>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20111215/sanitising-with-insanity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zeitgeist</title>
		<link>http://xoph.co/20111130/zeitgeist/</link>
		<comments>http://xoph.co/20111130/zeitgeist/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 11:21:43 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=471</guid>
		<description><![CDATA[A short story that will probably get me put on the &#8220;No Fly&#8221; list. Chapter 1 &#8220;We all thought he was crazy. Not crazy; just a bit odd. Quiet and odd: not uncommon afflictions in the sciences.&#8221; The fire in &#8230; <a href="http://xoph.co/20111130/zeitgeist/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A short story that will probably get me put on the &#8220;No Fly&#8221; list.<br />
<span id="more-471"></span></p>
<h1>Chapter 1</h1>
<p>&#8220;We all thought he was crazy. Not crazy; just a bit odd. Quiet and odd: not uncommon afflictions in the sciences.&#8221;</p>
<p>The fire in the makeshift shelter &#8212; a former community hall &#8212; was beginning to dwindle. Dozens of bodies huddled around the dying embers as the winter encroached, outside. It had been a particularly wet autumn and the atmosphere was one of apprehension: The lack of suitable fire wood and increasing difficulty in getting food was a growing concern. Marc knew, as well as anyone, that not everyone would make it through the season.</p>
<p>While this was a particularly hard fact to swallow &#8212; less than a year ago, most of those whom he was now boarding with enjoyed affluent and sophisticated 21<sup>st</sup> Century lives &#8212; this was not what was keeping him from sleep. These days, most of the population suffered from insomnia: either confused and haunted by what had happened, or simply terrified of the prevailing lawlessness. Marc, however, had only one thing on his mind: Being in the unenviable position of knowing both how and who had caused all this, what bothered him was &#8220;Why?&#8221;</p>
<p>He turned to his wife; dishevelled, but sleeping comfortably by his side. She was all he had left &#8212; more than many, for the ensuing panic had claimed a great deal of casualties &#8212; and he was glad of her resilience and humility in these peculiar times. Many had lost their senses, but their love held as true as ever. He leant over to hold her, kissed her softly on the forehead and fell asleep.</p>
<h1>Chapter 2</h1>
<p>&#8220;Hey there! It&#8217;s&#8230; err&#8230; Bill, right?&#8221;</p>
<p>An unexceptional looking man glanced up from his lunch, his expression confused between annoyance and fear.</p>
<p>&#8220;Will.&#8221; he responded, in a not unfriendly way.</p>
<p>&#8220;Right! I&#8217;m Marc; we work in the same department.&#8221; He pulled up a nearby chair, &#8220;May I?&#8221;</p>
<p>Will was trained on Marc&#8217;s every move like a hawk, but gestured that he was comfortable with his joining him. Marc was oblivious to the indifference and, either way, didn&#8217;t care: he, as had many, had known of Will since he joined the company, several months earlier; in which time, he had garnered a reputation of being aloof but brilliant. It was Marc&#8217;s nature to seek out such talent &#8212; and Will knew it &#8212; to foster opportunity.</p>
<p>&#8220;Erm&#8230; So, how&#8217;ve you been? How are you getting on here? I&#8217;ve heard great things about you, Will: That aerospace contract, for instance. Wow! You really nailed that one.&#8221;</p>
<p>For the first time in his adult life, Marc didn&#8217;t know how to act: what to say and when to stop. He felt a bit foolish, almost submissive, against Will&#8217;s intensity. It went unnoticed: Will failed to conceal his pride with a coy smile.</p>
<p>&#8220;It was rather good, wasn&#8217;t it? I&#8230;&#8221; he quickly checked himself. &#8220;I shouldn&#8217;t take all the credit, though. All us R&amp;D guys played a part: you can&#8217;t fly a plane on just wings, after all!&#8221;</p>
<p>&#8220;C&#8217;mon, you&#8217;re too modest! I hear your design saved the day.&#8221;</p>
<p>&#8220;Well,&#8221; Will gushed; Marc had won. &#8220;Thanks. I do what I can.&#8221;</p>
<p>Will was clearly not a practised conversationalist and awkward silences followed almost everything he said. He never asked questions nor voiced his opinions, he just mechanically responded when spoken to. It was infuriating for Marc who was forced to keep the exchange going.</p>
<p>&#8220;So?&#8221;</p>
<p>Will, wide eyed, pulled the sandwich from entering his mouth. &#8220;What?&#8221;</p>
<p>&#8220;How are you getting on?&#8221;</p>
<p>&#8220;Erm&#8230; Yeah&#8230; Pretty good, I guess.&#8221;</p>
<p>&#8220;Good, good&#8230;&#8221; Marc&#8217;s voice trailed; he didn&#8217;t know what to say or how to interact with Will. He took a bite from his sandwich and smiled at him.</p>
<p>&#8220;What you got?&#8221;</p>
<p>&#8220;Finally!&#8221; thought Marc; a little &#8216;schoolboy&#8217;, but it&#8217;s a start! &#8220;Just cheese and ham. I can&#8217;t be bothered with all those pretentious fillings.&#8221;</p>
<p>Will laughed, &#8220;Absolutely. Ham and cheese for me!&#8221; Marc smiled, but looked skyward inside. &#8220;You know, the other day they had &#8216;smoked fennel and roasted vegetable couscous&#8217; sandwiches in the shop? How does that work? It boggles the mind!&#8221;</p>
<h1>Chapter 3</h1>
<p>Marc sat with his wife after collecting his breakfast rations. His mind was still elsewhere, but he tried to make light of the situation:</p>
<p>&#8220;Good old gruel! Bland, textureless and only 200 Calories!&#8221;</p>
<p>They both giggled together, but many in the shelter did not see the funny side as murmurs of disapproval radiated from their table. Marc winked at his wife and she smiled sadly.</p>
<p>&#8220;You didn&#8217;t sleep again, last night.&#8221; Marc&#8217;s expression became more serious. &#8220;I can see it in your eyes, sweetie. What&#8217;s wrong? I mean, beyond <em>all this</em>, what&#8217;s wrong?&#8221;</p>
<p>Marc looked down into his gruel with a sigh, his expression now wintered in forlorn. &#8220;I&#8217;m sorry, Jess. I just&#8230; It&#8217;s just that I have a lot on my mind.&#8221;</p>
<p>&#8220;Try me.&#8221;</p>
<p>Marc smiled. &#8220;You remember Will?&#8221;</p>
<p>&#8220;Will? That quiet little weirdo you worked with?&#8221;</p>
<p>&#8220;He did this.&#8221;</p>
<p>&#8220;What?&#8221;</p>
<p>&#8220;<em>This!</em>&#8221; Jess could not decide whether she was not sure what Marc was saying or that she didn&#8217;t want to know. &#8220;Exactly how he told me.&#8221;</p>
<p>&#8220;You&#8217;re not making any sense, Marcus! Snap out of this &#8216;Edgar Allan Poe thing&#8217; you&#8217;ve got going on and <em>tell</em> me!&#8221; Jess always did have a way with words, it was one of the many qualities that Marc loved about her and he smiled again.</p>
<h1>Chapter 4</h1>
<p>&#8220;So back to your aerospace project: I guess those terrorist attacks have really been a blessing in disguise for us. The increased defence budget certainly keeps the wolf from the door!&#8221; Marc tried to raise the conversational bar with his new found friend. He needed to know if his reputation was justified and the gamble paid off:</p>
<p>&#8220;That&#8217;s a bit crass, don&#8217;t you think?&#8221; Will was frowning; it was the first time he had shown any non-trivial emotion. &#8220;Don&#8217;t get me wrong, I appreciate having interesting work, but knowing that I&#8217;m contributing to an increasingly militarised state doesn&#8217;t exactly thrill me. Besides, what about the casualties? Hundreds of innocent people have died, both at the hands of our attackers and now in the wake of our retribution.&#8221;</p>
<p>&#8220;It&#8217;s just the way the world is now. After 9/11 and the 7/7 attacks, here in London, people are scared. Whoever&#8217;s in charge had to do something proactive and, I&#8217;m just saying, it&#8217;s a means to an end.&#8221;</p>
<p>&#8220;Since when did the end justify the means? There were plenty of better ways for our governments to respond, but the people are hungry for blood and the people are idiots!&#8221;</p>
<p>&#8220;What do you mean?&#8221; Marc had obviously struck a nerve and was interested in digging deeper.</p>
<p>&#8220;Panic. Fear. Hysteria. Propaganda. &#8216;Bread and circuses&#8217;, as the Romans put it! The terrorists got the fear part right, but failed to follow through. Now, almost as if for our entertainment over any real retribution, they and their countrymen are being blown to bits on their own soil&#8230;&#8221;</p>
<p>Marc interrupted Will&#8217;s somewhat trite machinations. There was something menacing underlying his tone and he wanted to uncover his agenda. This was not exactly what he had set out to do, but beneath his plain exterior, Will was proving to be tantalisingly mysterious.</p>
<p>&#8220;Follow through? What do you mean?&#8221;</p>
<h1>Chapter 5</h1>
<p>&#8220;The thing is, Jess, while Will was a bit of a character, he was also a genius.&#8221;</p>
<p>Jess detected a strange note of admiration in her husband&#8217;s voice. While he was generally not <em>that</em> cocky, she knew that very few people truly impressed him enough for him to show such enthusiasm. That was enough to get her attention.</p>
<p>&#8220;That said, he seemed very lonely at work. I knew he did some amazing things, but he kept to himself. Not one to let opportunities pass me by&#8230;&#8221;</p>
<p>&#8220;Of course!&#8221; Jess interjected jovially, which Marc returned with a sly wink.</p>
<p>&#8220;&#8230;Not one to let opportunities pass me by, I got talking with him. It was bloody hard work: he wasn&#8217;t interested in reciprocating and I had to do all the driving. Then, finally, I cracked him!&#8221;</p>
<p>&#8220;As you do.&#8221;</p>
<p>&#8220;We got talking about the consequences of the various terror attacks which were now, subsequently, keeping us in work. He was very anti-war, spouting all that conspiracy theory crap &#8212; too much Internet, I guess! &#8212; until he accidentally hinted at something deeper.&#8221;</p>
<p>&#8220;Well, you always were the master of seeing through people. After all, you saw that I wanted you, back in uni, almost before I knew it myself!&#8221;</p>
<p>Marc chuckled nostalgically, &#8220;Yep; but you took some serious persuading, all the same. Totally worth it!&#8221;</p>
<p>Jess smiled sweetly. Their time together at university, where they had met and fallen in love, seemed a distant memory these days. &#8220;Go on, my dear.&#8221; she said.</p>
<p>&#8220;Right, well, having earned his trust by talking about sandwiches, of all things&#8230;&#8221; Jess looked bewildered. &#8220;Don&#8217;t ask! Anyway, after earning his trust, he told me what <em>he</em> would have done.&#8221;</p>
<h1>Chapter 6</h1>
<p>&#8220;What was the terrorists&#8217; objective? To cause fear and panic, right?&#8221;</p>
<p>&#8220;Sure, that&#8217;s why they&#8217;re called terrorists. Unfortunately, they accomplished that pretty successfully.&#8221;</p>
<p>&#8220;They did, but the effect didn&#8217;t last. It&#8217;s like the difference between Final Destination and The Exorcist.&#8221;</p>
<p>&#8220;What?&#8221; Marc was rather taken aback by this rather glib analogy.</p>
<p>&#8220;They&#8217;re both horror movies; one of them &#8212; the most shocking &#8212; will be forgotten while the other &#8212; the more subtle &#8212; lingers and worms in your subconscious. People are biased towards spectacle and are complacent towards the banal; that&#8217;s how we survived as a species and that is how, now, we are manipulated by those in power. Think of it like this: More people die in car accidents each month in the US than were killed in the 9/11 attacks. One of these sparked a trillion dollar war, the other is a statistic!&#8221;</p>
<p>Marc nodded grimly. &#8220;So&#8230; What would you &#8216;hit&#8217;, so to speak?&#8221;</p>
<p>&#8220;What makes the world go round?&#8221;</p>
<p>&#8220;Erm&#8230; Money?&#8221; he played along.</p>
<p>&#8220;Networks! The economic networks, as you say, but also transport, energy, communication, logistic and political networks, to name a few. They&#8217;re all interconnected and, if you can disrupt them sufficiently, it&#8217;s like a house of cards: it&#8217;ll all collapse.&#8221; The animation in Will&#8217;s voice was palpable.</p>
<p>&#8220;It&#8217;s not possible to cause that sort of damage. There&#8217;s no way you could fight the system&#8217;s tendency to correct and balance itself.&#8221;</p>
<p>&#8220;Do you remember the fuel crisis of 2000?&#8221;</p>
<p>&#8220;2000?&#8230;&#8221; he mulled. &#8220;You mean when fuel got so expensive that there were blockades? Yeah, I remember that: I was at university and couldn&#8217;t get anywhere!&#8221;</p>
<p>&#8220;It was actually more to do with taxation than just expense, but anyway, yes: a concerted effort by a few activists at just a handful of the country&#8217;s refineries and depots. What happened? People panicked and the country ran dry: it was chaos!&#8221;</p>
<p>&#8220;Yeah, yeah, like a butterfly&#8217;s wings!&#8221;</p>
<p>&#8220;Don&#8217;t be trite. The point is that you don&#8217;t <em>have</em> to completely disrupt a network, once people&#8217;s less-than-humble lifestyles are threatened, they lose all sense of proportion: we&#8217;re animals &#8212; only interested in ourselves &#8212; and dangerous animals, at that.&#8221;</p>
<h1>Chapter 7</h1>
<p>&#8220;Well, that&#8217;s all very nice in theory.&#8221; Jess proclaimed. &#8220;But how could one little man accomplish all that?&#8221;</p>
<p>&#8220;That&#8217;s what I thought, but remember: Will was Head of R&amp;D for a major defence contractor. He was only two degrees of separation from the Home Secretary, whom he had meetings with regularly. Not to mention the bigwigs at the MoD and intelligence services.&#8221; Marc explained.</p>
<p>Jess was beginning to see why her husband held Will in such high regard, he obviously curried a lot of influence and Marc was drawn to such power.</p>
<p>&#8220;There&#8217;s something else&#8230;&#8221; Marc hesitated. &#8220;I saw him at a Masons&#8217; meeting once. We didn&#8217;t speak &#8212; he was out of my league &#8212; but it was definitely him. I couldn&#8217;t believe such a diminutive man had climbed so high in such a closeted organisation.&#8221;</p>
<p>Jess looked astounded. She knew how much trouble Marc &#8212; a gregarious and prominent engineer with, thanks to her family, effective connections &#8212; had to go through to even get inducted into the Masons. While she had never met Will, from her husband&#8217;s description, she couldn&#8217;t imagine how someone like that could acclaim to such high echelons.</p>
<p>&#8220;Remember the scandal around the Deputy Prime Minister&#8217;s expenses?&#8221;</p>
<p>She nodded.</p>
<p>&#8220;And when they dug up all those dodgy dealings between the Foreign Secretary and that Sudanese warlord?&#8221;</p>
<p>The colour was draining from Jess&#8217; face as the enormity of what Marc was describing crystallised.</p>
<p>&#8220;Then the big one: The murder charges levied against the Met Chief of Police and the cover up by MI5?&#8221;</p>
<p>&#8220;So&#8230; all that never happened?&#8221;</p>
<p>&#8220;No, all that <em>did</em> happen, but it was kept from the public. Will exposed the secrets. One after another; effectively crippling the government&#8217;s credibility and embroiling it in such a huge scandal that there was no way for it to respond to any threat or crisis.&#8221;</p>
<p>&#8220;That&#8217;s when this all began!&#8221; gasped Jess.</p>
<h1>Chapter 8</h1>
<p>&#8220;OK, just for argument&#8217;s sake, say it was possible to destabilise the government: that wouldn&#8217;t be enough. Someone would take control of the situation.&#8221; Marc was incredulous.</p>
<p>&#8220;Probably. However, it would be disorganised and anarchic: that lack of cohesion would not be enough. Besides, you don&#8217;t stop with the government. The purpose of taking them out is to give you a relatively clear run to, as I said before, set the wheels of chaos into motion.&#8221;</p>
<p>&#8220;You&#8217;ve really thought this through, haven&#8217;t you?&#8221; Marc joked!</p>
<p>Will chuckled, &#8220;Well, when I&#8217;m not fixing the military&#8217;s dodgy equipment, I&#8217;ve got a lot of spare time on my hands!&#8221;</p>
<p>&#8220;Lucky you! OK then, what&#8217;s next on your Hitch-Hiker&#8217;s Guide to World Domination?&#8221;</p>
<p>&#8220;Cute. Well, let&#8217;s see, next would be a repeat of the fuel embargoes. Actually, &#8216;energy embargoes&#8217;: Cutting off petrol supplies would not suffice; you&#8217;d have to affect electricity generation, as well. Then, without an effective government &#8212; no COBRA to fix things, this time! &#8212; the general populace will begin to panic. Mainly by hoarding, which will ignite the chain reaction.&#8221;</p>
<p>&#8220;Wait a minute: taking out the government is one thing, but disabling oil <em>and</em> electricity distribution across an entire country? How on Earth would you do that?&#8221;</p>
<p>&#8220;You haven&#8217;t been listening, have you? You don&#8217;t <em>need</em> to switch the whole country off. As we have already seen, there are so few oil processing facilities in the country that just targeting a handful can bring the country to its knees. Regarding electricity, well, how about London?&#8221;</p>
<p>&#8220;What about it?&#8221;</p>
<p>&#8220;The majority of the country&#8217;s economic worth, now we&#8217;ve put our eggs in the &#8216;Financial Services Industry&#8217; basket, gravitates from the capital. If you can interrupt its power supply sufficiently &#8212; say, enough to cause citywide brownouts &#8212; people will lose confidence. Not only the public, but investors and traders. You could do this by sabotaging a few key substations.&#8221;</p>
<p>Marc thought to himself. &#8220;Perhaps, but what use would that be?&#8221;</p>
<p>&#8220;As I say, that should incapacitate the energy supply in the city just enough to give you leverage. As the economy is so weak, it ought to be plenty &#8212; especially with the embattled government &#8212; to trigger a stock market crash.&#8221; Will smiled coyly. &#8220;Then you take out the transport networks.&#8221;</p>
<p>&#8220;What? Where did that come from?&#8221;</p>
<p>&#8220;We&#8217;re not done, yet. So far, we&#8217;ve only affected the rule of law, energy supply and the country&#8217;s financial standing.&#8221;</p>
<p>&#8220;<em>Only!</em>&#8221;</p>
<p>&#8220;We need to cripple major transport links to make it hard for any recovery. So where are the weaknesses in any network?&#8221; Will was clearly in his element. &#8220;Not at the terminal points, like airports, but at the major hubs and branch nodes.&#8221;</p>
<h1>Chapter 9</h1>
<p>The last train of the day rolled heavily out of Clapham Junction. The through-station is Europe&#8217;s busiest, by daily rail traffic, serving both London termini of Victoria and Waterloo. It would only be 84 minutes until the next day&#8217;s trains made their approach.</p>
<p>The security guard completed his final check of the night by walking the length of the central concourse; a clumsy walkway that straddles over all sixteen platforms. He was eager to clock out: A curfew was in effect since the government&#8217;s collapse and the subsequent confusion and public anger, fuelled by hyperinflation and energy shortages. His haste encouraged negligence and afforded asylum to a silent figure, who now emerged from the shadows.</p>
<p>Endowed with compressed gas canisters on his back, which glinted against what little light was available since the Battersea substation had mysteriously overloaded, he proceeded in spraying the entire concourse floor with a caustic and noxious liquid. The atmosphere was thick with fumes, unable to escape the confines of the station&#8217;s claustrophobic architecture.</p>
<p>As stealthily and expertly as the figure had appeared, he vanished without a trace. His work done, 58 minutes remained until the next train.</p>
<p>The digital clock on the platform struck 3:47am; as did those in Paddington, King&#8217;s Cross-St. Pancras, Birmingham New Street and Glasgow Central. These stations, however, were linked by more than just chronology and track. Out of nowhere, a spark erupted spontaneously in each and flame quickly rippled across their respective concourses like some blue and gold, iridescent fluid; flooding the stations with fire.</p>
<p>The fires licked at the stations&#8217; walls and climbed their way higher and higher, to where what remained of the fumes was ensconced. The metal beams that reinforced the respective superstructures began to buckle and groan in the searing heat. Then, it happened: With precision timing, the temperature within each station reached the flashpoint of the deadly gas within each enclosure, simultaneously the flames kissed close enough to ignite the heavy vapours.</p>
<p>The explosions were deafening. White hot fireballs combusted into the night as five of Britain&#8217;s busiest stations were obliterated in an instant. Debris and shrapnel from the wreckage rained over each city for miles; the tracks warped and twisted beyond repair by the intense heat. Even the concrete platforms had begun to melt, like immense stone candles liquefying into the fray.</p>
<p>With 12 minutes until the next train, Britain&#8217;s rail network was down. Red signals propagated out across the country like ancient beacons as trains ground to a halt. Movement across the country had been disabled. No casualties were reported.</p>
<h1>Chapter 10</h1>
<p>Marc looked a bit shocked. He knew Will was a bit of a strange person, but he hadn&#8217;t thought that he would be <em>that</em> strange! The intricacies in his planning and attention to detail were both truly spectacular and, at the same time, deeply disturbing. What had started as an attempt to make connections had turned into a particularly bizarre lunch hour! All the same, Will continued:</p>
<p>&#8220;So, with the government in ruins, limited energy supplies &#8212; rendering communication networks unreliable &#8212; the economy in free-fall and transport links effectively destroyed &#8212; with nobody killed, I might add &#8212; we&#8217;re done. The hysteria from the general public will mean that food and supplies will disappear from shops in no time: at first it will be panic buying &#8212; maybe a rush on a bank, or two: remember when that happened, last! &#8212; which will quickly descend into mindless looting. Once lawlessness breaks out, with nobody to police or control affected areas, it&#8217;s downhill all the way.</p>
<p>&#8220;In these austere times, with Britain rendered insolvent and in dire straits, I believe the weaker European economies would collapse in turn. Greece and Ireland are more-or-less there, already; Italy, Spain and Portugal aren&#8217;t far behind. France and Germany are now the only viable economies left afloat, but they can&#8217;t bolster the burden of half of Europe by themselves; especially as investors flee like rats from a continent in financial meltdown!</p>
<p>&#8220;America is broke: it can&#8217;t come to help and it will be further weakened by Europe&#8217;s demise. The only remaining economic powers &#8212; with the possible exception of Japan &#8212; will follow as they rely largely on the west for exports. It&#8217;ll render the current financial situation akin to missing some loose change!</p>
<p>&#8220;The world can&#8217;t support seven billion people without us helping it along with technology. Without stable government and the former powers of the world broke, nature will redress the balance. Possibly, I&#8217;m afraid to say, with a bit of help from the more opportunistic regimes: the Irans and North Koreas of the world.&#8221;</p>
<p>Marc pondered over what Will had said, &#8220;That&#8217;s <em>slightly</em> wild speculation, don&#8217;t you think? I mean, it&#8217;s possible, but I think a lot of dominoes would have to be stacked exactly right for a worldwide collapse.&#8221;</p>
<p>&#8220;Oh yeah, of course. I&#8217;m just saying, since you asked, how <em>I</em> would do it. That&#8217;s the worst case scenario, but even if all the dominoes &#8211; as you put it &#8212; didn&#8217;t align, I think it would still cause more lasting damage than simply blowing up a shopping centre or derailing a train.&#8221;</p>
<h1>Chapter 11</h1>
<p>&#8220;Wait, what about martial law, or the UN, or those kind of things? The army could send envoys into affected areas to restore order.&#8221; claimed Jess. &#8220;It&#8217;s not something I would have ever imagined happening here, but a lot of things have happened that I would never have imagined! Why not?&#8221;</p>
<p>&#8220;Why not, indeed? But do you remember seeing soldiers on the streets? There were a few, in some areas, but most were unable to reach the inner cities.&#8221;</p>
<p>&#8220;I don&#8217;t understand. Did they just run out of fuel like the rest of us?&#8221;</p>
<p>&#8220;Well, the military do have reserves, but Will had a trump card.&#8221; Marc&#8217;s expression turned bleak. &#8220;After all, Will wasn&#8217;t the Head of R&amp;D for nothing, sweetie. He&#8217;s been working in the field for years and is quite famous for some of his designs.</p>
<p>&#8220;Indeed, almost every military vehicle in Northern Europe carries two components that he invented. Alone they seem completely benign and unrelated &#8212; they&#8217;re just guidance and radio systems &#8212; but because they worked so well, everyone overlooked that they&#8217;re not separate at all. They have a hidden function that was so cleverly disguised, no one saw it.&#8221;</p>
<p>&#8220;I don&#8217;t like the sound of this.&#8221;</p>
<p>&#8220;Quite!&#8221; Marc sighed, heavily. &#8220;If a vehicle receives a particular signal, it disables the guidance system and effectively immobilises itself. The cunning part is that then each vehicle will retransmit the disabling code to surrounding vehicles, which then go on to repeat the process. It spreads like a virus throughout the military&#8217;s infrastructure until every last Land Rover, tank, helicopter, jet, submarine and aircraft carrier is literally dead in the water.&#8221;</p>
<p>&#8220;Shit!&#8230; But, wait, how do you know all this?&#8221;</p>
<p>&#8220;After my little conversation with Will, I was rather concerned, so I decided to do a little investigating, after hours. I got into his office computer and pulled up various designs and mock up drawings: all of them brilliant and all of them with this secret &#8216;back door&#8217;. Almost every piece of military hardware put into production over the last twelve years has some kind of subtle flaw, designed to render it useless at the control of a higher power.&#8221;</p>
<p>&#8220;Higher power?&#8221;</p>
<p>&#8220;Will, I mean. While he has obviously orchestrated others to do his dirty work &#8212; although, beyond his influence, I don&#8217;t exactly know how &#8212; I have no evidence indicating that he&#8217;s been corrupted or working for some unfriendly source. Perhaps he only answers to Mammon, or whatever, but I doubt it! After all, the security vetting we have to go through is quite thorough in that area; although it clearly misses megalomanic lunatics!&#8221;</p>
<p>&#8220;Clearly! So, what else did you find?&#8221;</p>
<p>&#8220;The only other thing that seemed out of the ordinary were maps and satellite photos of the middle of nowhere. A wooded area, out in the country somewhere, far away from any major towns and even roads of any significance.&#8221;</p>
<p>&#8220;Do you think maybe that&#8217;s where he&#8217;s gone? That&#8217;s where he&#8217;s hiding?&#8221;</p>
<p>Marc nodded in agreement, as though he had been thinking the same for some time. &#8220;I need to know why he did this, Jess.&#8221;</p>
<p>&#8220;So do I. I&#8217;m coming with you!&#8221;</p>
<h1>Chapter 12</h1>
<p>Marc knew better than to argue with his wife; she was as adventurous as himself and, besides, her resourcefulness would undoubtedly prove useful.</p>
<p>&#8220;The woods are about 60 miles from here: fairly close, but quite inaccessible. If we can find a working vehicle &#8212; especially something four-wheel drive &#8212; we shouldn&#8217;t have much difficulty. The roads should obviously be free of traffic, but they may be littered with dead vehicles and other detritus.&#8221;</p>
<p>&#8220;And the gangs?&#8221; Jess looked unusually timid.</p>
<p>&#8220;The gangs may be a problem while we&#8217;re still in urban areas, but I&#8217;ve heard they don&#8217;t really go out of the city. Also, they&#8217;re only really a problem at night: as long as we can outrun them, we should be fine.&#8221; Marc&#8217;s reassuring tone masked his true apprehensions.</p>
<p>&#8220;OK.&#8221; Jess submitted reluctantly.</p>
<p>&#8220;So, now we need some wheels!&#8221; Marc exclaimed, trying to move passed the obvious tensions.</p>
<p>&#8220;The only thing I&#8217;ve seen around here that looks like it would still go is an abandoned army Land Rover, around the corner; one of those rugged ones. It would be perfect, except that you said it wouldn&#8217;t work.&#8221; Jess looked dejected. &#8220;The only other vehicles have been scavenged by roving gangs: picked apart and gutted for anything they can use.&#8221;</p>
<p>Marc sighed heavily. &#8220;What state of repair is this Land Rover in? Remember, I&#8217;m also a senior engineer and I&#8217;ve seen Will&#8217;s designs! If it&#8217;s still in working order, I can unlock it and we can be on our way.&#8221;</p>
<p>&#8220;Well, the last time I saw it, the windows were pretty smashed up, but the tyres were all fully inflated.&#8221;</p>
<p>&#8220;Army tyres don&#8217;t puncture easily!&#8221;</p>
<p>&#8220;Beyond that, it looked fine. Well, at least to me. Of course that was a couple of days ago: It could have been burnt to the ground by now!&#8221;</p>
<p>&#8220;Where was it? We have to try&#8230;&#8221;</p>
<p>&#8220;It&#8217;s near the supermarket, on the main road. I saw it when we went looking for provisions.&#8221;</p>
<p>&#8220;That&#8217;s less than ten minutes from here. Darling, I could kiss you!&#8221;</p>
<p>Jess chuckled bashfully. &#8220;Won&#8217;t we need tools and food? What about weapons or protection?&#8221;</p>
<p>&#8220;I&#8217;ve got my tools.&#8221; presenting his hands. &#8220;I won&#8217;t need much to remobilise and hot wire a Land Rover. As for food, we can&#8217;t tell the others what we&#8217;re up to &#8212; there would be an uproar &#8212; so I guess we can only take the emergency rations that we would have had anyway, for lunch. That won&#8217;t look suspicious.&#8221;</p>
<p>&#8220;And weapons?&#8221;</p>
<p>&#8220;Jess, don&#8217;t worry: I&#8217;m not going to let anything happen to you.&#8221; Marc&#8217;s inflection had become more convincing now he could see things through. &#8220;However, you&#8217;re right: we should bring something. Anything heavy and blunt should do the trick!&#8221;</p>
<p>&#8220;We&#8217;ll pass plenty of debris on the way: bricks, wooden posts like&#8230; erm&#8230; fence posts, I suppose. I even saw an orphaned car door!&#8221;</p>
<p>&#8220;Perfect!&#8221;</p>
<h1>Chapter 13</h1>
<p>Everything was deathly still. A spaghetti of roads, once choked by traffic, now stood completely unused; whistling eerily in the winter breeze. Nature was beginning to encroach over what was once man made: tufts of frosted green sprigged through the Tarmac, while chaffinches roosted in the concrete overpasses. A stone jungle of a lost civilisation, littered with metal and glass; the signature of its creators&#8217; skill and destruction.</p>
<p>Marc and Jess approached the supermarket complex along the main road like a husband-and-wife SAS team. They cantered silently along the roadside, furnished with an improvised arsenal that any mediæval rogue would be proud of! With deft and considered movements, they rounded the supermarket&#8217;s slip road where Marc stood, staring aghast.</p>
<p>&#8220;You didn&#8217;t tell me it was upside down!&#8221; he cried.</p>
<p>&#8220;Don&#8217;t shout, you&#8217;ll attract unwanted attention!&#8221; Jess tried to hold back her acrimony, she was scared of things more salient than her husband&#8217;s ego. &#8220;We can just use these wooden posts to right it.&#8221;</p>
<p>Marc sighed listlessly. &#8220;Fine! Stick yours towards the back end, on the upper part of the slope. I&#8217;ll do the same near the front and we&#8217;ll try to roll it upright down the hill.&#8221;</p>
<p>&#8220;Will these bricks work as pivots?&#8221;</p>
<p>&#8220;They should, but either they or the posts will break in the process: we&#8217;ll sacrifice half our artillery, but I guess we&#8217;ll gain a ride; albeit with compacted suspension!&#8221;</p>
<p>The two got to work. There was no time for petty differences and they worked as dynamically as a double act who had been together for years, instinctively knowing each other&#8217;s every move and requirement as they assembled their makeshift catapult. It was quick work and as the fulcra were placed and the levers&#8217; tensions checked, they nodded at each other to provide torque.</p>
<p>The two leant down as hard as they could on their respective posts. Loose pieces of stone crumbled and flew from the bricks as the force increased, the wooden levers creaking ominously while the Land Rover tilted lethargically.</p>
<p>&#8220;OK.&#8221; Marc panted breathlessly. &#8220;After three!&#8221;</p>
<p>Jess was red in the face, but gritted her teeth in agreement.</p>
<p>&#8220;One. Two&#8230;&#8221; the pair bounced their levers in time with the countdown, each time shifting the Land Rover more and more. &#8220;Three!&#8221;</p>
<p>Marc and Jess all but jumped on their posts, pulling them with all their might. Like molasses, the system began to give: slowly moving upwards, the Land Rover was beginning to flip. Marc, being the larger and stronger of the pair, had taken the heavier engine side and was exalted by this progress: he groaned out one final push as the Land Rover reached it&#8217;s apex.</p>
<p>As it teetered dangerously over its centre of gravity, Jess&#8217; brick fulcrum suddenly collapsed into dust under the tremendous pressure. She was violently thrown to the ground while the impulse was enough to send the Land Rover rolling down the hill, splitting Marc&#8217;s post into splinters with an almighty crack. The Land Rover landed in a plume of dust and a cacophony of mechanical crashes that did not go unheard.</p>
<p>Marc rushed to his wife, who was still lying face down on the ground. She was barely conscious and dark blood was seeping from her forehead, where she had collided with the hard ground. Marc helped her to sit up and put pressure against the wound. She recoiled in pain, but he persisted to stem the flow: She was shaken, possibly concussed, but would be alright.</p>
<h1>Chapter 14</h1>
<p>Jess was sat upright in the Land Rover&#8217;s passenger seat; her head in her bloody hands, nursing her wounds. She was beginning to feel that this had been a bad idea, but knew that they must go on. Meanwhile, Marc was rummaging around under the Land Rover&#8217;s bonnet: oil and muck grouted into his hands and stung at his cuts. It made the fine work of repairing the vehicle numb and unskilled.</p>
<p>Fortunately, while it had been a literal upheaval to right the Land Rover, it&#8217;s formerly upturned state had left it safe from scavengers. Apart from the broken windows and now damaged suspension coils, no major parts were missing and there was even plenty of petrol remaining! Marc had successfully hot wired the transmission system, but was now working on the more insidious challenge of unlocking the disabled guidance systems.</p>
<p>Dozens of wires fed into integrated circuits. All modern military vehicles were so packed with electronics that they were almost remote controlled. Being a mechanical engineer by trade, Marc was bothered by this fact; more so, given his present situation! However, he knew what he had to do: it was just a matter of finding the right components and bypassing them, without disturbing anything else.</p>
<p>As he groped through circuitry, he was oblivious to an audible whine that could be heard in the distance. A high pitched roar that was growing louder with every second. Jess, however, was very sensitive to this noise: it echoed in her throbbing head and she was suddenly in a high state of alert.</p>
<p>&#8220;What&#8217;s that?&#8221; she shouted.</p>
<p>&#8220;Ow!&#8221; Marc cried as he banged his head on the bonnet lid. &#8220;Dammit! What? I don&#8217;t hear&#8230;&#8221;</p>
<p>He paused. The sound was now more modulated; clearly a vehicle winding its way towards them.</p>
<p>&#8220;Is that a motorbike?&#8221;</p>
<p>&#8220;That&#8217;s what it sounds like, but&#8230;&#8221; Jess stopped in horror as she looked down the supermarket&#8217;s slip road.</p>
<p>Two motorcyclists had jumped out of nowhere and were bearing down on them. The riders were clearly gang members and were wielding their own brand of home-made weaponry with violent menace and intent.</p>
<p>&#8220;Shit! Shit! Shit!&#8221; Jess was hysterical.</p>
<p>Marc, seeing the impending danger, got right back into the engine and searched desperately for the connection he was looking for.</p>
<p>&#8220;Where is it? Where is it? Where&#8230;&#8221; Marc paused. &#8220;Got it!&#8221;</p>
<p>He yanked sharply and the Land Rover&#8217;s engine suddenly fired into life. He screamed as the fan blade started and effortless sliced off the last two fingers of this left hand, which he was using to support his weight while working.</p>
<p>Jess, woken from her fear by her husband&#8217;s pain, leapt to pull him from the engine and bundled him inside the Land Rover. With the motorcyclist thugs drawing dangerously near, she stamped down on the accelerator and the Land Rover skidded and jerked into motion. All the while, Marc groaned in agony beside her, holding his hand above his head tightly to stop the bleeding.</p>
<p>The Land Rover jumped rigidly from the kerbside onto the main road, its passengers acutely sympathetic to every bump and jolt it assimilated. Behind them, the motorcyclists were gaining; now close enough to hear their jeering over the thunder of the engines.</p>
<p>&#8220;Go north! The M1.&#8221; Marc was breathless, but the situation required his composure. &#8220;Don&#8217;t look back, I&#8217;ll deal with them!&#8221;</p>
<p>&#8220;OK.&#8221; Jess whimpered. She was clearly starting to panic, but she drove with a grace and agility unbecoming of the solid vehicle.</p>
<p>Marc&#8217;s condition had stabilised enough for him to be of more use. With the stumps of his left hand bandaged in a crude tourniquet, he spontaneously, albeit fumblingly, took arms. As he surveyed the engagement from what was left of the window, one of the motorcyclists approached the passenger side; swinging a bolas at the door.</p>
<p>With a metallic clang, Marc recoiled as Jess screamed in shock, swerving the Land Rover in the opposite direction. With a manic laugh, the first gang member to attack had rendered a grapefruit-sized indentation into their door. However, while distracted with pride, Marc seized the opportunity and threw their remaining brick out of the window at his motorcycle.</p>
<p>The brick rolled reluctantly against the road, pieces chipping off in the process. It had missed its mark and the motorcyclist was able to out-manoeuvre the falling masonry; although not without destabilising his course. As he wobbled, Marc saw the gangster&#8217;s lack of riding skill and lunged at him with their somewhat warped wooden post. The motorcyclist flinched too far, sending his bike skidding to the ground.</p>
<p>Jess cheered with joy: &#8220;Nice one, sweetheart!&#8221;</p>
<p>&#8220;Don&#8217;t celebrate yet.&#8221; he looked right, out of the driver side window, passed his wife and into the other motorcyclist&#8217;s visor. &#8220;We&#8217;re not alone and out of ammo.&#8221;</p>
<p>Jess caught her husband&#8217;s eye and glanced with unaware nonchalance to her right. She was met with the sight of a gang leader: superiorly skilled at riding, holding his line with one hand while adeptly priming a shotgun with the other. She slowly returned her gaze, her hands now shaking on the steering wheel.</p>
<p>&#8220;Swerve!&#8221;</p>
<p>&#8220;What?&#8221; Jess didn&#8217;t know what to do. It was beyond her capacity to purposefully attack another, even when they themselves were trying to kill her.</p>
<p>Marc quickly grabbed the wheel from her and sharply rotated it to the right. The Land Rover impacted heavily with the rider and the shotgun fired indiscriminately into the air. In terror, Jess let go of the steering wheel, tears streaming from her eyes, as the motorcyclist fell to the road and under the Land Rover&#8217;s rear wheel.</p>
<p>Jess sobbed in shock as their vehicle&#8217;s weight unambiguously kneaded their assailant&#8217;s body with an unwholesome crunch. Marc steadfastly held the wheel, his throat acrid with fear and sin.</p>
<h1>Chapter 15</h1>
<p>The Land Rover pulled up to a grassy hill, by a thick copse, with a squeak. Marc, who was now driving, switched off the engine and turned to Jess, who was still white with guilt.</p>
<p>&#8220;This is as far as we can go. We&#8217;ll have to proceed on foot, through the wood.&#8221; Marc spoke softly; he was very aware of his wife&#8217;s current sensitivity. &#8220;Are you still with me?&#8221;</p>
<p>Jess slowly turned towards him. Her face was puffy and etched with tears, but she was defiant: &#8220;I&#8217;m always with you.&#8221;</p>
<p>Marc took her hand and the two of them stepped out from the vehicle.</p>
<p>Despite being barely an hour from the outskirts of London, all around was countryside: brown and silvery green, desaturated in its exposure. Yet this was no desert. Birds of prey hovered like sentinels over the rolling hills, spying all manner of rodent, foraging amongst the grasses below. There were clear signs of deer and even grazing animals such as cows and sheep, which must have escaped from nearby farms. A pigeon cooed from within the small wood that stood before Marc and Jess. Startled, it flew clumsily into the sky, disturbing the upper branches of the near-naked winter canopy.</p>
<p>&#8220;It&#8217;s pretty dark in there.&#8221; Jess said coldly.</p>
<p>Marc&#8217;s grip on her hand tightened and they walked in.</p>
<p>They trudged through the leaf litter. It squelched under foot, not discriminated against by the autumn rains. Its dank permeated the air. Despite the protection afforded by the densely packed trees, it was bitterly cold.</p>
<p>&#8220;Where are we going?&#8221; asked Jess, her breath condensing about her.</p>
<p>&#8220;I&#8217;m not sure. This isn&#8217;t a large wood: I suggest we just keep walking towards its middle and see what we find.&#8221;</p>
<p>As they continued on into the wood, it became increasingly disorientating. Every tree began to look the same. In every direction, one was blinded by bark. There seemed no way out nor no way in. The quiet was unenviable; haunting the strongest to their soul. The trees were in charge now: here a long time before us, despite us and a long time after we are gone.</p>
<p>Marc stopped suddenly. Jess looked at him with fright. All around was silence.</p>
<p>&#8220;Did you hear that?&#8221; he whispered.</p>
<p>Jess looked around, confused. &#8220;What?&#8221;</p>
<p>Marc looked panicked. He was used to being in control and now, thoroughly lost and without a plan, he was beginning to show his weaknesses. He looked for solace in his wife, his eyes wide and pathetic.</p>
<p>&#8220;I don&#8217;t know what to do.&#8221; he whimpered.</p>
<p>Jess looked sympathetic and took pity; without letting on, she too was beginning to lose her grip on reality. It had been a particularly trying day, during particularly trying times. They reached out and embraced each other tightly, pressed together in security.</p>
<p>As Jess raised her gaze to meet Marc&#8217;s height, she noticed odd, dilapidated structures built high in the trees. She scowled, trying to make them out more clearly.</p>
<p>&#8220;What are you looking at, sweetheart?&#8221; Marc twisted his head round to see.</p>
<p>&#8220;I may not be an engineer, but my guess is that squirrels didn&#8217;t build those!&#8221;</p>
<p>&#8220;It looks like a series of walkways.&#8221; Marc&#8217;s confidence had returned. &#8220;And they lead that way!&#8221;</p>
<h1>Chapter 16</h1>
<p>The pair of them raced through the trees, their necks craned upwards to follow the paths. There were several of them and, as they proceeded, they started to converge on a single point. A huge, ancient tree now serving a ramshackle, albeit strangely elaborate architecture, supported high from the ground. It was magnificent: a tree house that any child or carpenter could imagine but never hope to conjure from their dreams.</p>
<p>Atop the base, a tall radio mast projected into the sky, flanked by a squat wind turbine spinning frantically as it tacked the high breeze. The canopy pathways were now more clear: terminating at this single hub, radiating outwards like spokes and held fast by taught ropes. Hand-worked gulleys channelled rainwater from a sloping roof, feeding a fat plastic silo, as steam pottered from inside out of an inconspicuous vent. Leading from the ground and spiralling up the tree&#8217;s colossal trunk were carefully placed rungs, wrought with a rough covering to prevent slippage, and a rope balustrade.</p>
<p>Marc and Jess looked at each other in awe. The effort required to build such a secret was of no triviality and, in the chilling wood, it was an inviting sight despite what madness they knew awaited them inside. Marc took the rope in his hand and the pair ascended the stairs to the tree tops and inside the fortress.</p>
<p>&#8220;You finally made it!&#8221; a strangely jolly and welcoming voice called from an obscured level, within the tree. &#8220;So, diagonal or straight?&#8221;</p>
<p>&#8220;What?&#8221; Marc yelled.</p>
<p>&#8220;Sandwiches: how do you like them cut? Diagonally or straight? Personally I prefer them diagonally: The triangular shape is more aesthetically pleasing and also better distributes the weight, but I can understand why&#8230;&#8221;</p>
<p>&#8220;Shut up and come out here!&#8221; Jess screamed.</p>
<p>The voice in the corner wavered. &#8220;Of course. Where are my manners?&#8221;</p>
<p>Will stepped out from a secondary chamber. Unlike Marc and Jess, he looked relatively well-fed and in high spirits. The atmosphere seemed unreal; almost unto a dinner party than a final stand off!</p>
<p>&#8220;What happened to your hand?&#8221; Marc asked, unusually calmly.</p>
<p>&#8220;Oh, this?&#8221; he brought his hand into view. &#8220;Well, I&#8217;m afraid I&#8217;m not much of a chemist! The incendiary that took out the stations turned out to be a little more unstable than I had allowed for and, well&#8230;&#8221;</p>
<p>Jess was livid. She couldn&#8217;t believe the platitudes being exchanged and violently interjected, &#8220;You maniac! You blew it up! Damn you! God damn you to Hell!&#8221;</p>
<p>Will look confused as Marc tried to hold her back. Nonetheless, her sentiment was right; it was time for closure. They had come so far and now had within their reach the answer to their question:</p>
<p>&#8220;Why did you do it, Will?&#8221; he sighed. &#8220;Why?&#8221;</p>
<p>&#8220;Why? I thought you knew, Marc.&#8221; Marc looked dumbstruck as Will&#8217;s eyes turned towards his wife. &#8220;Because of Jessica.&#8221;</p>
<h1>Chapter 17</h1>
<p>&#8220;Jess?&#8221; Marc erupted, clearly protective of his wife. &#8220;You&#8217;ve never even met Jess before now, what possible reason could you have that involves her? Were you jealous? That&#8217;s it isn&#8217;t it? Unrequited love! All this over jealousy: that&#8217;s pretty messed up for someone you&#8217;ve never met, Will!&#8221;</p>
<p>&#8220;You poor deluded fool.&#8221; Will&#8217;s calmness juxtaposed against Marc&#8217;s anger. &#8220;You still don&#8217;t get it, do you?&#8221;</p>
<p>&#8220;Get what, you little freak?&#8221;</p>
<p>&#8220;Jess is dead, remember?&#8221; Marc&#8217;s eyes widened.</p>
<p>&#8220;What the fuck are you talking about, she&#8217;s right&#8230;&#8221; he looked around to see that only Will and himself were standing in the cabin. Alone.</p>
<p>Will sighed. &#8220;You wanted her to be alive so much, that you imagined that she was. It&#8217;s understandable: she meant everything to you before the accident.&#8221;</p>
<p>Marc was disorientated; he couldn&#8217;t fathom what was going on and he dropped to his knees, on the verge of hyperventilating. &#8220;The accident?&#8221;</p>
<p>&#8220;You&#8217;re a key target for hostility, Marc. You know that. You have such overwhelming sway over Northern Europe&#8217;s military infrastructure, especially Britain&#8217;s defence spending. Some unfriendly power &#8212; most likely hired by some foreign intelligence service, or maybe even at the beck-and-call of one of our rivals &#8212; wanted you dead and, I&#8217;m afraid to say, Jess got in the way.&#8221;</p>
<p>&#8220;Barcelona&#8230;&#8221; Marc looked dazed as fragments from his memory slotted back into place. &#8220;We were at that conference and&#8230; then there was the shooting down Las Ramblas.</p>
<p>&#8220;It was chaos. People screaming and running everywhere.&#8221; Marc strained under the recollection. &#8220;I remember the sirens: police and ambulances all over the place. I was surrounded by body guards and&#8230;&#8221;</p>
<p>Marc threw up. The pain from that day had been repressed deep within him, covered up by his confident façade. He raised his head to Will, tears streaming down his face.</p>
<p>&#8220;Jess.&#8221;</p>
<p>Will was candid, but his usually stoic voice was strangely comforting, &#8220;The bullet that was meant for you struck Jess in the temple. She died instantly.&#8221;</p>
<p>Marc whimpered, &#8220;No.&#8221;</p>
<p>&#8220;I&#8217;m sorry.&#8221;</p>
<p>&#8220;No!&#8221; he moaned, beating his fists to the floor.</p>
<p>&#8220;After that you were never quite the same. On the surface, you seemed normal &#8212; back to your usual self fairly quickly &#8212; but inside, you couldn&#8217;t cope. You were living a lie and your memory of Jess took on a life of its own, inside your mind: it was easier for you to pretend than it was to accept the truth.&#8221;</p>
<p>&#8220;But&#8230; but&#8230; what do you care? Why take revenge on my behalf?&#8221;</p>
<p>&#8220;I didn&#8217;t, Marc. Your anger did.&#8221;</p>
<p>&#8220;I&#8230; What?&#8221;</p>
<p>&#8220;How do you think you got here so easily? We&#8217;re in the middle of nowhere and that Land Rover of yours was pretty convenient, wasn&#8217;t it?&#8221;</p>
<p>&#8220;How did you know about&#8230;&#8221;</p>
<p>&#8220;It wasn&#8217;t luck, Marcus.&#8221;</p>
<p>&#8220;And&#8230; your designs?&#8221;</p>
<p>&#8220;A renowned engineer doesn&#8217;t leave military secrets idly unencrypted for all to see, now, does he? You would have had to have had the private key; again, something that isn&#8217;t just left lying around!&#8221;</p>
<p>&#8220;I <em>did</em> have the key, but&#8230; how?&#8221;</p>
<p>Will sighed heavily, &#8220;Wake up, Marcus.&#8221;</p>
<p>Marc looked into Will&#8217;s eyes, trembling.</p>
<p>&#8220;I am you.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20111130/zeitgeist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cycling in the City</title>
		<link>http://xoph.co/20111105/cycling-in-the-city/</link>
		<comments>http://xoph.co/20111105/cycling-in-the-city/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 21:52:36 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=445</guid>
		<description><![CDATA[I regularly commute through England&#8217;s metropolis: a 40km round trip that takes me about the same time as the train, but for free and without the claustrophobic cattle class that is South West Trains nor the carcinogenic underworld of the &#8230; <a href="http://xoph.co/20111105/cycling-in-the-city/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I regularly commute through England&#8217;s metropolis: a 40km round trip that takes me about the same time as the train, but for free and without the claustrophobic cattle class that is South West Trains nor the carcinogenic underworld of the Tube. However, as a road cyclist who cut his teeth in the countryside &#8212; literally: I chipped a tooth, which has since been removed, in an accident! &#8212; the whole affair is less than ideal.<br />
<span id="more-445"></span></p>
<h1>Traffic</h1>
<p>Of course I&#8217;m going to open with a rant about the traffic in London. While it&#8217;s relatively law-abiding &#8212; although there are some <em>particularly</em> bad drivers, here &#8212; there&#8217;s just too much of it. This fuels the English passion for queuing, of course, but it&#8217;s not something I care for whilst riding: having to slow down and stop all the time makes my commute almost like some bastardised form of interval training! Where, rather than getting stronger and faster, one just ends up increasingly frustrated.</p>
<p>It shouldn&#8217;t take me an hour to ride 20km!</p>
<p>As well as this tedium, it&#8217;s also mentally exhausting: because there&#8217;s so much traffic, including a lot of big vehicles (buses, vans and even lorries), you have to be in a permanent state of high alert to avoid getting killed. (That&#8217;s no exaggeration: I see serious accidents regularly.) The bad drivers that exists are, as I say, particularly bad &#8212; van and moped drivers being the worst &#8212; and a few dozen kilograms of squidgy me and bike are no match for an order of magnitude&#8217;s more momentum.</p>
<h1>Environment</h1>
<p>The transport networks of cities consist of channels, flanked by buildings; London is no exception. Roads, rivers and canals manifest a live demonstration of Bernoulli&#8217;s principle, on a massive scale. That is to say: It&#8217;s windy! Dangerously so when, for example, crossing the Thames: As a racer, my bike is very lightweight and I&#8217;m easily blown into the road &#8212; and potentially traffic &#8212; by such strong crosswinds.</p>
<p>Every rider hates the wind. Paradoxically, however, most serious cyclists &#8212; myself included &#8212; love climbs. My only guess as to this dichotomy is that wind is very much an unknown, whereas with a climb, you can see how steep it is and how far you&#8217;ve got to summit; plus, of course, there&#8217;s always the ride down! Unfortunately, London is largely flat: There are a few hills out where I commute from &#8212; the closest I get to a good climb is Kingston Hill &#8212; but they&#8217;re, at best, anticlimactic. All the while, my climbing ability is on the wane.</p>
<p>What really irks me about riding in London, however, are the roads. They are in such a poor state of repair: patched together like some stretched, asphalt Frankenstein&#8217;s monster, battle scarred with potholes and the shrapnel of the fallen. It&#8217;s a very hazardous surface to ride on; especially as a racer with slick, low-profile tyres. Indeed, my poor bike has suffered greatly at the hands of London&#8217;s roads: punctures are not uncommon and I&#8217;ve even broken a spoke!</p>
<p>It&#8217;s not all bad: with the introduction of the <a href="http://www.tfl.gov.uk/roadusers/cycling/11901.aspx">Cycle Superhighways</a>, it makes some journeys a lot less stressful. However, they&#8217;re not perfect and they can also be fairly treacherous, in places. Moreover, one is still cycling on London&#8217;s roads and, despite the relative strength in numbers, is still vulnerable. The endless stopping and starting is also still an issue, only exacerbated by the curious placement of traffic lights in the city (only ever on the near side, rather than both the near and far sides of the junction; making it impossible to see when you&#8217;re cleared to cross).</p>
<p>My final comment on the cityscape can be summed up by one, rather pessimistic question. What will happen first: Getting hit by a bus or contracting some kind of respiratory cancer from the pollution?</p>
<h1>Other Cyclists</h1>
<p>I actively encourage anyone to cycle, whether for pleasure, commuting, exercise or sport. There are all kinds on the trip into London; the pack growing gradually more massive as you reach the centre. Couriers and messengers, who are possibly the fittest and craziest people around; racers, like myself; the equally inappropriate mountain bikers and fixie-hipsters; the fold-up commuters and <a href="http://www.tfl.gov.uk/roadusers/cycling/14808.aspx">Boris Bikers</a>; the list goes on.</p>
<p>The problem is that, while like I say, the routes are improving, the city is still not built for a large number of cyclists in any one place. Moreover, a peloton of such wide variety in ability is a problem in itself. It staggers me how badly some cyclists read and negotiate the road and their fellow users &#8212; I&#8217;ve lost count of how many times I&#8217;ve been rear-ended! &#8212; and also, just how arrogantly some overestimate their skills. They put themselves and plenty of others at serious risk: it&#8217;s little wonder why cyclists bolster such infamy. Put it like this, if you can&#8217;t easily keep pace with traffic &#8212; be they vehicles or stronger riders &#8212; don&#8217;t get in their way!</p>
<p>To end this section of diatribe, I&#8217;m afraid my ego may be exposed! While I am a strong rider, I am by no means the strongest. There are some serious riders on some very nice kit out there. Unfortunately, rather than feeling humbled when I&#8217;m dropped without them breaking a sweat, it makes me feel inferior. I know that&#8217;s just my insecurity speaking &#8212; after all, at the risk of bragging, I do more than my fair share of dropping, myself &#8212; but still, my pride doesn&#8217;t take a beating well!</p>
<h1>Pedestrians</h1>
<p>My route takes me through the less-than-salubrious areas of Tooting and Clapham where, it is my experience, the locals can be somewhat &#8220;aggressive&#8221; and short tempered. I never stop long enough for it to be a serious problem &#8212; not yet, anyway &#8212; but whenever such incidents happen, it leaves me a tad anxious and insecure.</p>
<p>To give you an example: Without warrant whatsoever, a random guy in Clapham once turned to me, staring me squarely in the eye, and muttered curtly, &#8220;Fucking twat!&#8221; I was taken aback: How can someone be <em>so</em> angry at 8:30am? Needless to say, given his relative menace, I felt it best to ride away!</p>
<p>Thugs notwithstanding, general pedestrians are almost as bad. They either idle about like mindless sheep, stepping right out in front of you, or rush around with such single minded deliverance that they&#8217;ll just run into you. Then, of course, it&#8217;s &#8220;<em>my</em> fault&#8221; for almost riding into them!</p>
<h1>Local Bike Shops</h1>
<p>Real estate in Central London is clearly at a premium; it&#8217;s some of the most expensive property in the world. As such, the only bike shops in the city seem to be the huge chain (forgive the pun) stores, which employ people who don&#8217;t care &#8212; or even know what they&#8217;re talking about &#8212; to sell crap to the equally indifferent. However, even out in the suburbs, while there are still these stores, there is also a surprising lack of proper LBSes. You know what I&#8217;m talking about: Where the employees can match your bike to your face, know what you need without even asking and are actually serious riders themselves.</p>
<p>They must exists in London because, as I say, amongst the hipsters and the couriers and the Boris Bikers, there are some serious riders around here: I can&#8217;t imagine any of them putting up with the likes of these faceless superstores and buying online sometimes isn&#8217;t an option. I just haven&#8217;t found any &#8212; certainly not in my area &#8212; whereas, where I hail from, they are commonplace.</p>
<h1>What I Miss&#8230;</h1>
<p>I used to ride under the maxim, &#8220;Il mondo è la mia pista.&#8221; The world is my race track. I could just ride: Sure there are still risks, but they were mitigated by the joy that comes from the freedom and splendour of the countryside. Miles of horizon to explore and conquer, defined only by my glycogen reserves! Richmond Park is about the closest I can get here, but mindlessly looping around &#8220;Her Majesty&#8217;s Simulated Parkland for Yuppies&#8221; &#8212; like a hamster in its wheel &#8212; isn&#8217;t quite the same!</p>
<p>Call me pretentious if you must, but in short, London isn&#8217;t my world.</p>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20111105/cycling-in-the-city/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Counting with Subquery Factoring</title>
		<link>http://xoph.co/20111025/counting/</link>
		<comments>http://xoph.co/20111025/counting/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 15:42:59 +0000</pubDate>
		<dc:creator>Xophmeister</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://xoph.co/?p=358</guid>
		<description><![CDATA[This is fairly trivial, but I thought I&#8217;d post it anyway! It&#8217;s a PL/SQL script I wrote using subquery factoring to count in natural language: from 1 to 10,000. (It will go higher, but there are gaps after 10,000.) Use &#8230; <a href="http://xoph.co/20111025/counting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is fairly trivial, but I thought I&#8217;d post it anyway! It&#8217;s a PL/SQL script I wrote using subquery factoring to count in natural language: from 1 to 10,000. (It will go higher, but there are gaps after 10,000.)</p>
<p><span id="more-358"></span></p>
<p>Use it wisely!</p>
<pre class="brush: plsql; gutter: true">with English as  (select 0  x, null        en from dual union
                  select 1  x, 'One'       en from dual union
                  select 2  x, 'Two'       en from dual union
                  select 3  x, 'Three'     en from dual union
                  select 4  x, 'Four'      en from dual union
                  select 5  x, 'Five'      en from dual union
                  select 6  x, 'Six'       en from dual union
                  select 7  x, 'Seven'     en from dual union
                  select 8  x, 'Eight'     en from dual union
                  select 9  x, 'Nine'      en from dual union
                  select 10 x, 'Ten'       en from dual union
                  select 11 x, 'Eleven'    en from dual union
                  select 12 x, 'Twelve'    en from dual union
                  select 13 x, 'Thirteen'  en from dual union
                  select 14 x, 'Fourteen'  en from dual union
                  select 15 x, 'Fifteen'   en from dual union
                  select 16 x, 'Sixteen'   en from dual union
                  select 17 x, 'Seventeen' en from dual union
                  select 18 x, 'Eighteen'  en from dual union
                  select 19 x, 'Nineteen'  en from dual union
                  select 20 x, 'Twenty'    en from dual union
                  select 30 x, 'Thirty'    en from dual union
                  select 40 x, 'Forty'     en from dual union
                  select 50 x, 'Fifty'     en from dual union
                  select 60 x, 'Sixty'     en from dual union
                  select 70 x, 'Seventy'   en from dual union
                  select 80 x, 'Eighty'    en from dual union
                  select 90 x, 'Ninety'    en from dual),
     SplitNum as (select MyNumber,
                         trunc(MyNumber/1000)          M,
                         trunc(mod(MyNumber,1000)/100) C,
                         trunc(mod(MyNumber,100)/10)   X,
                         mod(MyNumber,10)              I
                  from  (select     level MyNumber
                         from       dual
                         connect by level &lt;= 10000))
select    SplitNum.MyNumber,
          trim(nvl2(alpha.en,alpha.en||' Thousand',null)||
         (case when (SplitNum.M &gt; 0 and SplitNum.C = 0 and (SplitNum.X &gt; 0 OR SplitNum.I &gt; 0))
               then ''
               else ' '
          end)||
          nvl2(beta.en,beta.en||' Hundred',null)||' '||
         (case when ((SplitNum.M &gt; 0 or SplitNum.C &gt; 0) and (SplitNum.X &gt; 0 OR SplitNum.I &gt; 0)) then 'and ' end)||
          nvl2(epsilon.en,epsilon.en,gamma.en||' '||delta.en)) English
from      SplitNum
left join English alpha
on        alpha.x = SplitNum.M
left join English beta
on        beta.x = SplitNum.C
left join English gamma
on        gamma.x = SplitNum.X*10
left join English delta
on        delta.x = SplitNum.I
left join English epsilon
on        epsilon.x = (SplitNum.X*10)+SplitNum.I
order by  MyNumber;</pre>
<p>Allow me to briefly explain how it works:</p>
<ul>
<li>The first inline view (<code>English</code>) acts as a simple lookup: mapping the natural numbers to their English counterpart. It is the minimal set required to generate all the numbers up to at least 10,000 in English; minus the words &#8220;hundred&#8221; and &#8220;thousand&#8221;, which we add later. (Different languages will need different sets, their complexity and subsequent logic dependant upon said language&#8217;s number system.)</li>
<li>The other inline view (<code>SplitNum</code>) generates the integers from 1 to 10,000 &#8212; using Oracle&#8217;s <code>connect by</code> construct &#8212; and splits each record into their thousands (<code>SplitNum.M</code>), hundreds (<code>SplitNum.C</code>), tens (<code>SplitNum.X</code>) and units (<code>SplitNum.I</code>). We use these data later to assemble the English words and, as such, provide the main source for our query.</li>
<li>We then join the <code>English</code> view to our query several times: for the thousands (<code>alpha</code>), hundreds (<code>beta</code>), tens (<code>gamma</code>), units (<code>delta</code>) and, because they behave irregularly in English, teens (<code>epsilon</code>). This is done by comparing against the data generated earlier in <code>SplitNum</code>, each respectively transformed to match up with <code>English.x</code>.</li>
<li>The <code>select</code> statement then builds the complete English word by referencing its parts from the <code>English</code> inline view via the joins. It also contains logic to write &#8220;Thousand&#8221;, &#8220;Hundred&#8221; and &#8220;and&#8221;, where appropriate, as well as removing any superfluous spacing.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xoph.co/20111025/counting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

