Blog Archive — Page 17

This is part of my blog, which I have long since stopped maintaining. The page has been preserved in case its content is of any interest. Please go back to the homepage to see the current contents of this site.

  • The Platform Blues

    Hearts sink as the display updates from showing wildly inaccurate times to showing Delayed, Delayed, Delayed from top to bottom. “Signalling fault at Bournemouth”, it says, and we know then that all hope is lost.


    It is April now, and somewhere lilac trees and fields of dandelions are blooming. But here, fat drops of rain fall from steel-grey skies, and cranes tower high above the tunnel through which trains refuse to come.

    I look up at the departure board again. My train has disappeared; perhaps it never existed. The next train is the 0604 to London Waterloo, some ghost in the machine of a train that has long since departed or never existed either.

    Clanking in the distance suggests that someone may be trying to fix the signalling fault with a hammer.

    My fellow commuters and I do not look hopeful.

  • In Praise of Disjointed Communities

    Prime Minister David Cameron is set to make a speech on immigration today which, to the very vocal displeasure of Vince Cable and doubtless many Lib Dems, is designed to appeal to the core and right of the Conservative party. According to the BBC article:

    Communities have been affected by incomers who are unable to speak English and unwilling to integrate, [Cameron] will argue.

    “That has created a kind of discomfort and disjointedness in some neighbourhoods. This has been the experience for many people in our country - and I believe it is untruthful and unfair not to speak about it and address it.”

    Granted, I’m probably far from the average member of the public in my opinions, and certainly I’m far from core Tory material. But I see that disjointedness as more of a good thing than a bad one.

    Many years ago, I lived for a while in the village of Easton, on Portland. It was blessed with both a Chinese restaurant and a Chinese take-away, as far as I am aware the only two on the island. When I was there, the restaurant was staffed with Chinese people (or at least those of Chinese descent) – whether they lived on the island or not, I have no idea. But the take-away? Well, I guess they ran out of Chinese people. It was staffed entirely by Brits. 96.8% of the population are of white ethnicity.

    I come from, and have since returned to, Bournemouth. Just 30 miles away, it has a population more than 10 times that of the whole of Portland. During most of the year it is home to thousands of university students; in the summer it opens its doors to thousands more foreign language students and a never-ending influx of tourists. I live in an area with a high Brazilian population. Oriental and Middle-Eastern shops are everywhere.

    It’s part of the world in a way that Easton is not.

    By and large, immigrants naturally pick up enough English to get by – instead of imposing requirements on their proficiency with the language, how about we try to learn each others’ languages?

    Instead of imposing some requirement to “integrate” with society (presumably that means reading the Daily Mail, drinking tea and moaning about the weather), why not celebrate each others’ cultures?

    More to the point, why not stop pretending that there’s a single homogenous British society for people to integrate with in the first place? My comment about the Daily Mail was only partly in humour. How do you define such a nebulous concept?

    I don’t read the Daily Mail, and I rarely drink tea. My instinctive reaction to the phrase “Oh dear, it’s come over all cloudy again, hasn’t it? Typical.” is an impotent rage as I realise that no matter how much of a travesty of conversation it is, in the eyes of the law, it’s still not cause enough to legitimately punch someone in the face.

    Like most Brits though, I do love French food, German beer, Italian coffee, chow mein, pizza and chicken tikka masala.

    If I’m trying to make a point here, it’s this:

    • Everyone else’s culture is just as good as ours

    • Everyone else’s language is just as good as ours

    • And by the way, everyone else’s food is better than ours.

    Let’s stop clinging to an idea of British culture that we can’t even define, and pretending our way of life is under attack from Poles or Pakistanis.  Let’s not be Easton.

    There’s a whole world out there.  Let’s live in it.

  • Preaching and the Defence Industry Choir

    CertificateThis week at work has largely been taken up by a Usability training course, borne out of the HMI team’s desire to have at least some sort of formal training in the area, rather than just being chucked in a team together because we were the only people that gave a damn that users liked using our software.

    I was worried that it would be a fairly dry explanation of the best practices of usability testing, but thankfully it was far from it.  The course tutor was engaging, and his presentation illustrated with viral videos and images that suggest – unusually for courses I’ve attended – that the tutor is actually part of the internet rather than being focussed on their subject to the exclusion of all else.

    Though there was plenty of time spent going over the theories of various techniques of user-centric design, just as much time was spent going through the process ourselves for an invented product, all the way from user interviews at the beginning to letting other course attendees play with paper mockups of our designs.

    Paper UI Mockups

    The only major issue we had was not so much a problem with the course but with our industry.  In terms of good usability practice, our tutor was clearly preaching to the choir – but it was a choir rendered largely incapable of religious belief.  So many principles we would love to embrace whole-heartedly, but the sad fact of the situation is that the defence industry is not set up to permit user-centric software design.

    It is a rare project indeed where we get any interaction with our end users.  We supply our software to our customers, they hand it down to the users, the users just get on and use it no matter how hard to use it might be.  Even interviewing, say, a sonar operator, is essentially impossible – much less getting them to play with paper mock-ups of our interface and offering feedback.  Our software ends up being designed first and foremost to please someone in Procurement, and without being able to meet the users, we make a raft of assumptions about their use cases and what they do most frequently. If we make the wrong assumptions, often we don’t even find out.

    To his credit, our tutor tried to think of ways around this problem, as did we, but there’s clearly no easy solution that we could roll out to revolutionise our software tomorrow.

    It’s probably the most frustrating aspect of developing interfaces in this industry – we have so many ideas, and some of them our users would no doubt love to see in the software they use every day.  But in the end, lack of access, or lack of requirements, or lack of time or money, means we’re often designing in the dark, adapting what best practices we can to a project that doesn’t support them.

    Still, the course comes highly recommended – hopefully there are many developers out there who would find the techniques easier to apply than us.

  • Data and the Generation Gap

    I returned to my parents’ house after my final year at university approximately an eternity ago* to discover that they had at last entered the Cretaceous and acquired a broadband internet connection. I was less than impressed with the limits imposed on this connection, though - it came with a measly 1GB monthly data limit, which of course for them was perfectly adequate. I don’t know how much they get through these days (and I’m willing to bet they don’t either), but I suspect their 1GB limit is still firmly in place.

    Well, what do you know, I have a 1GB limit too, that this month I’m getting worryingly close to. Only mine is on my mobile phone. My WiFi is always on when I’m at home, leaving at most 70 hours a week at which I might be actually getting through that mobile data. 40 of which I spend at work, sitting in front of a computer. …With internet access. Extrapolating over the month, that implies that I use around 10MB an hour, just passively, not deliberately “surfing” the net.

    It’s not by any means a fair comparison, but if those bytes were all printed out as single characters, my passive data consumption is roughly a War and Peace every two minutes.

    And that, not to put too fine a point on it, is fucking insane.

    I’m guessing that my parents’ passive data consumption is near zero – they both have smartphones but don’t use social networks or really download any apps, and their laptop stays in its bag upstairs until they bring it out to use it. Naturally, when they’re not using it, they turn their router off to save electricity. A laudable idea, to be sure, but therein lay my second problem with my parents’ internet connection.

    “Why have it on when you’re not using the internet?” they asked.

    “But what if my computer wants to use the internet?”

    It’s not just the rate of technological progress that is extreme, it’s the inevitable way in which it transforms our lives. Back in the late seventies, the computers my parents used at university were giant things, all mainframes and time-sharing and punch cards. Consumer hard drives of 10MB were a thing of the eighties. And here was I, not thirty years later, coming back from university with the idea that I should be able to download that amount of data every hour, without asking for it, and mostly without even looking at it. With the idea that not only should I not fight for time on a single computer, but that my computer should be left to talk to others over the internet without me being involved.

    I’m not saying my folks are stuck with a 70s idea of computing; far from it. But the extent to which our lives are data-saturated now compared to thirty years ago is monumental. And I wonder what, in thirty years’ time, my son will make of our archaic blogs, social networks and video streaming.

    • 2006.

  • When Science met Big Society

    Yesterday’s announcement that the Arts and Humanities Research Council will, on pain of losing funding, devote a “significant” amount of time to studying the notion of “Big Society” is frankly shocking. If it is indeed true, it smacks of incredible egotism on the part of the government.

    The government’s money is the people’s money – if we’re not going to leave the job of deciding what to research to the actual researchers, why should the government’s whims be involved? If there were a referendum on it now, what proportion of the tax-paying public would label the Big Society as a steaming pile of shite that we shouldn’t be throwing any more money at?

    Conversely, how many of the government’s other sweeping changes – the programme of cuts (Warning: least impartial summary ever) that we are now subject to, for example – have been the subject of such hopefully-independent research?

    A future UKIP government promises to ban global warming research, and apart from the climate change deniers, I’m confident the public would not support that particular aspect of governmental meddling in research. So why are we putting up with this?

    (And on a related note, does anyone else think it’s a little odd to commission research on a policy after committing to it?)

    tl,dr: Hands off mah science, government.

  • In Search of Source Control's Holy Grail (part 2)

    Hello opinionated lazyweb denizens!  Let’s see if you can help resolve today’s office quandry (or at the very lest, tell us that we suck and we’re doing it all wrong).

    Friendly hint: if you know nothing about software and source code control, you might want to go and do something more fun than reading this post. Do you have Pop-Tarts? Go eat some Pop-Tarts.

    Okay, this is a little simplified for ease of understanding, but here goes. For one particular family of products, we have a Subversion repository. It contains two products, and a bunch of components that each product depends on. The basic structure looks a bit like this:



    Our main requirements are:

    1. During development, we can open multiple products and components together, and edit them together in the IDE.

    2. The a tagged build of a product may only use tagged (not trunk) versions of components.  

    Each component has a trunk and various tags. The trunk has a build script that dumps its output binary (a JAR, in this case) into shared_libraries. These binaries are numbered according to their next version number, so that in the build-up to component1 version 1.1, its build script creates components/shared_libraries/component1-1.1.jar.

    Once a component reaches a certain version number, it gets tagged, and its build script in trunk gets updated to output a file with the next version number, e.g. component1-1.2.jar.

    Each product builds against properly versioned libraries inside shared_libraries.

    This way, during development, we can open the trunk of whatever we like in the IDE, and provided our product build script builds all its components first, it’s always building against the latest versions.

    At product release time, we make sure all the components are tagged first, meaning that the versions of the components in shared_libraries that the product has been using will never be modified again. We can then tag the product, safe in the knowledge that if someone checks out that tag in future, it will be set up to build against known versions of the components on which it depends.

    My question to the lazyweb is, “is this in any way sane?”

    There’s one down-side I can see, which is that in order to build a product, a new user needs to ensure that they have productX and shared_libraries checked out with the same relative path that they have in the repository. They presumably won’t want to check out the whole repository, as that would include every tag of every component, so they’d have to recreate the top levels of the structure manually.

    This could be solved by using Subversion’s extern property to embed shared_libraries within the product, thus:

            shared_libraries (extern)

    However, if the product builds against JARs in the externed directory, that breaks the ability to build everything at once during development – turning it from:

    1. Build your components

    2. Build your product against the built components


    1. Build your components

    2. Commit components/shared_libraries

    3. Update product1/lib

    4. Build your product against the built components

    Introducing a mandatory SVN commit into every build has got to be a bad idea.

    We also can’t make components build straight into a product’s lib/ directory, as we want to keep the components strictly product-independent.

    Is there some industry standard or just particularly good solution to this problem that everyone else is using and we just don’t know about? Or have we, in the last couple of hours, produced as good a solution as we’re going to get?

  • Debt Rating for the Internet Age

    With the recent financial crisis, and unrest in the Middle East and north Africa, there has been much talk in the news of changes to countries’ debt ratings – usually for the worse. But their scale, not to put too fine a point on it, is mad.

    There’s an A, B and a C, sure. But there’s also Aaa, Aa1, Aa2, Aa3, A1, A2, A3… then we get to Baa, which is presumably index-linked to the country’s sheep industry. Then beneath that are the “Junk” ratings, which rather than being something intuitive like “F”, run the entire gamut between Ba1 and C, a total of 11 different levels.

    I propose that, for the 21st Century, we establish a 21st Century naming scheme to replace these bizarre terms. The scheme would be intuitive and contemporary, and thus much more easily understood by the layman. The levels map as follows:

    Moody’s Rating

    New Rating




    Epic Fail










    u jelly?


    Epic Win


    Never gonna let you down

    “In light of recent unrest, Libya’s debt has been downgraded from ‘LOL’ to ‘WTF’.” See? Simple. Intuitive.

    And if you clicked that link, you have no-one to blame but yourself.

  • SuccessWhale: Considering the Reply UI

    What was once my simple Twitter client, SuccessWhale, is undergoing a lot of changes in the build-up to version 2. One of the biggest changes is the support for multiple services, of which Facebook is the first to be integrated. This, combined with the Twitter website’s new design, brings into question SuccessWhale’s “reply” UI.

    There’s no question that there should be a big “type your status update here” box at the top. Both incarnations of Twitter do this, Facebook does this, every non-mobile client (and a few mobile ones too) does it. It’s what users expect, and I see no reason not to stick with it.

    About a thousand years of internet time ago (2010), replying to a tweet from Twitter’s website re-used that top status box for the reply. The user clicked the “reply” button, and the status box got pre-filled with “@” plus the username of the person they were replying to. It looked like this:

    Old Twitter Reply UI

    SuccessWhale, then solely a Twitter client, copied this behavior. Its reply UI involved clicking a “reply” button and having its main “publish status update” box update with the replied-to user’s name, like this:

    SuccessWhale version 1 Reply UI

    Now SuccessWhale is attempting to be a Facebook client, too. On Twitter, replies to a status update are given virtually the same prominence as the original status. On Facebook however, posts are more thread-based, with comments on a status update clearly being daughter objects of the original update. Status updates themselves use “newest at the top” order, just like Twitter, but comments on an update are “newest at the bottom”. So on Facebook, it makes sense for the “reply” field to be inline, like this:

    Facebook Reply UI

    In playing around with the UI for SuccessWhale version 2, I introduced an inline reply box, which works something like this:

    Successwhale version 2 Prototype Reply UI

    A third reply UI was introduced with the new Twitter website - a floating “lightbox”-style reply area which appears when the “reply” button is clicked. Like this:

    New Twitter Reply UI

    So, between the two sites that SuccessWhale currently talks to, we have three UI paradigms for replying to a status update. I feel it is very important for SuccessWhale to have a consistent UI for replying, particularly when we introduce columns that mix updates from Twitter, Facebook and potentially other sources.

    So, my question to SuccessWhale users is: which one do you like best? I have no particular attachment to any of them, so let’s get our democracy on. Your choice is between:

    1. Using the main status update box (like SuccessWhale version 1 and old Twitter)

    2. Using an inline box (like Facebook)

    3. Using a pop-up ‘lightbox’ (like new Twitter)

    The comments are yours, vote away!

  • UX is in the Radio

    This morning, on the daily hour-long moan-fest we call “commuting”, we engaged in our normal pattern of radio use – working our way across the entire spectrum several times, not finding anything particularly appealing, before at last settling on the least annoying option. Then, a minute and a half later once that one not-too-bad song had finished, repeating the whole cycle again.

    I am given to understand that most people pick a preferred radio station and stick with it, tolerating the annoying bits while they wait for whatever they like listening to to come on. I, and the carpool, just don’t quite “get” that behaviour. For me, ten minutes of inane Scott Mills drivel, yet another yokel radio “guess the sound and win two tickets to the cinema!” competition, the hundredth fucking advert for Apple Fucking Conservatories – they’re intolerable obstacles in the way of possibly-decent music.

    I approach this problem in the manner of what old people might term a “digital native” (a term which suggests to me that I should have a necklace of USB sticks and perhaps a battle cry that’s something to do with SuperPokes). The choice for me is not Radio 1 against Wessex FM, Radio Solent against Wave. It’s FM radio versus net radio.

    And against that competition, the user experience of traditional radio stations is appalling.

    Say, like I usually am, you are in the mood to listen to a particular kind of music that you don’t happen to have on you in any form. Here’s how some popular services compare:

    • Spotify will, for free, play you exactly the songs you request, with the occasional advert – so let’s call that about 95% “what you want”. By paying, you can remove the adverts and essentially, so long as your taste isn’t too obscure, get that to hit 100%.
    • Pandora will try to guess your exact taste over time, delving deeper than just high-level genres. With a few adverts and the occasional bad choice, you’re probably getting 90% enjoyment.
    • will play you your “Recommended Radio” songs that are “similar to” an artist of your choosing, or songs with a certain user-contributed tag. No adverts, but a higher rate of playing songs you don’t like – call that 85% enjoyment, though of course as with Pandora you can always skip the ones you’re not in the mood for.
    • Local radio, by contrast, often dedicates around 10% of its time to adverts, 5% to news, and (conservatively) 20% to inane DJ drivel. This leaves 65% for music, and if you’re lucky, you might enjoy half of what they play. A miserable total of 32.5% enjoyment. And of course, if you’re particularly in the mood for say, metal or EBM, well… out of luck.

    I’m sure it would be premature of me to declare the death of broadcast radio, just the same as I’m sure lots of people enjoy Scott Mills being a twat and the possibility to win virtually nothing by doing virtually nothing in some local radio competition.

    But as a means to consume music? It’s a long way from being a service that gives its users what they want.

  • Madness and the TableModel

    What follows is a lengthy rant about a particularly annoying situation in some of my code. Programmers, please let me know - is it the toolkit that is mad, or is it me? Everyone else, feel free to skip it! :)

    For one of my current Java projects, I am using a toolkit that comes with its own complete set of GUI widgets based on Swing. Swing… and horror.

    I was under the impression that managing a table in any sane OO language goes a bit like this:

    1. Create a class that roughly represents, or at least holds the data for, a row of the table.

    2. Create a “Table Model” or some other kind of backing array to hold objects of that class.

    3. Create a Table widget that uses the table model as its data source.

    4. Happily filter and sort away, knowing that the model and the view are completely separate entities.

    And if you should want to serialise the data behind the table to disk, and load it again, you can just save and reload the model, then call some update method on the table itself to let it know that the model has changed.

    Bring on the horror!

    What this toolkit does, allegedly in the name of MVC, is this:

    1. Create a class that roughly represents, or at least holds the data for, a row of the table.

    2. Create a “Table Model”, but completely ignore it.

    3. Name the columns of the table after the internal member variables of the class you have created.

    4. Add each object to the table in turn, watching in agony as it extracts the values of those member variables, and puts them into the table as Strings, discarding the original object in the process.

    But wait, what if those member variables are (sensibly) private? Oh, no worries. It uses reflection, each and every time you add an object to the table, to figure out what the getter method for that variable is called.

    And then we come to wanting to serialise the data to disk. Well, that could be a problem - the table doesn’t contain the objects we want, only Strings. Oh, no worries. You can give the table a new instance of your object, have it figure out (again, at runtime) which the appropriate setter methods are, and run those to make your object again!

    Oh, hey, I hope that object didn’t contain any variables that weren’t in the table. ‘Cos if so, you’re not getting them back.

    Luckily in my case, everything I care about is shown in the table, which only leaves the attempt to serialise it.

    Now I want to have a single class that nicely encapsulates this serialising business for all tables, regardless of what the objects expressed in that table are. Normally, one could just serialise the TableModel and be done with it, but now we need to dynamically re-make the objects based on what’s in the table.

    For a fully encapsulated solution, I really want to be able to just pass in the table and have the serialiser take care of the difficult stuff. i.e. I want to call:

    if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
        SerialisedTableFile f = new SerialisedTableFile(fc.getSelectedFile());;

    But I can’t, because now has no idea what kind of object it is supposed to be building. So we need to pass a template object of the class that it is supposed to be building, the only requirement of which is that it can be cloned to produce the real object that we want to store data from the table in. So we implement the Cloneable interface – except that Cloneable doesn’t actually include clone() for some no-doubt genius reason. (Not sarcasm, I really do suspect that language designers are an order of magnitude more intelligent than I.)

    The end result of all this is that I now have an interface that delights in the name ReallyCloneable, which all classes that I wrangle into tables have to implement. And poor old looks like this:

    public boolean save(Table table, ReallyCloneable itemTemplate) {
        boolean success = false;
        try {
            if (file.exists()) {
            if (file.createNewFile()) {
                ArrayList<Object> items = new ArrayList<Object>();
                for (int i = 0; i < table.getRowCount(); i++) {
                    try {
                        Object o = itemTemplate.clone();
                        table.getItemFromRow(o, i);
                    } catch (NoSuchMethodException ex) {
                        Logger.getLogger(SerialisedTableFile.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (InvocationTargetException ex) {
                        Logger.getLogger(SerialisedTableFile.class.getName()).log(Level.SEVERE, null, ex);
                ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file));
                success = true;
        } catch (Exception ex) {
            Logger.getLogger(SerialisedTableFile.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            return success;

    I think it’s about time I started buying Bad Code Offsets by Direct Debit.