Archive for the ‘Uncategorized’ Category

Package Managers – Linux’s Killer Feature?

Thursday, August 20th, 2009

Package managers – your yums, portages, apts etc – must be one of the best features of linux. It used to be pretty impossible to keep an installation up-to-date, now it’s trivial most of the time.

I actually wonder if this is Linux’s killer feature – whilst your Windows installation slowly rots until you are prepared to face the pain of a major OS upgrade, your Linux installation has been incrementally improving itself. I reckon that Gnome overtook XP sometime in the last few releases in terms of features and (in some places) usability.

Sure, Windows will probably retake the lead with Windows 7, but how long will it be until the next major version of windows? XP is a staggering 8 years old, will it take as long until most people are prepared to update again? In that case, Microsoft may find they are in serious trouble by then, facing Linux distributions with with improved kernels, file systems and desktops, especially with distributions like Ubuntu pushing usability and user experience.

Hunter S. Thompson and the Death of Objectivity

Monday, July 20th, 2009

David Weinberger writes on “Joho the Blog” that “transparency is the new objectivity“. In the post, he explains how journalists have traditionally strived to appear objective, but today’s bloggers typically go down a different path and aim for transparency. That is to say, a journalist will not openly reveal their biases (which sometimes grow into hidden agendas) but many bloggers will happily wear their allegiances on their sleeve.

The Gonzo Fist

It’s common knowledge that media outlets typically favour certain strains of politics over others, for example Fox News is famously Republican and were arguably responsible for perpetuating falsehoods about the Iraq war. In the UK, the Daily Mail leans heavily towards the right and publishes very questionable stuff about immigration, whilst the Guardian leans towards the left (and at least attempts to confine its political rants to the editorials).

However, none of these outlets openly say this. The Guardian claims to live by the words “A newspaper’s primary office is the gathering of news. At the peril of its soul it must see that the supply is not tainted.” I couldn’t find an equivalent statement on the Daily Mail’s website, but AND, their parent company (how much did that address cost?!), claims “Our mission is to be the most trusted and relevant focal point in every community we serve, ensuring the best outcomes for people when making the important decisions in their lives.” (Although this arguably makes no claims to objectivity assuming it doesn’t affect their trust or relevance).

In contrast, the blogger Michelle Malkin openly declares her conserative allegiances and there’s no doubting LiberalOasis‘s politics with the tag-line “where the Left is right and the Right is wrong”. For a British example, see Iain Dale, who actually stood as a conservative candidate and whose banner quotes are mildly amusing and sometimes reveal more about the person being quoted:

“Political intelligence in every sense” – Roland White, The Sunday Times
“Much wittier than your average Tory” – Lance Price, Former Labour Communications Director.
“I read it every day” – Adam Boulton, Sky News

The thing is, none of this is exactly new. Hunter S. Thompson pioneered Gonzo journalism which Wikipedia currently defines as “a style of journalism which is written subjectively, often including the reporter as part of the story”. Sound familiar? Throughout Thompson’s writing, he was often part of the story, as much making the news as writing about it (he didn’t go to the library to write his book on the Hell’s Angels – he spent a year living with them). Hunter managed to write a pretty definitive account of the 1972 presidential race, which reads with a refreshing honesty despite containing completely fictional elements (such as alleging Ed Muskie was addicted to the drug Abogaine and his advisers had flown in a Brazilian doctor to treat him, but how the hell did anyone not realise he was extracting the proverbial urine there?). My point being that Hunter forsook objectivity, yet still managed to deliver in authoritativeness through his “transparency” – there was never any doubt where Hunter’s allegiances lay. According to Wikipedia, Thompson said in an interview “Objective journalism is one of the main reasons American politics has been allowed to be so corrupt for so long. You can’t be objective about Nixon.” Of course, I’m not saying all bloggers can or should write with the vitriol of Thompson, but they should aim to be open about to which side they lean and how they came to be in possession of the facts – this way people know to check the opposing argument for themselves.

Weinberger is right – only with transparency can we ever hope to arrive somewhere close to the ever unobtainable “objective truth”.

Update:

A commenter on Hacker News pointed out that blogs are normally more analagous to editorials than news stories, and editorials are usually clear in their political bias.

I would still argue that for a newspaper to claim objectivity they should attempt much greater transparency. Some papers now allow comments on stories, which is good move in this direction (but who stops them deleting comments they disagree with?).

Where the Cloud meets the Grid

Sunday, June 14th, 2009

The GridVoices blog on Gridipedia has just moved to a WordPress installation. Back in April, I wrote this article for them, which looks at the similarities and differences between Grid and Cloud computing.

Running JUnit from Vim

Monday, June 1st, 2009

Normally when I’m programming in Java I’ll use Eclipse. However, in some cases Eclipse can be a bit heavyweight and I’ll fallback on Vim. The last time I did this I started to miss the ability to quickly and easily run unit tests on a per class basis. For this reason, I added the following function to my .vimrc which runs the appropriate test class for the current Java class.

function RunTest()

    let cla = matchstr(expand("%:p"), '^.*[/\\]src[/\\]\(test\|java\)[/\\]\zs.*')
    "still need to replace /s with .s
    let class = "java org.junit.runner.JUnitCore " .  strpart(substitute(cla, "/", "\.", "g"), 0, strlen(cla) -5)

    if match(class, "Test") == -1
        let class = class . "Test"
    endif

    echo class
    echo system(class)
endfunction

map <F6> <Esc>:echo RunTest()<CR>

The code assumes that your test directory structure mimics your source directory structure and all the names of your test classes are the same as the source classes with “Test” appended e.g. if you are editing “src/mypackage/MyClass.java”, it will attempt to run “test/mypackage/MyClassTest”. (If you are currently editing a test class, it should run that class).

I also mapped F6 as a shortcut to the function.

I really don’t know Vim script at all, so I’m sure the code could be a lot cleaner. Still, it was a big help for me, and I now find it quicker to run the correct test in Vim than Eclipse.

Why use diffxml?

Tuesday, May 19th, 2009

I’m the author of the diffxml tool for comparing XML documents. In this post I’d like to explain why you might want to use diffxml to compare XML documents rather than traditional text tools such as the UNIX diff command.

There are two things that diffxml understands that diff doesn’t; the syntax of XML documents (e.g. <br/> is equivalent to <br></br>) and the hierarchical structure they represent. (more…)

Welcome

Saturday, May 2nd, 2009

Tergiversations. It’s a real word: tergiversate means ‘to change repeatedly one’s attitude or opinions with respect to a subject or cause.’

Richard Gabriel, “Patterns of Software”.

I nearly called this blog “Tergiversations”, after an essay by Richard Gabriel in his book “Patterns of Software“. It’s a very important book to me. I found the book in a bargain bin in the academic bookstore on my university campus at the end of my first year. At this time I was considering if Computer Science was the correct choice of course for me, or if I should do something completely different, perhaps in Arts & Humanities.

Gabriel’s book affirmed my course choice. In it, I saw someone who clearly loved his subject matter and was capable of deep insight into it. There was no doubt that Computer Science contained serious challenges and was worthy of anyone’s attention. More than this, I saw there was a very subjective side to the field, and that people’s imaginations – even their force of character – were of vital importance (of course, now I realise that this is probably true of most scientific subjects, but it was a revelation to me then).

The book itself is a series of essays, its title coming from an essay exploring how the ideas in Christopher Alexander’s books “The Timeless Way of Building” and “A Pattern Language” apply to software. It also contains essays on writing, programming languages and some more personal stuff. All are worth reading.

I wanted to call the blog “Tergiversations” to show that I was willing to listen to others and change my viewpoints accordingly. For me, one of the most striking differences between science and other disciplines is a willingness to concede, to accept that someone else’s theory is correct and yours isn’t. Of course, this largely occurs because many things in science can be objectively proven; you can’t argue about the existence of a black swan. At least in science, objective progress can be made, in artistic or political endeavour any progress tends to be subjective. I could argue all day against the BNP, but I couldn’t prove beyond doubt that their beliefs are misguided and immoral. However, I can easily prove that my Java code runs twice as fast as yours. (Interestingly, I recently read an article where these two worlds collided, and I’m just glad I don’t have to deal with Andy Schlafly)

In the end, I didn’t name the blog “Tergiversations”; it has the negative connotations of being evasive and desertion, whereas all I wanted to indicate was a willingness to change one’s mind and to try new methods (I’m sure Richard is well aware of this; I failed to remember the precise definition and the context he used it in until I re-read the essay).

To sum up; many thanks to Richard Gabriel for writing “Patterns of Software”, and welcome to “Feeding the Bit-Bucket”1.

  1. Yes, I know this captures none of the meaning I talked about. However, it does capture the likely end product of this blog, and some of the eternal aspect of writing. []