GB Colemak

My laptop died last week (conveniently during a trip to UCL when I really wanted it to work) and so I took the opportunity to upgrade it to the beta version of Ubuntu Hardy. First impressions are all good --- everything becomes progressively more Mac-like and shiny --- although I have some issues with the usability of the Compiz window effects, pretty though they undoubtedly are. The upgrade also made me think again about my Colemak keyboard layout, which has been necessary on my laptop since I prised all the keys off 6 months ago and put them back down in a different order.

Read more…

A much needed holiday...

We're back from holiday now - a week of skiing in La Plagne with Jo's brothers and friends. On the whole it was great, not least just to get away and chill a bit. The size of the group, and the variation in skiing level, made coordinating things a bit awkward, though: it's difficult when you have to get back across the valleys in time for lunch or the end of ski-school. On getting back to work, I really appreciate how simple life is when all you need to concern yourself with is "can I get down this route without a nasty accident?" :) I remember feeling the same last year after 10 days of ice climbing... maybe the time of year makes the feeling that bit more intense.

Read more…

Doing two things at once

I like this bug that I found in a colon-separated path splitting function in some of our C++ code:

while (size_t pos = pathstr.find(":") != string::npos) {
    // split string at position pos, i.e. the next colon...
}

I couldn't see the bug, so I re-wrote it without the cheeky 2-in-1 assign-and-compare:

while (true) {
    size_t pos = pathstr.find(":");
    if (pos == string::npos) break;
    // split string at position pos...
}

It worked immediately. What happens with the code above is that the path string always gets chopped one character at a time, rather than at the colons. This is because the != operator takes precedence over the assignment (=) operator: the first level of evaluation effectively gives while (size_t pos = true) ... as long as there's a colon somewhere in the string. Automatic type conversion then converts the boolean true to an integer 1 and the string gets chomped 1 character at a time until no more colons are found.

Take the hint: don't try to do two things at once, even if you can.

Another STFC letter

Our Durham City MP, Roberta Blackman-Woods came to visit us in the physics department earlier today, to discuss the funding crisis in particle physics and astrophysics brought on by our piss-poor research council and a government department which didn't realise the significance of inflation or full economic costing on academic grants. They also forgot to include the VAT on the 2012 Olympics, so maybe this shouldn't be such a big shock. The difference is that no-one said "oh well, we'll just have to drop the 1500 metres" --- the money just appeared, hundreds of times more of it than the STFC budget for the same period.

Anyway, the session wasn't bad --- our MP at least appears to be on our side and sympathetic to concerns about young researchers having their careers cut short and the knock-on impact of these cuts on physics outreach --- but tellingly she didn't actually commit to doing anything either. So here's another letter winging its way to her courtesy of WriteToThem, sadly before I've had a response to the last one.

Read more…

STFC crisis letter

Having read again Ian Pearson MP's dismal response to the STFC young researchers' letter, I finally got round to sending my MP a letter on the subject today, via WriteToThem, which is copied below. Since I'm trying to squeeze understanding this situation in among a lot of other work, I hope I haven't got the wrong end of the stick too much. Also, apologies for the crappy English --- I didn't have time to finesse it, or find a better word than "decimate" for describing 25% cuts.

Anyway, here it is, for the record...

Read more…

Particle physics crisis

As some might be aware, the Government either has a death wish for fundamental science in the UK, or is just showing its affection for it in a very strange way: cutting our funding by more than a quarter.

There's a complex back-story to this, but sort-of-briefly:

  • Back in July 2007 the Particle Physics and Astronomy Research Council (PPARC --- the body that people like me get their research money and wages from) was merged with another council, CCLRC, to form the Science and Technology Research Council. STFC does the same fundamental science as PPARC did, plus a range of more industrially-connected science which needs big technology. This set off the spidey-senses of a lot of PPARC scientists, as our research doesn't directly hit the fashionable "technology transfer" targets. But the merger was promised to be properly funded, i.e. to ensure that deficits from CCLRC wouldn't impinge on the ex-PPARC projects, so everyone breathed a sigh of relief. * Since at least November 2007, STFC has been aware of a Government funding deal from the Department for Industry, Universities and Skills (DIUS) which effectively gives it a "flat cash" funding projection for the next 3 years. While this looks okay, due to science research funding concurrently changing to a full economic costing (FEC) model, it will actually leave STFC with a deficit of more than 25% on the part of the budget that isn't already ring- fenced for international subscriptions like CERN. * Despite vigorous campaigning from scientists, the STFC has announced its "Delivery Plan" to meet this constraint, consisting of a full UK withdrawal from the International Linear Collider programme and the southern Gemini telescope, as well as an expected >10% cut in number of postdoctoral research staff (i.e. people like me). The cuts are likely to lead to closure of many university physics departments, but the Government continues to claim that it's increasing funding, despite being perfectly aware that such a naive picture doesn't acknowledge the effects of FEC.

There's lots more information in these places, if your interest is piqued:

Anyway, frankly, it's rather disappointing to start a research career and then find your subject being shut down a few years later, for the sake of what is really very little money: STFC's deficit is 80m over 3 years, which isn't much compared to the roughly 1.5bn per year for the Iraq war, 12bn for the dysfunctional, unwanted NHS Connecting for Health scheme, potentially 30bn over Northern Rock, 8bn, or maybe more now, for the 2012 London Olympics, probably the upper end of 6bn-20bn for the "National Identity Management Scheme" (ID cards++) and so-on, ad infinitum. Naturally, this really makes us feel wanted; maybe "blue skies" science should have kept the Web and the MRI scanner to ourselves.

Anyway, lest you get the impression that STFC are righteously and courageously defending particle physics, astronomy and suchlike against an onslaught from a government obsessed with financial short-termism, take a look at this BBC article about STFC CEO's testimony before the DIUS funding committee on Monday. In particular, note that PPARC science hasn't done terribly well out of the merger: Mason cites Diamond, space science and laser research (all formerly CCLRC projects) as doing well, while "We have had to constrain some investments (particularly in the particle physics and astronomy programme)". No shit.

Anyway, this all looks like we're going to hell in a handcart, but good for the IOP and the RAS for doing what STFC should have done all along and proposing a sensible, affordable way to postpone these cuts until after the situation has been reviewed. As they say, "We're talking about 20m --- it's not a terrific amount of money, in order not to allow things to go beyond the point of no return." Hear, hear.

Just for the record: upgrading to AMD 64 with Ubuntu Gutsy

I just upgraded my old (3+ years... I guess that's old these days) 32 bit single-core Celeron PC to a 64 bit dual-core AMD X2 processor, along the way taking the opportunity to pick a replacement motherboard that does all the video, LAN, Firewire etc. things for which I was previously using extension cards. No big news, except that I'm happy to report that no OS upgrade was needed: my 32 bit Ubuntu Gutsy has neatly popped itself into 32 bit compatibility mode, so I don't need to do a major software reinstall at a busy time. Cool!

The only thing that was a bit of a faff was getting the video output in the right mode, and that was entirely because of nVidia's binary-only driver distribution --- Ubuntu needs to be prodded (via the GUI) to enable this driver since it's not an open source compatible way of doing things. Otherwise everything is perfect and it's nice to have the two processor load trails appearing in my system monitor when I compile things now :-)

"So this is the New Year...

...and I don't feel any different." Thank you, Death Cab for Cutie, for proving once again that every occasion has a melancholy song to accompany it.

Not much to report from Buckley Towers, other than that pre-Christmas was pretty hectic, early 2008 looks set to be just as busy, and the last two weeks have been a wonderfully welcome break among friends, relatives etc. We headed off to Belfast in the car (and complete with cat) on 21st December and generally vegged in my parents' new house for the next 9 days. Christmas itself was lovely, it was good to see people again and I even managed to see some school friends for the first time in almost 10 years. The jury is out on whether my football skills have improved at all in the last decade. We got back from Belfast just in time to see Jo's brother Martin for an evening, brother James for an hour and then zipped down to Cambridge for an impromptu New Year's celebration. Cracking stuff, though the mileage was pretty high... a dent in our collective resolution to be yet more ethically conscious this year :(

This break was also unusual in that they haven't got any internet connection yet, so I had to go cold turkey for almost a fortnight. It's good to be back in electronic contact with the world, although I haven't yet dared look at my email. I'm now relishing the chance to sit down in front of a computer to organise things, write some code, buy things, plan buying more things, get back to work, scan another night-climbing book and write inanities (like this). Sad but true.

Mad props (and some random warbling)

I actually wrote this about a month ago, but for various reasons it hasn't emerged 'til now... so if it seems hokey and out of date, I blame the posting delay rather than my intrinsic lack of insightfulness :)

Nathan recently blogged about Python's neat approach to getter and setter methods, namely the property() constructor.

Read more…