InsectNation

do your funny little dance


Home > Articles > Monthly Archives

February 2008 Archives

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.

I bought Didier Givois’ “Les Cles de Paradiski” book in Plagne Centre on the first day (he was prepared to post me a copy beforehand but the expense didn’t seem worthwhile - it’s a heavy book) and spent the evenings poring over it with the help of a map. It’s a pretty good book but, coming from a climbing background, I’d have preferred a clear photo(s) and route guide for each route in place of some of the spectacular but generic “awesome skiing” photos that take up a lot of pages. Maybe he wants to protect people from themselves by not providing enough info. Maybe he knows that most people will never ski the routes and will just enjoy having a chunky coffee table book. Maybe he just likes big photos. But to me it seems there’s no reason why a pocket-sized route guide, as you’d get for climbing, wouldn’t work for off piste skiing. The same safety disclaimers would apply: it’s not the information about routes that leads to injury — it’s unprepared and over-confident users that do that. (I’m one to talk, though: since no-one else in our group was up for “silly skiing”, I had to pick the routes with little avalanche hazard and do them alone. Not ideal.)

I also read Mark Twight’s collected articles, Kiss or Kill while I was away. Mark is as forceful and controversial a writer as he is a climber, and the subtitle “Confessions of a Serial Climber” sums things up pretty well — his take on climbing is far more intense, uncompromising and psychopathic than your average weekend warrior, myself included. On emotional baggage, he repeatedly declares that he’s “got good with the knife”, cutting away his ties to friends, family and lovers when the chance to die on a mountain comes a-calling. Dark stuff, and refreshingly different from most climbers’ writing. Reading the book while in a ski resort was an interesting contrast — skiing is the perfect example of a commodotised, homogenised sport, whose purer forms are these days a relative obscurity. Every time I left the pistes and headed for a couloir, trudging upward high above the neon-suited goons, I thought of Kiss or Kill. Every time I returned to the bars and creperies I recognised a bit of the Twight darkness in my loathing of the “dude, I did a black run… hardcore” attitude. And all the dudes with cool hats in the lift queues… argh: life would be better if the plastic boot and the carving ski hadn’t been invented. I found this time, more than any other ski trip, that skiing between markers, on maintained, secured pistes no longer holds much interest for me — what I like these days in skiing is the bits that most resemble offshoots of mountaineering. This resonated with the book — what I find unappetising in resort skiing is much the same as what it is in ice climbing comps that rub Twight up the wrong way. Not that my skiing really compares to super-light, alpine style mountaineering — that way lies undeserved ego massage — but it was reassuring to find a voice that I could agree with while hanging out in resortsville. I suspect the reason his books interest me is that I recognise a lot of my own motivation for pushing myself in climbing or skiing in Mark’s introspections, only watered down a thousandfold. He’d probably hate me for compromising.

Anyhow, we’re back and I’m reeling this off at the end of the first day back at work. It was never going to be good, but with a seminar to give in a week’s time, no data or slides for it and a plethora of things to do in-between, it’s not been a good ‘un. Plus, all my suspicions about crappy numerical algorithms in Rivet seem to have come true in the last week — at least Hendrick Hoeth has been paying attention and sorting out the stuff I haven’t had the time to work on. Damn, not enough time. At times like these I feel like wielding the knife myself a bit, and cutting away a bunch of the things that I’m meant to be responsible for. But it’ll pass — give it a couple of weeks and I’ll be adding more projects to the TODO list again…

Continue Reading…

Posted by Andy Buckley on Feb 25, 2008

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.

Continue Reading…

Posted by Andy Buckley on Feb 11, 2008

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.

Posted by Andy Buckley on Feb 12, 2008