Do a bit of helping out at EuroPython

Are you a Python geek?

For starters - you should totally be going to EuroPython at the end of June. Python conferences like this attract brilliant presentations from some real community and industry heavyweights. This year we've got Professor Sir Tony Hoare (that's the creator of quicksort to you, amongst a venerable lifetime's worth of other things); Cory Doctorow (everyone's favourite science-fiction author, blogger and all-round geek activist), Bruce Eckel (author and renowned technical communicator); plus Dr Sue Black from code-breaking hothouse Bletchley Park. The veritable horde of over 100 exciting and interesting talks makes up probably the strongest line-up EuroPython has ever had.

Best of all, Python conferences like this one are organised and run at a grass-roots level. By enthusiasts, for enthusiasts, making them quite the most fun, educational and interestingly social conferences I've ever been to. Personally, I love the resultant absence of overriding commercial agendas - everything is done purely for the benefit of the delegates, and is pervaded by the community values that made you love Python in the first place.

One upside of this is that the conference is cheap - only £190 to attend. Interested enthusiasts can easily pay their own way. As a result, this is one of the few technical conferences that still has a robust attendance this year - both of presenters and delegates. Many others have been decimated or even cancelled altogether.

There is a downside though, and here's the rub:

The good folks organising EuroPython in their spare time are desperately short of volunteers to be session chairs.

If you're going to EuroPython, you could help out! Yes, YOU! You could sign up for the sessions you want to watch anyway, so you shouldn't miss anything. Just imagine the warm and fuzzies! The KUDOS of a roomful of eyes. The POWER of cutting off over-running speakers in mid-flow*. The WARMTH of a deftly-cupped microphone.

(*anyone cutting the power on Sir Tony will be duly ejected from the premises)

Responsibilities are described in loving detail here:

Please think about it, and if you fancy it, sign up soon (on the wiki page above) because we're currently all a-flutter wondering how the heck we're going to manage this. :-)


Opengl Shading Language

OpenGL Shading Language cover

by Randi J. Rost (2nd Edtion, 2006)

I've had a hobbyist interest in computer graphics for years, but had avoided the technology of shaders these last few years, thinking that they were just another layer of complexity which I didn't need to embark upon while I was still getting to grips with the standard OpenGL API.

With hindsight, I was wrong. I was recently cajoled into getting on board after talking to Mike Fletcher (creator of PyOpenGL) after his talk at PyCon, and now I feel as if I should have read this book years ago. Shaders solve many of the problems I've been happily messing with for ages, in ways that are easier to implement, more powerful, and more performant.

I whined about the Red Book, but this "Orange" OpenGL Shading Language book is brill - just what I needed. Incisive without being overly terse, practical, and once it got into the chapters about applications of multidimensional Perlin noise it got me all hot'n'bothered about computer graphics again. Yay my inner geek!

Update: I started this book fascinated by using vertex shaders to transform geometry on the fly, with little interest in the superficial fragment shaders used to decorate the rendered surfaces with pretty images or lighting effects. Since finishing it, this has reversed: I've become obsessed with noise and Fourier transforms and all the paraphernalia of fragment shaders, imagining relatively simple fragment shader that could, I believe, provide a surface with infinite levels of detail. I dreamed about my old university 'Signals & Systems' type lectures. Uncanny.

Update2: Ohdear. Once I started trying to write anything more than the most trivial of my own shaders, I ran into an unexpected problem. My shaders just wouldn't link. I couldn't figure out why. The book was no help. Google was no help. The error messages certainly weren't any help (thanks ATI.) Eventually I realised that the 'built-in' noise functions which are part of the OpenGL shader language are simply not implemented by the vast majority of graphics card manufacturers - you have to roll your own. Which is not a major deal-breaker, but what is disappointing is that the OpenGL Shader Language book makes absolutely no mention of this in any of the chapters plural in which it lovingly describes the built-in noise functions, along with their characteristics and uses. Perhaps I spoke too soon when praising the book. Maybe it is another case of idealistic OpenGL theory that has something of a disconnect with real world development. Maybe the book was written before this situation came to pass - regardless, it's no bloody use to me.

Rating (oh, how I love my new rating system. Check this one out:)

10/10 if you want to learn the theory of how to use the OpenGL shader language.

0/10 if you don't.

Cloverfield (2008)

Cloverfield cover

Against my better judgement I couldn't help but snag a torrent of this. Sure enough, as the opening credits kicked in, my housemates assured us it was rubbish.

But then what happened is that I proceeded to love it. Clearly it polarises. The whole thing is shot in a shaky handicam held by one of the characters - imagine Blair Witch meets 9/11, only it isn't terrorists, it's a giant, evil whatthefuckisthat stalking the streets of NYC. It reminds me of Primer, in which the script is so realistic and lacking in over-ripe gravitas that, unusually, the actors don't even look like they are acting! What a concept. Well this is similar - albeit a lot dumber - but the strength is not in the script, which isn't especially strong, but is in the novel method of presentation.

There's clearly a limited number of movies that could be made like this, but for me, it was a welcome respite from the staged set-pieces of Hollywood's more conventional output. The sense of panic and confusion was beautifully heightened by the total lack of exposition - viewers only get to see what this small group of characters get to see, and even that is in blurry and imperfect fragmetary snatches. The monster, when it is even visible, is only glimpsed from afar. It was the closest a movie has ever come to creating the kind of tense, terrifying immersion that really great computer games can create.

I was amused to note that a bridge they take shelter under at the end looks exactly like the bridge they took shelter under at the end of The Day The Earth Stood Still (2008) - do all the bridges in Central Park look the same, or does this one have some special meaning? Anyhow, the final scene is saddening and telegraphed quite plainly from the opening shot (Camera retrieved at incident site US 447. Area formerly known as "Central Park") and it makes me weep with relief that a movie could so willing try and break the mold.


0/10 if you're not into monster flicks, or if handycam footage makes you vomit.

10/10 If you fancy being scared silly by a giant alien monster.


Sometimes when programming I like to leave unit tests running repeatedly in one window while editing the code and tests in another. The bash command watch is useful for this, and can highlight the differences between one invocation and the next in inverse.

I wanted a version of watch for use on Windows, so I whipped up a quick Python script, testwatcher, which produces output very similar to watch, but is cross-platform, and features not just inverse text, but yellow inverse text. Woo-hoo!

$ python
FAIL: testThat (__main__.TestWatcherTest)
Traceback (most recent call last):
  File "", line 12, in testThat
    self.assertEquals(0, randint(0, 10))
AssertionError: 0 != 4

FAIL: testThis (__main__.TestWatcherTest)
Traceback (most recent call last):
  File "", line 9, in testThis
    self.assertEquals('one', object())
AssertionError: 'one' != d24460>

Ran 3 tests in 0.001s

FAILED (failures=2)

Incidentally, the above test makes it very clear that Python objects in successive processes get new addresses on Linux, but interestingly on Windows the same addresses seems to get re-used for different processes.

I can't help but suspect this is a dumb script to have written - it should only be a:

 while True:

but in order to shoehorn the inverse text and colors in, it's grown to 300 lines - a hideous bloat for a minor superficial thrill. Plus the Windows version flickers terribly - I'm currently using system('cls') to clear the screen and then redraw it every second. I'll do some searching for better ways to do it.

However - I've long wanted a Python interface to perform simple terminal actions like colors and animation on different platforms (the standard library 'curses' module that would otherwise do the job is simply not implemented on Windows.) So maybe it's time I used this script as an excuse to figure this out. Suggestions welcome.

Update: This idea may have now reached a viable fruition here.

The Day The Earth Stood Still


The Earth obligingly stood still for us twice this week, on back-to-back nights. In each, a lone alien man arrives in a spaceship with his giant robot buddy Gort, to tell humans that they must mend their destructive ways or be destroyed.

The 1951 version was very Fifties - intrusively hopeless special effects, and seems to my eyes to be riddled with outlandish social etiquette and hopelessly naive politics. I suppose in the years following World War II any platform for preaching pacifism seemed worth a shot. If only more people considered it worth preaching today. I completely missed the Christian allegory that permeates the movie until it was pointed out to me: The alien comes from the heavens, and lives amongst common people, taking the name 'Carpenter' to blend in. He preaches peace to humankind, or else warns we will suffer a fiery apocalypse. He is our intermediary to 'Gort' (in fact the servant of Gort, in the original script) who later resurrects him from the dead, so that he may deliver his final message before being taken back up into the skies. Cute if you're into that, I guess.

Equally predictably, the 2008 version was very Naughties. Intrusively overblown production values string together a mediochre script. The pacifism and Christian message of the original has been replaced with a more timely environmental message - the writers perhaps intuiting that modern Americans are not so receptive to anti-war talk. Otherwise the scope and potential of the ideas at play are completely wasted - lost amidst the creative wasteland of a budget that could no doubt have fed countries. Once provoked, Gort unleashes self-replicating insectile microbots, which swarm and consume Philly, spreading fast. At the last moment, Keanu / Klaatu sees some humans hugging and crying, and has a big change of heart - the Earth deserves to be spared, after all. What a crock.

So there you have it. Watch this space for more reviews from me - wasting nights of my life, so that you don't have to. Final ratings:

10/10 if you are a stump-sucking mealy-mouthed pig-dog with googly eyes.

0/10 if you have any vestigial glimmers of taste or discernment.


Makers cover

by Cory Doctorow (not yet published.)

Cory very kindly brought an early manuscript of this as a gift to Michael, Giles and I when we met him a while ago, and I've been wracked with guilt ever since because I apparently lost it soon after. Thankfully, it recently turned up (on Christian's desk - my fault!) last week, so I happily finished it pronto.

It's his best fiction yet! He must be honing his abilities with practice. \o/ Michael do you want it next?.

Christian doesn't like my subjectivity-proof rating system, so this one is specially for him.


10/10 if you want a lightly styled but deeply speculative and engrossing story that winds a like a sightseeing tour around the social and personal ramifications of the ways in which modern technology is changing the way people interact, organise and get things done.

0/10: If you aren't interested in the ways society is changing under our feet.

Envisioning Information

Envisioning Information cover

by Edward R. Tufte (1990)

In much the same vein as Tufte's The Visual Display of Quantitative Information, and displaying the same calibre of deeply incisive common-sense that cuts to the heart of all that's right and wrong about the art and science of 'information design' - graphic design's more pragmatic nephew.

If you love beauty in highly functional graphics, from maps and diagrams, charts and graphs, tables and typography, then this is for you.


10/10 If bad diagrams make you cringe, and good ones make you laugh out loud.

0/10 If you only care about beauty, but not about usefulness. Or if you don't have eyes.



by Lawrence Lessig, 2008.

Is creating a mix CD for a friend an act of creativity, or a criminal offence? When you shoot a home video of your child which has a TV on in the background, is there really any need for lawsuits? What business do federal laws have in trying to regulate this sort of activity anyway?

For those, like me, who view modern copyright law as a morass of intractable problems, irreconcilable interests, overreaching government intervention and profoundly unfair restrictions on personal freedoms, Professor Lessig's words are a welcome infusion of clarity, pragmatism and respect for all interested parties.

With an engaging and accessible style, he describes exactly what is wrong with modern copyright, with clarity and impartiality, and why this is a deep and pervasive problem that cuts to the heart of all that we value in human culture. He describes how fixing this would benefit each of us, from individual consumers and amateur producers, through professional writers, musicians and copyright holders. Then, in a surprisingly constructive final section, he outlines five simple changes to copyright law that would, at a stroke, fix all the major problems, vastly simplify the situation, eliminate the ambiguity over the legality of our everyday actions, and all without apparently causing any harm or loss to any interested party.


10/10 If you have any interest in the forces that are reshaping our society and turning industries upside-down within the space of years.

0/10 If you dislike freedom or free markets, or are a big fan of overbearing government regulation and monopolies.

Infinite Jest

Inifinite Jest

by David Foster Wallace (1996)

I've had such a diverse set of reactions to this, and how could I not? The writing is bold and idiosyncratic throughout. The novel's story is not presented in chronological order, and the timeline is obfuscated by the gleeful adoption of 'subsidised time', in which traditional numeric monikers denoting each calender year are replaced by the sponsored labels designated by major corporations - 'Year of the Whopper', and so on - a marvellous concept which nevertheless makes it completely and artificially impossible to tell what the hell's going on until about 500 pages in.

The whole novel unashamedly celebrates the author's literary and formal grammatical credentials - from the extraordinarily-crafted opening scene, where a tragically misunderstood literary genius disastrously fails a university entrance interview, with just a hint of a semi-autobiographical air about him. Scenes of superlative execution are interspersed with a narrative that is, on the whole, told in the third person but in the argot of the currently eminent protagonist, leading to large swathes of the book which are, like, more than conversational in their familiarity. The combination gives rise to a relentlessly inventive stream of neology and malapropism.

While the book resoundingly makes many insightful points by the conclusion, the story which serves as a vehicle for their delivery is, a collision of ideas, introducing entirely new and unexplored premises at the 11th hour, which peter out, ignored and unresolved, by the final page. The jest continues on, I suppose.

The insidious footnotes for which Wallace's writings are well-known do not serve to streamline the prose by separating out incidental annotations, but instead seem specifically employed to elevate the reader's awareness of the footnotes themselves. Including them in the main body of the text would allow for the possibility of a busy reader failing to give each pithy addendum it's full, weighty consideration. Wallace cunningly obviates this possibility, by discreetly giving pause to any reader assiduously trying to do their best with a challenging book, requiring them to invoke the titillating ritual of thumbing forward a literal thousand pages or so, giving an involuntary moment of rest in the narrative in which the reader may properly anticipate the mysterious text to be revealed while they dereference the footnote's numeric identifier, and then a second pause afterwards to properly digest and appreciate, while they thumb a literal thousand pages back again to find where they left off. Three hundred and eighty eight times, no less. Plus sub-footnotes, obviously. Some of these are pages-long tomes of critically insightful dialog between major characters. Many others are completely irrelevant technical specifications. I have to ask, what the fuck is going on here? Does this really make the novel somehow better? While I laughed and cried about the content of many of the footnotes, I remain unconvinced by the mechanism of their delivery.

I rant about these aspects of style because these are definitely the first impressions any reader will have. Getting into the book does require a little work. But fortunately Wallace more than provides the incentive to do so. The book ranges over many areas, but is mostly about addiction, in its many forms, and its relationship to freedom of will and to happiness. These are deep and interesting topics, and are unflinchingly explored with a very keen eye. For every one of the annoyances mentioned above, the book provides powerful rewards for those who stick it out. The heart-wrenching depictions of people going through the utter destruction of their humanity are as touching and insightful as anything I have read.

There are some problems or tasks in life which are small enough that an individual can overcome them by force of will, grinding down the problem until it is flattened and overcome. This approach fails, however, when the problem is too large or too hard. Some problems cannot be crushed by any individual. To navigate past them requires that, instead of trying to demolish the problem, the individual must instead mould themselves to fit around the problem's existing contours. People emerge on the other side of these experiences triumphant but sober - having been changed to their core by the experience. I consider Infinite Jest to belong to this latter class of experience. From the base-camp of its 981 pages (plus 98 of footnotes), it is intimidating and uncompromising. You love it and hate it in equal measure, and it makes no attempt to pander to the former. But as I ploughed on, through it, week after week after week, I grew to enjoy it more and more and more. I began to see reminders of it everywhere I looked. I spotted echoes of its style in the speech of friends who are fans of Wallace. It began, very subtly, to infect my own speech and writing. The topics it covered touched me to the core, changing my outlook on deep issues such as religion. By the time I reached the very last page I emerged, bruised and weary, but also tremendously excited - I actually flipped it right back and re-read the first few chapters all over again.

Now for perhaps the greatest test to date of my supposedly subjectivity-proof rating system. Here goes:


10/10: If you are ready for a challenge, that entertains and wrenches in equal measure, stretching you, changing your definitions, taking you on a tour of regions you never knew existed. It will make you laugh and it will make you cry. It will leave you a different person than when you began.

0/10: If you can't be bothered.

Letter to my Member of European Parliament : Proposed Copyright Extension

Thursday 19 March 2009

Dear Baroness Ludford, (Update: This was sent to all eleven of my MEPs)

I am writing with reference to the European Parliament's vote on copyright extension for sound recordings, due to take place on March 23rd.

As you know, this is a complex issue, but I shall try my best to keep this short, I know you must be busy.

Amongst the justification for this particular extension to the term of copyrights, is the idea that artists need more protection, particularly towards the end of their lives when their income from royalties might dry up as their copyrights expire.

This is misleading in the extreme. Under the current 50 year term, an artist recording at age 25 will be protected until age 75, and any artist who records throughout their lifetime will be protected until many decades beyond their death.

There is no need whatsoever to extend the term in order to benefit or incentivise artists.

In fact, as everyone knows, artists in practice almost never end up owning the copyrights to their own works - the labels do. While artists and labels are aligned in the desire to sell as many records as possible, they are in direct opposition when it comes to dividing up the proceeds. The majority of the income from sales goes to the labels, because they have such an overwhelmingly dominant position of power in the relationship. No label is reliant upon any individual artist, while every artist is very much dependant on their label, to whom they are tied by contract for many years. Strengthening copyright only strengthens the position of the copyright owner, ie. the labels, at the expense of what little leverage the artist may have. Extending the term of copyright only enhances the labels' income, not the artists.

It is not the role of copyright to be a protectionist measure to support labels who are having to adjust their business models in these times of great change. The last thing we need to do is to construct laws which chain Europe's creative industries to last-century modes of operation, at precisely a time when the current tumult will reveal as yet undreamed of exciting new ways of doing business.

As you know, copyright is intended to stimulate the creation of new creative works, by enabling the artist to earn an income from their own creations.

There exists significant evidence to suggest that stronger copyright may actually inhibit the production of creative work, by allowing monopoly-level profits to be reaped from ever smaller amounts of creative output. The composer Verdi is notable for suddenly decreasing his creative output when copyright laws over music were introduced in 18th century Italy - his personal correspondence indicates that he simply had to work less because he was earning more from his earlier compositions. (note that he retained copyright over his own work.)

Similarly, there is the very vital and oft-overlooked influence of the creative environment which our society fosters. It could well be that freedom to borrow and build upon inspiration from other artists is a vital input to the engines of creativity, and to encourage fledgling artists. By way of anecdotal evidence I say it would not be very controversial to suggest that the last great English composer of the Baroque period was Handel, who coincidentally died around the same year copyright over music was introduced in England. After that, there is a dearth of truly top-class composers from England, right up until the 20th century. Meanwhile Germany, too preocupied with invasions and reforging of the nation to introduce copyright laws over music, went on to produced greats like Bach, Mozart and Beethoven, in a succession of creative gear-shifts which formed the romance and classical eras, all done with no copyright over music. *1

I apologise if I have been unable to express my points very succinctly, but I hope I have made given you some reasons to consider rejecting this extension of the copyright term, or at least to consider assessing it in the light of evidence over its theorised effects, rather than the deliberately misleading suppositions put forward by those representing the special interests who stand to directly benefit from the proposal at the expense of artists and of the rest of society.

With all my gratitude and respect for the work you and your fellow MEPs have done and will continue to do to resolve these issues,

Yours sincerely,

Jonathan Hartley

*1 See this February 2009 Harvard paper which notes:

"An attempt to determine the impact of legal changes on entry into composing is inconclusive. The paper shows, however, that a golden age of musical composition nevertheless occurred in nations that lackedcopyright protection for musical works." The paper is summarised persuasively in an online news article here: