Wednesday, December 30, 2009

Security Theatre

Before I get started, this post is likely to come across as a bit of a rant. If you don't want to read my half-formed, lefty crap, at least read the article by Bruce Schneier on CNN that inspired it. It's much better written, and far more important that it gets wide coverage than my version. ;-)

Having said that, if you're still with me, here goes: wasting money bugs me, especially when it's a government that's doing it for the purposes of appeasing the 'voice of the people' (see the end of this for more on that meme!). When governments spend enormous sums of money on visible security activity at airports this gets me particularly riled because it's pointless. I quote from Bruce Schneier's opinion article on CNN:
Often, this "something" is directly related to the details of a recent event. We confiscate liquids, screen shoes, and ban box cutters on airplanes. We tell people they can't use an airplane restroom in the last 90 minutes of an international flight. But it's not the target and tactics of the last attack that are important, but the next attack. These measures are only effective if we happen to guess what the next terrorists are planning.
If we spend billions defending our rail systems, and the terrorists bomb a shopping mall instead, we've wasted our money. If we concentrate airport security on screening shoes and confiscating liquids, and the terrorists hide explosives in their brassieres and use solids, we've wasted our money. Terrorists don't care what they blow up and it shouldn't be our goal merely to force the terrorists to make a minor change in their tactics or targets.
Our current response to terrorism is a form of "magical thinking." It relies on the idea that we can somehow make ourselves safer by protecting against what the terrorists happened to do last time.
Of course, the result of this 'magical thinking' is also the terrible changes that are taking place to the due process of criminal proceedings at law. The introduction of arbitrary periods of detention without charge, the holding of terrorism-related trials in camera, the rhetoric of hatred of any other political or cultural outlook than our own... this is dangerous stuff that just serves to increase the threat from those opposed to our way of life. Back to Bruce:
Despite fearful rhetoric to the contrary, terrorism is not a transcendent threat. A terrorist attack cannot possibly destroy a country's way of life; it's only our reaction to that attack that can do that kind of damage. The more we undermine our own laws, the more we convert our buildings into fortresses, the more we reduce the freedoms and liberties at the foundation of our societies, the more we're doing the terrorists' job for them.
So, when you're thinking about who to vote for in future (in the UK general election, for example), why not challenge them to stop the damage that's being done to our relatively free way of life, pull back from culturally aggressive stance in international politics, and stop stoking the flames of the conflicts that spawn terrorist acts.

p.s. on the 'voice of the people', it appears the ‘newspapers’ are being deemed to be the ‘voice of the people’ in that mad country, the (dis-)United Kingdom, so a populist, theatrical, approach to security is the inevitable outcome. Of course, it is the broadcast & newsprint media that treat said ‘newspapers’ as ‘the voice’, in addition to their weak lackeys in Westminster. It’s a vicious circle of bullying and subservience maintained by those with the loudest voices, the deepest pockets and the least integrity.

Monday, December 28, 2009

Camera Update

Christmas gifts have come, and I now have a Sigma 70-300mm zoom lens for my camera. I've tried to photograph the moon with it, but it's amazing how difficult a subject it is. It took 16 shots before I even got something remotely better that a white blob in a black sky. The best I could do in 24 shots is in my photostream, but believe me, I'll be trying that again once I get my cable release!

I also tried to shoot the constellation of Orion - a nice easy constellation to recognise in our northern night sky. Last time I tried, I accidentally left my camera in noise reduction mode, which gave photos that consist of a dozen seriously blurred stars. This time I tried without NR... and instead got a dozen faint blobs with trails that indicated the camera had moved somehow during the 6-8 second exposures. Not quite sure how this happened, but all I can put it down to is that a) my house is old and I was on the top floor, where the floor-boards are not the smoothest and most solid in the world, b) I was manually pressing the button, and c) maybe I breathed on the camera on it's tripod just a little too loudly? So, next time, I'll go to our back yard, so the tripod will be on brick, and I'll use my new cable release... expected from Amazon any day now.

Learning, learning, learning...

Sunday, December 27, 2009

Copenhagen Summit on Climate Change

It's taken me a while to figure out my reaction to the train-wreck that was the Copenhagen Summit on Climate Change, but what finally got me to the point where I can write something was this story (via Chris Samuel's blog in Oz) about China being the force behind the failure of Copenhagen.

Now I'm caught between "I can't believe China could act so terribly" and "Huh, now they've found their scapegoat." This does make we wonder why the 'western powers' didn't make it clearer at the time that China was the source of the problems and either shame them into proper action (a strategy unlikely to succeed due to the lack of the need for the Chinese leadership to respond to any kind of democratic process), or simply to exclude China and set the world on a path to economic exclusion of the country too - I'm sure there are other countries that would be very willing to take up the manufacturer industries currently supplied by China.

There is an interesting kicker in Chris's blog post, and that's from his wife - Donna, who commented on the post thus:
If China railroaded Copenhagen then isn’t it time those of us in Western nations stopped filling our Christmas stockings with cheap Chinese goodies whilst ignoring its those very actions that drive China to want to exhaust its ‘fair share’ of the ‘Industrial Revolution’. We may not have power over our leaders or Copenhagen, but Western buyers do have pocket power without which they can let China know what they think about ethics. Think about that next time you reach for your credit card for that latest gadget. Which regime are you supporting.
I guess this is the small-scale, personal approach to implementing the strategy I suggested above.

Monday, November 23, 2009


Recently I replaced my aging Canon completely manual SLR with a whizzy new digital SLR. Okay, so it's only a Sony alpha 200K, but it's new to me and fun not having to consider how many shots I can take before I run out of film.

I went for a wander this afternoon - first real opportunity since getting the camera with decent weather, and the best of the results are here.

Tuesday, September 01, 2009

Obligatory 9/11 post

There's been a lot of talk of gross government sponsored conspiracy theories surrounding the events of 9/11, and I'm still to be convinced that any government is truly that competent (why assume a massive, all-encompasing, conspiracy when there are much simpler explanations - the principle of Occam's Razor).

However, this article was sent to me by my Dad, who is rather more convinced of the sheer evil of the US government under George Bush (jnr).

I'm waiting with interest to see if the report is taken up by any more news sites than just a local California newsletter, but if taken at face value, this does seem a reasonably un-rabid, professional, and worrying report. (Not so, many of the readers' comments at the bottom of the article!)

Of course, if other media sites ignore this, it could be that they simply don't give the organisation credence, but conspiracy theorists will say that the report will be suppressed by the uber-powerful US government, and they'll tell the global media to ignore it too, and the global media will obey them... for some obscure reason. Pretty much a no-win situation there then. ;-)

Monday, August 31, 2009

Alan Turing Petition

If you're reading my blog, you're probably the kind of person who knows exactly who Alan Turing was, not to mention the Turing Test (which I also mentioned in my previous post). However, you may not know that he was convicted for gross indecency (in admitting to an actively gay relationship) in 1952, which led to him being chemically castrated, his loss of security privileges, and his loss of work with GCHQ (wiki), and thence (it is thought) to his suicide in January 1954.

Why do I bring this up today? Well, enough is enough, this man deserves a better ending than this. He deserves a full apology from the UK government for their treatment (legally, morally and chemically), and I'd like to see him acknowledged as one of the greatest minds ever to come out of UK science and mathematics. Every computing professional in the country owes this man a debt of gratitude for his work in establishing the science of computing, as does, indeed, the rest of the country for his code-breaking at Bletchley. (though, obviously, he was not alone in either field by any stretch of the imagination!)

There's an electronic petition being lodged with the UK government, and here's the BBC article that brought it to my attention.

Saturday, August 08, 2009

The Monomyth vs. the Automyth

I subscribe to the GameSetWatch RSS feed, and generally flick through their headlines on Bloglines (an RSS aggregator that I thoroughly endorse, especially the beta version) in a spare moment or two each day. Most of the content leaves me quite cold, but this article actually caught my attention!

I've read around half of Joseph Campbell's book, The Hero with a Thousand Faces, but got bored and bogged down in his continual obsession with his Speilbergian father-son conflict as the driving force of all narrative. (Or is that perhaps, Speilberg's obsession in his movies with Campbellian father-son narratives?) His 1940's writing style doesn't help, but then Christopher Booker's 2005 re-tread and elaboration of the material, The Seven Basic Plots (or here for the US), suffers from the same obsessions, is nearly twice as long, and could have done with some serious editing down to reduce redundant repetition. (Mind you, I did get 80% of the way through this one)

So, I've not read every last word on the subject of the monomyth, or the seven basic plots, but I believe I have an amateur understanding of them. (Yes, go on, my opinions are incomplete and therefore entirely invalid... feel free to go read someone else's blatherings instead).

(note to the reader that chooses to continue, where I use a male pronoun, please feel free to substitute a female one if it helps you)

Quick summary: hero in the 'normal' world is challenged to go beyond the boundaries, overcome 'evil' (the father) in some way, returning changed to the 'normal'. There are, of course, many more details to monomyth, and the seven basic plots (quest, rags-to-riches, overcoming the monster, voyage & return, comedy (ending in love or life), tragedy (ending in some form of death), and rebirth) have more subtlety than that, and the article at GameSetWatch gives a more complete summary of the basics.

However, they mostly miss the point that elements of good story telling also involve subverting the monomyth, or the expectations of the basic form of the plot chosen (consciously or otherwise). For example, the hero might return from the experiences unchanged in himself, but the 'normal' world might instead have been changed as a result of his actions.

Anyhow, the point of that article is to ask why, if the monomyth is so well explored by Campbell and his acolytes, has no-one actually built an 'automyth' - a monomyth generator. This is the intriguing bit. It's all very well stating that there's an algorithm for a story, and even that one can subvert (invert?) or skip one or more, or most, of the 17 steps in the algorithm, but without a detailed language to express a world model, or two (possibly more) in which to run that algorithm, automation is just a dream.

How does one tackle filling in the steps in the automyth algorithm? Perhaps by giving the machine a library of options:

  • people: farm boy, new advertising executive, grizzled mountain man, washed out detective
  • places: Alabama USA, the Shire (or an analogue of), a moon-base, a small shop in London
  • challenges: alien invasion, disease, death of a parent, financial ruin (personal or global)
  • monsters: the boss, an out-of-control robot, the Devil, the judge(s)
  • assistants: the girlfriend, the grand-parent, the old mage, the bestest buddy, the advocate
  • ... and so on
But does this actually achieve anything? Can we build a grammar with which to join these elements? Do we need to?

I think what we're looking at here is a new expression of the Turing Test (a test where one person cannot distinguish which one of two subjects is human, and which one a computer, by means of asking questions). And if we define a world, or set of worlds, within which the automyth machine will operate, we have a limited Turing Test (the questions are limited to a specific subject).

At which point, can we talk about applying this to ludonarrative generation? Certainly we could build a quest generator (a la Diablo II), but that's only a subset of the challenge. Can we really express enough full plots. I think not, at least, not until we have a way to describe the entire world to a computer, give it a way of imagining alternatives, then (and this is the really difficult bit) giving that computer a way to judge which of those alternatives could actually hang together as an alternative. This is such a big job, I think I'm off to do the laundry instead.

Thursday, August 06, 2009

VirtualBox on Windows Hosts

A friend of mine has just written up his comments on installing Ubuntu as a virtual machine on a Windows host using VirtualBox 3.0.0 (the latest version at the time of writing, 3.0.4 has been released now). It's clear from his instructions that this is a fairly simple process, with the possible exception of a gotcha around networking. However, I did notice one other issue with his instructions that will probably come back to haunt him in some six months time or so... and when it happens it will be hard to find the cause.

As a side note, I'm also using VirtualBox, but on an Ubuntu host, to enable me to have a Windows XP running occassionally whilst I use Ubuntu for most work, even though I am writing this whilst running Vista (dual boot on the same machine).

Andy, you might want to be careful about using a dynamically expanding disc file for your root file system. NTFS is notorious for fragmenting files as they grow - especially if your file is living on a partition with other activity. And as we all know, the more fragmented a file gets, the poorer the performance becomes as the disc heads have to seek across more and more diverse areas of the disc to get to the content of the file. Where you have a virtual file system in a file, this is only going to get worse, because the file system you have inside the file will have no knowledge of how the data is distributed over the real disc, so it can't make any decisions over data distribution within the file system that have any meaning on the disc platters.

To avoid this, you need to be able to set a specific size for the virtual disc file. However, this will require a little pre-set-up work. First you need to decide on what is a sensible, reasonably future-proof size for your root partition. I notice that the VirtualBox installer chose 8.6GB ... that sounds quite reasonable to me, though I'd be tempted to go for 10-12GB myself. Next, you need to defragment your chosen disk partition until there is a region of free space at least as large as your desired file, and as few other gaps as possible (in order to give NTFS as little choice over where it puts the file as possible).

Now you can click the VirtualBox "New" button, to create your virtual machine.

This same issue affects the Windows page files, by the way.

Thursday, July 16, 2009

Logging out with HTTP Basic Authentication

This post arose from the fact that I have an application running on an application server that doesn't seem to support HTTP BASIC authentication very well (Glassfish v2, if you're interested). So I have a web-server sat in front of the application server, doing the authentication, and passing through all authenticated requests to the application server behind. (This configuration also works around a bug in Glassfish v2, where the HTTP response size is wrongly calculated on static resources, which confuses Seamonkey, although Firefox copes ok)

There is a downside to this arrangement, and that is that HTTP BASIC authentication doesn't really support the concept of logging out!

As normal with a Java web application, the logout operation is a matter of invalidating the current HttpSession, throwing away any cached user configuration, and redirecting the user to a 'you are logged out' page. This can be achieved by having a filter or a servlet pick up the 'logout' request, mark the HttpSession associated with the current HttpRequest object, and deleting the JSESSION cookie that identified the session. The response then just needs to contain a logout message, or redirect, or whatever you desire for your site.

That's all well and good if it's just the web application involved. However, in our scenario, we have web server to consider too. As it stands, there's nothing in the HyperText Transfer Protocol ('HTTP' to you and me) that allows the web application to tell the web server that the HttpSession is over - the application doesn't talk to the server, so (according to almost all the web sites I could find with Google) there's no way to tell the server to invalidate it's knowledge of the end user and their credentials.

Or is there....

The key factor is that it is possible to make the server re-challenge the user for their credentials in the same way as they were when they started using the application, and this can be made to have the same effect as logging them out. Note that the critical fact that previous web-pages on this subject seem to have missed is that HTTP BASIC authentication has a realm parameter.

By knowing what the realm is that the web-server used to the authenticate the user, we can cause the browser to re-authenticate against that same realm, by challenging the browser with an HTTP 401 (just like the web-server does).

The process (in my application) works like this:

  1. The user clicks the logout link to go to /logout.html, which tells the user they are being logged out. This is a nice-to-have page to make this process a little more friendly, you could skip it and go straight to the next step
  2. The browser pauses for 1 second on this page, then redirects to /logout
  3. This url is mapped to a logout filter, which does the normal session termination activities I mentioned above. But in order for the next step to work, the filter also registers the current HttpSession key with the LoggedOutServlet (storing it in a singleton HashSet of keys), and creates a has-logged-out cookie with the HttpSession key as the value of the cookie.
  4. The logoutFilter then redirects to /loggedout which has been mapped to the LoggedOutServlet in my web.xml:
  5. <servlet>
      <description>Logout Servlet</description>

  6. The LoggedOutServlet looks for the has-logged-out cookie. If cookie exists, and the value is in the servlet's register of logging-out keys, then the key is removed from the register, the cookie marked as deleted, and an Unauthorised (HTTP 401) response is returned to the user:
    public void setupResponseForLogout(HttpServletResponse response) {
        response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); // HTTP 401
        response.setHeader("WWW-Authenticate", "Basic realm=\"xyzzy\"");

  7. The user is then prompted by the browser to re-authenticate. The critical thing here is that the realm (set to 'xyzzy' above) is set correctly in the response. If this is done, then the web-server (which must be authenticating with the same realm) will correctly re-authenticate the user if they try to login again. So the consequence is that the user is effectively logged out, and cannot get back into the application without being challenged for their credentials again. This works because the browser has been asked to authenticate against a specific realm, so that will be used in the authentication process, and will force the web server to full re-check the user's credentials - refusing access if they get it wrong.
NB. all the urls used in this process must be accessible without logging in (i.e. anonymously).

Wednesday, July 01, 2009

TreeSet and implementing the Comparator interface

Time for a bit more technical content. You might begin to discern a pattern here: gotchas in equals(), hashcode() and Java Collections.

My experience of Collections thus far has taught me that most of them are built upon detecting object equality through the equals() and hashcode() implementation in your class. See my earlier post and the posts of Andy Beacock referenced therein. However, today I ran into problems with objects vanishing in a TreeSet.

Back to the requirements first. I have list of Bank Account objects I wish to show on a web-form, but that list should also be modifiable by the user with an Add Form, and a Remove button on each listed account. So far so good. One more thing, the list has got to be in account name order on display. For this example, a Bank Account consists of a pseudo-primary key (id), a Bank Name, an Account Name, an Account Number, and a Sort Code. The id is not shown, and the records are unique by Account Number and Sort Code (and therefore implicitly by Bank Name).

Obviously, Bank Names should should not really be store in a Bank Account record - they should be stored separately and referenced by foreign key, as indeed, should Sort Codes - in fact, in an ideal world, the Bank Account record would be an id, a name, an account number and a foreign key to a branch as identified by the sort code. However, you know as well as I do that this is not an ideal world, and most of the time, we have to deal with the world as we come to it.

So, back to my slightly contrived example. I'm going to ignore completely all the contextual information about display technology, form interaction, transactions, etc., and concentrate on the core issue: SortedSets are nasty wee buggers!

There are two ways to manage the display of sorted data: sort on insert, and sort on display. If you're displaying often, and inserting & deleting infrequently (as in this example), sort on insert is preferable, otherwise you spend a lot of time sorting your data again and again with no change to the data.

Having looked at the implementations of the SortedSet interface, we really only have one available in the Java SDK (I'm staying away from the Apache Collections for now), and that is TreeSet, for which you specify a Comparator at construction time. Naively, I assumed that my comparator would just be interested in the Account Name - that's the field by which I wish to sort, after all.

    public int compare(BankAccount o1, BankAccount o2) {
        return o1.getAccountName().compareTo(o2.getAccountName());

(I'm leaving out the normal defensive programming and exception handling for clarity)

However, my BankAccount class implements equals() and hashcode() as normal, with the sortcode and the account number - these being the 'business key' if you like. So, on this basis, I expected TreeSet to sort on name, and use equals() and/or hashcode() to determine whether the Set contains a given BankAccount on insertion - in the same way that HashSet would.

Ooops, no.

Turns out that TreeSet doesn't use equals() or hashcode() at all. It uses the Comparator for sorting and contains() checking. So now, my Comparator implementation looks like this:

public int compare(BankAccount o1, BankAccount o2) {
   int result = o1.getAccountName().compareTo(o2.getAccountName());
   if (result == 0) {
       result = o1.getSortCode().compareTo(o2.getSortCode());
   if (result == 0) {
       result = o1.getAccountNumber().compareTo(o2.getAccountNumber());
   return result;

Now I have data sorted on insert and display, and the data doesn't get lost if someone enters two accounts with the same Account Name.

In conclusion, I think that the only reason this gotcha got me was that I was motivated to use the TreeSet simply by the requirement to sort by name, so I wrote the Comparator with only that in mind. A correct implementation of really should include the business keys of the entity under consideration... of course, I'd just done that, I might have had even more trouble with the sort-by-name requirement (i.e. a non-key property).

Friday, June 19, 2009

I want one...

I've been talking about A4-sized panel computers for years, but never had the wherewithal, money, time, guts or technical knowledge to make good on the idea. Now someone else has done it, and I want one.

Update: oh dear, it all ended in tears.

Thursday, June 18, 2009

HashCodeBuilder is great, but ...

In real life, I'm a Java programmer, so I thought I'd bring a little technical content to this blog for a change. This issue came up today at work, when I spotted something weird in how some objects were behaving in a HashMap, something like this.

When doing domain modelling, one of the important things to get right is the definition of the equals() and hashcode() methods. I'm going to use a class that's used to represent a compound primary key in a Spring/JPA/Hibernate environment. The PaymentMethodId class has an owner, and two currency codes - one for the source of funds, and one for the destination of the funds, to allow for currency conversations between the two.
public class PaymentMethodId extends CompositeId {

    private Integer ownerNumber;

    private String  sourceCurrencyCode;

    private String  paymentCurrencyCode;

      * Compare unique business key (number, source code and payment code)
    public boolean equals(Object other) {
        if (this == other) {
           return true;
        if (other == null || !(other instanceof PaymentMethodId)) {
           return false;
        PaymentMethodId paymentMethodId = (PaymentMethodId) other;
        return ((this.ownerNumber == null ? paymentMethodId.ownerNumber == null
                                          : this.ownerNumber.equals(paymentMethodId.ownerNumber))
            && (this.paymentCurrencyCode == null ? paymentMethodId.paymentCurrencyCode == null
                                                         : this.paymentCurrencyCode.equals(paymentMethodId.paymentCurrencyCode))
            && (this.sourceCurrencyCode == null ? paymentMethodId.sourceCurrencyCode == null
                                                        : this.sourceCurrencyCode.equals(paymentMethodId.sourceCurrencyCode))

    public int hashCode() {
        int result = 13;
        result = (ownerNumber != null ? 19 * result + ownerNumber : result);
        result = (paymentCurrencyCode != null ? 19 * result + paymentCurrencyCode.hashCode() : result);
        result = (sourceCurrencyCode != null ? 19 * result + sourceCurrencyCode.hashCode() : result);
        return result;


I've left out constructors and getters and setters as these should be obvious.
As you can see, I like to make use of the 'trinary if' expression for brevity. Just imagine how much more complex these methods would be if written out in full!
Anyway, similar to Andy Beacock's post on this subject, we can firstly simplify the above as follows:
public boolean equals(Object obj) {
    if (obj instanceof PaymentMethodId) {
        PaymentMethodId other = (PaymentMethodId) obj;
        EqualsBuilder builder = new EqualsBuilder();
        builder.append(getOwnerNumber(), other.getOwnerNumber());
        builder.append(getSourceCurrencyCode(), other.getSourceCurrencyCode());
        builder.append(getPaymentCurrencyCode(), other.getPaymentCurrencyCode());
        return builder.isEquals();
    return false;

public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    return builder.toHashCode();

Note the use of getters instead of properties - as Andy mentioned.
However, the important bit that really is the reason for this post is the last line:
    return builder.toHashCode();

It is vital that you don't write:
    return builder.hashCode();

Notice the subtle difference? The hashCode() of the builder itself is worse than useful as it will vary every time the method is run, so any Hash-based collection code will find your object has a different hashCode, every time it asks, risking the integrity of the data.

Thursday, May 07, 2009

The "Two Source" rule?

Just like I've said for ages, journalists tend to get it wrong on most stories, in some critical detail. In this case, journalists from 'quality' newspapers were found to have taken a mis-quote from the wikipedia page about Maurice Jarre (film composer, father of Jean-Michel), the quote actually coming from someone else entirely, and then printed it in Maurice's obituary. So, these professional journalists have broken the 'two source' rule that professional journalists are supposed to honour - you should have two independent, reliable sources for any fact in a story.

Okay, guilty as charged, I've only used one source,, but then I'm only a blogger so I don't count because my writing is too risky anyway.

Wednesday, May 06, 2009

Alexander Mosley, RIP

Even in the world of F1, there have got to be times when we just stop all the back-biting (guilty as charged!), and pray for others (if that’s your thing, or whatever alternative you prefer). It is a terrible thing for a parent to lose a child, whatever the circumstances, and for that my prayers are with Max Mosley and his family tonight.

(I just wish the BBC news story didn't have to trawl up dredge up reminders of the last time Max was in the headlines - it's just not relevant to the current situation)

Friday, April 03, 2009

Once more with feeling...

'O! Say can you see by the dawn's early light'... a perfect example of the Streisand Effect in action. And here's the article in question.

Wednesday, March 18, 2009

Knife Crime in London

For roughly the last year or so the British media (including normally credible sources like BBC News) have been making a massive fuss about every case of mortal injury involving a knife, especially in London.

Now that last part, 'especially in London,' is completely normal for the British media. For some reason the rest of the country is rather lower in their priorities than their maids' long-term health. Not sure why this is... perhaps the fact that most of them live in London and the so-called Home Counties, and look down their powdered noses at anyone that even considers living beyond Reading, Winchester, Oxford or Cambridge.

Now I find out (thanks to the Register) something that I've suspected all along: the pattern of knife attacks in London is no different than normal (and hasn't been for some time!). Quel surprise!

Just another case of media hype, just like their claim that the entire UK was in mourning for months after the (admittedly quite sad) death of Diana, Princess of Wales. Whereas the fact is that most people were shocked for about 10 minutes when they heard the news, a little subdued for the rest of the day, gave most thought for her sons, then got on with their lives until the funeral brought it back to mind for a bit, from which point they put it behind them.


Originally posted at GameBoomers:
What is it?

I was a young boy, just striking out on my own path at the town library when I first came across Jules Verne. My introduction to the French man's works of speculative fiction (as sci-fi used to be known) came in the form of the Journey to the Centre of the Earth. I loved it; I still do. There is one difficulty with Verne's work, however. It's all written in French, and so every time I read his work, it is through the filter of a translator's pen. This shows up in Journey to the Centre of the Earth in the fact that there are two main translations of the book, and they're completely different. The main character in one of the versions is a completely different man, in name as well as character, from in the other.

So it seems than game developers seem to like following in this tradition of 're-interpretation' rather than translation. In particular, the recent “Journey to the Centre of the Earth” and “Return to Mysterious Island” games were inspired by Verne's stories, rather than faithful reproductions. In this context, I was concerned to find out what Kheops Studio (the makers of the “Return to Mysterious Island” game) had done to Verne's story, “Journey to the Moon”.

Well, the answer is that they've done the same as they did with their first game - Voyage is a Verne-esque telling of a story that starts with an idea that he had. This is not to say that the result is somehow 'wrong', it would simply be a mistake to say that Kheops have told Verne’s story verbatim.

What we have instead is a nonlinear, point-n-click, mostly pre-rendered 360° bubble-based adventure game telling the story of Michel Ardan, a wild-hair, moustachioed 19th century French explorer, and his journey to the Moon. And, yes, he actually reaches the Moon, where Verne's characters did not.

Is there a plot?

The game begins with our hero, Michel Ardan, waking up in a bullet-like space capsule in the company of Barbicane and Nicholl - his fellow space explorers, after the violent launch of the capsule towards the Moon. However, he soon discovers that all has not gone well since the launch.

As I've already made it clear that Michel reaches the Moon, I think it fair to also mention that he also encounters intelligent life there. The backbone of the story is Michel's encounters with the Selenites, (from the Greek 'seleno', being the Moon) and his efforts to return to the Earth. Along the way he discovers some of the story of the Selenite civilisation and their relationship with Earth. And, of course, there are plenty of puzzles along the way, but then it wouldn’t be much of an adventure game without them.

Notable Features

In this highly puzzle-oriented game, the puzzles are pretty varied. Some involve the decipherment of the Selenitic written and spoken language – a tuneful thing that’s not as hard as it sounds; a fair few puzzles involve combinations of inventory items, some are mathematical in nature, some mechanical, and some are just pure logic. A number of the over-arching goals can be achieved through a variety of means. This is the source of much of the game’s nonlinearity. If you get stuck somewhere, you can often make progress in other parts of the game before coming back to the sticking point.

In addition, there are a number of optional side puzzles that aren’t essential to your progress towards home, but which reveal some extra facet of lunar life. From roughly halfway through the game (at least as I played it), you gain a small ‘helper’. The ‘helper’ is there to reveal information, clues and your score. Certain puzzles require you to have achieved a specific number of points before you can obtain information or inventory items. However, obtaining sufficient points is again possible in a variety of ways. Solving parts of the Selenitic language, or deciphering mathematical puzzles or manufacturing chemical substances using the Selenitic machines all improve your score.

Ardan automatically keeps a comprehensive log of his experiences. This includes some of the conversations, the details of his investigations as to what happened in the space capsule before he woke, and a number of key diagrams regarding his objectives later in the game.

A notable pair of features in this point-n-click adventure is the inclusion of a small number of timed sequences early in the game, followed by some hand-eye-coordination-based jumping puzzles. Unfortunately, these puzzles all result, upon failure, in the death of Ardan, but he is always resurrected to a point immediately before the timed sequence or jump began, so there’s no real penalty in failure, other than a certain gathering frustration. On the plus side, once each jump has been successfully performed, Ardan will be able to repeat them without the player having to beat the puzzle again. I found these a minor irritation rather than a serious problem.

Graphically, the experience of Voyage is colourful and imaginative. With our modern knowledge of the Moon, we would expect the palette of this game to be rather dull and leaden, but Kheops Studios clearly know better, with good texturing, a rich palette of colours, refined animation, and very detailed modelling.

Most of the audio in the game is top quality. The music is unobtrusive, but appropriately used to set the mood at various stages of the game. The voice acting of the Selenites is excellent – I particularly enjoyed their native voices, which are rather harmonious. The English voice acting was good, with the exception of Ardan himself, whose narration and accent I found jarred slightly. I think he was supposed to sound like an educated Frenchman speaking English – presumably he sounds better in the French version – but in English he came across as stilted and slightly manic at the same time.

Any other novelties?

Not having completed a Kheops Studios’ game before, I didn’t realise quite how much they like inventory combining puzzles. However, to their credit, the required combinations aren’t extraordinarily illogical, though some are surprising. A nice feature here is the pictorial log that is kept of all the successful combinations you’ve made throughout the game – this simplifies the task of re-creating earlier combinations later in the game.

An intriguing novelty in Voyage is the requirement that you don’t just have to click on a button to make the machines work, you have to understand what those machines are going to do. A number of the machines will ‘work’ by you pressing buttons, but will only do the ‘right’ thing when you understand them properly.

There are at least three puzzles that can be attempted several times, to a number of standards – in each case, the lowest standard is sufficient to ‘solve’ the puzzle, but you can significantly improve your overall score by achieving the higher levels. A feature here that is rather useful is that if you find that you’re weak in one puzzle – perhaps figuring out the Selenitic mathematics defeats you – you may well be able to make up for it with the sounds of the their spoken language.


Now we reach the only really odd thing about this game. Although there are five profiles under which you can save your game, you must select your profile during level 1 of the game – however, there’s no warning as to when level 1 ends, so no indication when you should choose your profile. The manual states that level 1 is the capsule level, but it’s not clear whilst you’re playing the game when this level ends. So, I suggest that anyone playing this game saves their first game immediately the first cut-scene ends – thereby choosing a profile and eliminating any risk of getting caught out like I did.

Of course, if you’re not sharing your computer with other people, this oddity problem won’t even affect you, but it did me, so I choose to mention it.


This was an enjoyable telling of a Verne-inspired tale, though I’ve found it helpful to ignore the connection with Monsieur Verne in the long run. I would certainly play another game by Kheops Studios. So, to summarise: a point-n-click adventure, featuring a good story, some hand-eye coordination, a few timed sequences, plenty of opportunities to die, but with immediate resurrection to before the fateful decision was made, unlimited saves, but an odd profiling system, a variety of logical, mathematical, inventory, linguistic and mechanical puzzles, one musical puzzle, and no slider puzzles, nor mazes.

From a technical standpoint, there were very few graphical bugs, nor audio glitches, except during the final cut-scene, which was a shame, as it concludes with a nice little twist to the story. The game has no patches, and no serious crashes.

So, all in all, a good game, but not spectacular, hence the final grade.

Grade:  B

What do you need to play it?

Minimum Requirements

·         OS: Windows® 98SE/ME/2000/XP 

·         CPU: 800 MHz Pentium® III

·         RAM: 64 MB 

·         CD-ROM/DVD-ROM: 16X Speed 

·         Video: 64 MB DirectX® 9 Compliant Video Card

·         Sound: DirectX® 9 Compatible 

·         Input: Keyboard, Mouse and Speakers

Recommended Requirements

·         OS: Windows® XP

·         CPU: 1 GHz Pentium® 4

·         RAM: 128 MB

·         CD-ROM/DVD-ROM: 24X Speed 

·         Video: 64 MB DirectX® 9 Compliant Video Card

·         Sound: DirectX® 9 Compatible

·         Input: Keyboard, Mouse and Speakers

 (I used Win XP, AMD XP 2400+, 512 MB RAM, and ATI Radeon 9000 Pro 128 AGP)

Saturday, February 21, 2009

Puzzles in Myst games

The GameSetWatch blog has a posting on puzzles in the Myst games. It's not quite consistent - the intro promises more than the body provides, but the conclusion is right:

Fairness, novelty, and integration are all important for making good puzzles, but what makes the puzzles discussed here stand out is their payoffs. Each of them has a moment of epiphany, where the odd structure of the game world suddenly makes sense, and all the pieces fit together. Because they are especially tricky, the reward is sweeter, and the player feels a greater sense of accomplishment.

It's this puzzle with a twist that is the greatest strength of the Myst series. By starting with a solid puzzle and then adding a twist, developers can make their own puzzles stick in players' memories. This doesn't just apply to adventure games, either; any kind of game that uses puzzles will be better-served by a cleverly crafted obstacle rather than just another game of Nim.

I've long loved the Myst games, and certainly don't think they're the reason the adventure genre has suffered over the last decade. If they are, it's because other game designers struggle to match the quality, internal consistency, and production values of the Myst games. (Frankly, I think that's more connected with the adrenaline-fueled, frame-rate obsessed FPS crowd that just don't get the more cerebral pursuit of the Myst games.)

I will say though, that there is one puzzle I thought stuck out as really not belonging in the Myst canon, and that's the dreadful Dream puzzle of the Serenia Age in Myst IV. Far to subject to the vaguaries of colour vision and a long way from fitting the criteria of the article at the top of this post.

Tuesday, February 17, 2009

Hydrogen fueled cars

On the Register today they're talking the LA Times talking about the Honda FX Clarity, (also on wikipedia and Top Gear's site) the first commercially available (albeit only in Southern California) hydrogen fuel cell driven car.

Top Gear did a great piece on this car just before Christmas. James May loved it, he waxed lyrical about it, they even got Jay Leno to say how much he loved it too - though his comments focused more on how it was going to save his beloved petrol-drinking race cars by allowing the petrol to last longer.

Now Dan Neil (who?) writing for the LA Times writes off the hydrogen fuel cell idea as a cul-de-sac in development. Just because there's no network of hydrogen filling stations outside of Southern California. I beg to differ mate. There's a massive, coordinated, reasonably resilient network of filling stations already out there. All we need to do is persuade them to carry one more product: liquid hydrogen. I'll come back to this later.

Ok, let's step back one moment and look at why we would want to use hydrogen over batteries first of all. The only car remotely comparable to the FCX Clarity is the Tesla Roadster. Fast, good looking (based on the Lotus Elise), and run on batteries. Tesla claim a range of 220 miles on a full charge, as opposed to Honda's claim of 270 miles on a full tank of hydrogen. The Tesla is a two-seater; the Honda a family saloon (Dan Neil says, "Lincoln-Town-Car huge, and the trunk is a spacious 11 cubic feet."). The Tesla has a huge composite battery made of 6,831 lithium cells (essentially laptop batteries!). Yes six thousand, eight hundred and thirty one of them. Imagine how much that must weigh (actually, it's 450kg). No wonder there's no room for passengers!

Top Gear's analysis basically went along the lines of, the Honda is going to succeed because it is so much like what it replaces ... the normal, standard, family saloon of today. No big leap in behaviour for the motorist, no big change in the experience of car travel, just an enormous change in the type of fuel and emissions.

Finally, on the cars themselves. The Honda is made by ... Honda. One of the world's largest (if not the largest) car companies. The other by Tesla Motors... who? Even if they are backed by Elon Musk, co-founder of Paypal, that's an awfully long way from the scale of Honda.

Now, back to the choice of fuel. It is clear that producing liquid hydrogen takes about four times more energy than the Tesla needs for the same range:
  • Tesla: 53kWh for 220 miles
  • Honda: 240kWh for 270 miles worth of hydrogen, (or 195kWh for 220 miles to match the Tesla's maximum range)
But the big difference is in the behaviour required to support the difference. With the Honda you go to the fueling station and fill up the 4kg tank when you run low. It takes a couple of minutes, just like a conventional petrol tank. With the Tesla, you plug it in every time it runs low ... for three and a half hours (!) at 240v (great if you're on 120v in the USA). So where do I plug it in if I have no garage, or if my parking space is some distance from my home? 

See what I mean about changes of behaviour?

Finally, back to Dan Neil's biggest complaint; that there is no network of hydrogen fuel stations. This could be solved reasonably simply by the simple expedient of mandating any new fuel station must install and maintain at least one hydrogen pump, similarly any existing station wanting planning permission for changes must install and maintain a pump, and every other existing station has two years to install at least one, with increasing penalties for every quarter thereafter when they don't have one.

By that simple change, the suppliers have a distribution network, where the cost is widely distributed (maybe the local or federal/national government can give a subsidy to sweeten the deal if they install more than one at a station), and the car manufacturers have the opportunity to sell new cars all over the place. Consumers would finally have a real choice that makes the possibility of switching away from oil a real, practical and most of all normal change. Just change the pump you visit on the forecourt - just like going unleaded or diesel.

With a company the scale of Honda behind the FCX Clarity, they could easily ramp up production to meet demand were the pumps available, and that demand would just as easily justify the investment in the pumps and infrastructure. Not just a win-win, but a win-win-win-win: car manufacturers, fuel distributors, consumers and the global environment.

Update: a number of commenters on the original Register article have been talking about using replaceable batteries, rather than charging up your own battery. Given the sheer size of the Tesla battery (which seems to be what you need to get a sensible range out of an electric car) and weight of it (450kg), the idea of a filling station (or equivalent) storing hundreds (possibly thousands) or batteries fully charged, and transporting said heavy objects around the place every day (or charging them on site - imagine the electricity supply required to do that - 70 amps for 3.5 hours per battery), doesn't strike me as being in the least bit practical. And how do you propose a driver in poor health, or not built like Arnold Schwartzenegger is going to handle swapping over batteries like that? You might as well suggest that the hydrogen fuel tank of the FCX Clarity is swapped out every time, instead of filling it with liquid hydrogen.

Friday, February 13, 2009

Channelling Douglas Adams from 1999

If you've never heard of Douglas Adams, you're an unfortunate individual. He was not, as some people might claim, the greatest author of the late 20th century, but he was one of the most influential. If you doubt this, just think about how much modern story telling owes to the success of Hitchhikers Guide to the Galaxy: writers like Terry Pratchett, Neil Gaiman, and many others in the speculative fiction world would not have got their breaks without Adams. (Ok, enough unsubstantiated waffle)

Today I was reading the TechDirt blog, as I often do, and came across this article. However, it was not that article that really got my attention so much (sorry Mike) - it's their stock-in-trade kind of commentary on the madness and desperation of the old-skool media types trying to defend out dated business models. No, it was this little quote:

1) everything that’s already in the world when you’re born is just normal;

2) anything that gets invented between then and before you turn thirty is incredibly exciting and creative and with any luck you can make a career out of it;

3) anything that gets invented after you’re thirty is against the natural order of things and the beginning of the end of civilisation as we know it until it’s been around for about ten years when it gradually turns out to be alright really.

This comes from an article (warning: the text has the wrong text-encoding, you might want to change that, probably in your browser's View menu) that Douglas Adams wrote in 1999! But he's absolutely right. (though I question his choice of 'thirty', being as I'm still a tech-fan at forty).

Friday, January 23, 2009

Enough talk of the recession already

Everyone knows that most of the world's major economies are in recession now, or if they're not, their economic growth has slowed significantly. Given the exposure of our banks to bad debt (brought on by a mixture of idiotically bad lending by the banks, and idiotically imprudent spending by their debtors - i.e. the rest of us!), this is hardly surprising.

However, there is one more factor that is really important in how we look at our economy, and that stock prices, and so much of the stock price of a company is based not on their balance sheet, their order book (in those rare companies in the UK that actually make something these days!), or their actual assets (fixed, personnel, or intellectual), but upon the confidence investors have in the company. Take a look at Apple over the last two years (compared to the Nasdaq and Dow Jones indexes). There's a massive dip in Apple shares in Feb 2008. Why? They'd just released the 32GB iPod, they were leading the market for legal music downloads with the iTunes store, and the video store was doing well too; the future looks seriously rosy. So why did their shares drop from $199 (Dec 28, 2007) to $119 (Feb 25 2008) - a 40% drop in 2 months!

I can't find any logical reason in the news archives, and the Nasdaq and Dow Jones (also shown on the above graph) show only a gentle slide at that time. (Dow dropped 1000 points (7%) and NDQ 321 points (12%) over the same period). This is confidence at work. It often has no discernable connection with reality outside of the trading floors of London or New York.

More recently, many many investors have lost confidence in the shares of the banks, with some reason, it appears. But something that is really, really not helping matters is the continual talk of economic doom and gloom by every news organisation I come across. Do these people (Robert Peston, I'm looking at you!) not realise the harm they're doing? Surely it's time to start either doing something to help, or at least coming up with real solutions. Fundamentally, the global economy is still producing plenty of goods. Global warming provides all sorts of opportunities for innovative thinking about ways to invest in our future. The world won't stop spinning on it's axis just because a few bankers mis-incentivised their traders and lenders so that it was in the traders' and lenders' interests to make extra-risky decisions.

Stop being part of the problem, and start finding the solutions. Look for the good news in the economy, and help me look forward to listening to BBC Radio 4's Today Programme tomorrow morning instead of dreading what new depressing statistic is being published to make me fear for my job in the finance sector.

Wednesday, January 21, 2009

President Barack Obama

From here:
W. E. B. DuBois started to teach so that Rosa Parks could take a seat.
Rosa Parks took a seat so that we could all take a stand. 
We all took a stand so that Martin Luther King, Jr. could march. 
Martin Luther King, Jr. marched so that Jesse Jackson could run. 
Jesse Jackson ran so that Barack Obama could win!

Cleo Fields at the State of the Black Union February. 23, 2008
This says so much to me about how the way the political geography of the US has changed in just two generations (Rosa Parks sat in the 'wrong' seat on a segregated bus in 1955). Not everyone around me appreciates just how significant this is for the United States, but it gives me great hope for the future if such seemingly impossible odds can be overturned.

Who among you, even in 2007, really could have said with any kind of confidence that 2008 would see the Democratic race for the nomination for president would be between a woman and an African-American man, let alone that the resulting candidate would win?

p.s. if you can watch BBC programs on iPlayer, I recommend this recent program on Barack Obama, it's available until 7:59pm Tuesday 27th January 2009.

Tuesday, January 20, 2009

Tips and Tricks

I don't often feel the need to write about anything particularly technical here, but today I feel the need to publicize this excellent tutorials site. As an example of how useful I've found it, I had a peek at their Eclipse tutorials.

I've been using Eclipse for Java web application development for about 6 years now, and it's an excellent platform. However, there is a minor issue with upgrading eclipse versions. Each time you upgrade, you really need a clean install in the eclipse directory. So far, so good. The downside of this is that you lose all your plugins - one of the greatest strengths of the eclipse platforms - so that I usually have to write off a days work to do an upgrade (consequently, I'm still on the Europa release, as opposed to the more recent Ganymede release).

Now, this inertia isn't a huge problem; in fact, I'd say it's only an annoyance that hits once or twice a year, but it would be nice to have a solution.

Introducing 'externalised eclipse plugins'. It's surprising what you can learn when your not expecting to see anything remarkable on a site.

Now, you may say that any eclipse user worth their developer chops will have already have solved this problem three years ago, but so what. I'm still learning new vi tricks after more than 20 years daily use. But I'll take new learning any way I can get it.

So, if you're a developer in the Web arena, take a look at avaJava's Web Tutorials, you never know what might strike you.

Friday, January 16, 2009

Steve Jobs' Health Issues and Apple

I know a lot of people have spent a lot of electrons talking about this one, but I have to have my go, that's just how it is.

Steve Jobs is only the CEO of Apple, he is NOT the god of product design, nor the only reason that Apple has grown so much since his return. Jobs returned from NeXT and Pixar at a point where Apple was quiet, but was lucky enough to have some very talented people hidden in the R&D departments. In contrast to Apple of the 80s, instead of spewing money all over the place in the hope of getting some ok products, Jobs made some canny decisions to cut effort in areas that were never going to make serious money - WebObjects I'm looking at you - it's just a framework for websites, not a money-maker. On the other hand, he and his collegues in management seem to have been very smart in recognising the strength of the iPod and it's simplicity. Of course, the alternative interpretation of the success of the iPod is a mixture of Apple-fanboyism plus just happening to hit the sweet spot in growth in the market for MP3 players.

Now that Apple is successful, and still growing, the fact that Steve Jobs is taking a break (that might turn out to be permanent) really shouldn't be causing everyone to suddenly pull their investment out of the shares. Afterall, Steve Jobs did not design the iPod (nor any of it's variants), nor the current crop of Apple laptops, nor the iPhone.... and someone else will be able to do the same for future Apple products, providing Apple continue to employ excellent designers and product creators.

Now let's let the guy take the time he needs to to get well. He's only human at the end of it all.

Tuesday, January 13, 2009

New Year's Resolutions?

I know, I know. Every year it's the same. People bemoaning their inability to keep their New Year's Resolutions, but this one (go to the end of the column) made me laugh out loud:

The two-faced god [Janus, the Roman god of the New Year] would have coughed hard at my official New Year resolutions, which were — life being shorter than a wren's blink, and all — to be both nicer and more honest. Have you tried it lately? It's like trying to sit up by lying down.

The only scenario in which it works is on country walks, where a rigid etiquette governs all encounters.

You can say 'lovely weather', 'gorgeous dog!' and 'Happy New Year'. You cannot say 'those are some comedy dentures' or 'I bet that's not your husband!'

The minute I hit the roads, it all went awry. I gave way meekly to a thundering 4 x 4 Death Star, even though I had right of way, and the beast swept past without acknowledging my gesture.

I wanted to follow them and beat them to a foaming pulp.

This was three days into January. But what is life without challenges?

Monday, January 05, 2009

Sir Jackie Stewart vs. the World

You've got to give Sir Jackie Stewart credit for sheer balls and a willingness to pull no punches. As reported via, he's been talking to the Times again. I agree with what he says, but the real kicker is in the last line of the report:

"Stewart's comments will not go down well with those on the receiving end."

Ya think?

Sunday, January 04, 2009

Matt Smith?

Who the heck is Matt Smith? The BBC have named this nobody as the replacement for David Tennant as the eleventh Doctor Who. Watch the little movie at the start of that article, and it's clear he's not even been properly briefed on how to talk about the role. 'Iconic' is about the only thing he can say. And what's with those bonkers hands? Is that the 'Doctor-ness' Piers Wenger is talking about in the same article?

This kid grew up in the hiatus between the old Doctor (killed off with Sylvester McCoy's incarnation, that was cursed with the worst ever assistant Mel, played by Bonnie Langford <>), and the 1996 TV movie with Paul McGann that made the modern seasons possible. Matt Smith wanted to be a footballer... sounds like a Doctor Who geek from his childhood ... NOT!

Sounds more like the BBC wanted to hire a real cheap nobody to save a few pounds, instead of the real actors named as possible choices before last night:
  • James Nesbitt, serious actor with loads of credits,
  • Patterson Joseph, another serious actor with loads of credits - he's even been in a couple of episodes of Doctor Who,
  • John Simm, the talented actor who played The Master in 2007. Also has a lot of credits, an unlikely choice because that would confuse people.
  • David Morrissey, another good actor who'll never now play the Doctor because he played such a key role in the 2008 Christmas Special, appearing to be a future incarnation of the Doctor.
See, all far too experienced, far too expensive. Let's have a cute nobody with an asymmetric haircut that'll appeal to the teenage girl demographic because he looks like an emo rockstar.

Creative Zen X-Fi

For the last few years, I've been using my mobile phone as a multi-purpose device: phone, SMS, diary, sudoku generator and MP3 player. This Christmas, I asked for a real media player for music and video, and rather than follow the stampede towards Apple, I've gone for a Creative Zen X-Fi (the 16GB model with WiFi). It's small, light, plays lots of formats and, importantly, comes with a decent pair of in-ear headphones.

Most importantly of all (apart from the obvious 'does it play music & videos' functionality), it doesn't require me to use that dreadfully clunky and unresponsive piece of software called iTunes. I'm running Vista 64-bit, on a decent PC - plenty of RAM, and a fast dual AMD CPU, so there really is no excuse for iTunes to run slowly when nothing else does.

It's taken me a little time to find the sweet spot in video format to minimize audio glitching - but it was just the realisation that you have to run the supplied video converter software at the highest quality (& slowest conversion speed, of course) to get the best results.

I've not returned to work after the holidays yet, so I've yet to see how the device functions in that part of my life, so expect more on this another time.

One odd thing though, and it's really a criticism of Google, or the 'net as a whole. When I google for information about the X-Fi, I get the best part of 10 pages of people either selling it, or 'professional' reviews. On those pages where there are comments from real people, there's so much Apple/anti-Apple fan-boi noise that sensible, vaguely objective experiences are hard to find. Where have all the bloggers and sane people gone?

Thursday, January 01, 2009

Happy New Year 2009!

I'm curious to see what 2009 brings.... could be good, might be not so good.