Publishing code

Nick Barnes has an excellent opinion piece in Nature. And the comments are good too. There is a comment-on-the-piece by Anthony Fejes which I think is less good: too much like the kind of people who put you off cycling by insisting you have to wear a cycle helmet or walk. And you should read Nick’s follow up a CCC.

I’ve decided that I agree with Nick’s overall argument: yes you should publish your code. Which means, everything that is yours, including the little fiddly bits. Even if no-one will understand them. Even if people will deliberately misunderstand them.
Continue reading “Publishing code”

New watch

I have a funky new watch, a Garmin Forerunner 110. It lets me do kewl stuff like:


although you only get that after post-processing, of course. In fact I haven’t even worked out how to make it work like a GPS when running, i.e. display lat/long or grid refs. Nor have I worked out how to persuade the stupid post-processing software to give me mph instead of mins/mile like all the hard-core runners want, pah. But the upload-from-watch (via the provided nipple clamp) to-web-and-graph is impressively smooth and painless.

You’re fascinated – I know – so let me tell you that we did two laps: the first, slow, included the lake. The second was faster. And then at the red line I ran a bit faster back to the mothership. The heartrate peak of ~180 is when I sprinted up the A14 bridge.

[Update: give me mph instead of mins/mile – well, it has now swapped to mph, which is good, but I don’t know why, which is less good -W]

[Update: twice now the watch has frozen / locked up on me, both times when attaching it to the computer: I think it happens when you don’t get the clamp on quite correctly and it briefly connects / disconnects. If that happens, you have to reset it by pressing the “light” button for ~7 secs. But you lose all your data. Others have the same problem. Possibly press and hold Lap/Reset and the Light buttons simultaneously may be a better way of resetting.

Update on that: the problem mostly occurs if you *haven’t* “reset” the activity before trying to upload – somehow it can’t cope. So always remember to do that first.]

[Update: I’ve realised something about the tracking / recording, prompted by DHW: that although the max sample rate appears to be every-5-sec (and this isn’t configurable), it will drop samples that are “uninteresting” if it wants to. In particular, if you are erging, so the position is constant, it will quite likely not record many heart rate samples. The only solution I’ve found it to keep the watch on your wrist to generate movement and hence more logging.

Another whinge while I’m here: there is no “turn the light on and keep it on” mode, which would be useful for night time outings.]

Some links

More boring links blogs stuff. But just for once I do actually have something else to say, so I’ll try to clear this out asap.

* Do you need context to understand the CRU emails? Or can they be understood on their own? An analysis. No prizes for guessing the answer. But links to…
* The secret life of bugs which is a fun analysis of how much could you understand bugs from what was recorded about them? Answer, often not much. Mind you, some of the stuff in there is weird – how does The missing link to source code change-sets is one of the most problematic omissions. For the last bug of 70% of our survey respondents, the fix involved committing code to a repository. But 23% of those cases had no link from the bug record to the source make any sense in a sane system?
* Meanwhile, JA puts us all to shame by doing some science: “Assessing the consistency between short-term global temperature trends in observations and climate model projections”. Lots of comments there. Possibly addressing some of JC/KK’s “tribalism” problems.

Wireless mice and google buzz

Google has signed me up to their “buzz”, which seems to be like facebook but with fewer people and no silly games. This link might work, or it might not. Who knows. Is it any use? I don’t know.

Which brings me on to wireless mice. I’ve had a lot of trouble with my wireless connection over the past couple of weeks, and very annoying it is too. Eventually I realised that this coincided with Miriam buying a wireless mouse. And sure enough, now I’ve turned the silly thing off things are much better. This seems really dumb: everyone is going to want to use both together. She should have got a bluetooth one :-).

Not the post you were looking for

A small excerpt from the true horror at The C Programming Language Brian W Kernighan & Dennis M Ritchie & HP Lovecraft:

Exercise 4-13. Write a function reverse(s) which reverses the string s by turning the mind inside out, converting madness into reality and opening the door to allow the Old Ones to creep forth once more from their sunken crypt beyond time.

(bonus points for spotting the error in Cthulhu).

You can’t parse [X]HTML with regex is good too, apparently sufficiently so to have blog postings devoted to it, not that this is.

Hat tip: Paul.

If you believe in climate related software being open, or even if you only believe in the ultimate triumph of Python over Fortran (personally I’m a Perlista when not rooting for embedded C, though I have respectable colleagues who adhere to the Python heresy, and who may convert me in time), then go visit:

where you can find a guide to the project history and some interesting results and their google code. This is all a free effort by Nick Barnes and David Jones and others at Ravenbrook, but they welcome others to join. So far they are concentrating on the instrumental series (gosh, how topical!), but Nick has ultimate ambitions to do palaeo stuff too. Maybe they will write a climate model one day (though that is a much much larger task). It looks like the UKMO has finally swung round the idea of an open analysis (well maybe; this can perhaps be read slightly differently. We’ll see what they release. I presume “We intend that as soon as possible we will also publish the specific computer code that aggregates the individual station temperatures into the global land temperature record.” means that they feel the need to scrub the code for embarassing comments first, otherwise what possible reason could there be for delay?).

I wonder if this is a good place to comment on programming languages? One of the reasons I left science was that I really didn’t want to spend the rest of my life writing Fortran. It does have some advantages – it is harder to do some of the really really stupid things that are fairly easy to do in C – but that isn’t a reason to be writing new code in it. It is a legacy problem – so much old code is on Fortran – but sometime someone has to gird up their loins and replace it. And retrain all the scientists who write Fortran.

Brain transplant

Following my oops I got a new portege, though it had a blank disc. Fortunately I didn’t really care about that, as I wanted to swap discs. This turned out to be a matter of 2 screws on each box, and lo and behold the mind and memory of my old machine is transferred to a shiny new one, with the added benefit of keys that you can read and even press, due to a lack of biscuit crumbs and apple juice residue.

The only slight faff was that the wireless wasn’t recognised, presumably due to some hardware up/downgrade between the old and news ones. Downloading everything from fixed that (it turns out to be an Intel one, if you care).

Meanwhile, I used the pic of the old broken screen as a screensaver at work.



I think I may have kicked it a bit too hard this time.

[Update: best comment so far has to be the ref to, but is a good second-best.

Another update: I was quoted ~£150 to fix the screen. So I bought a reconditioned machine off ebay for £100 + postage. Such is the internet.

Meanwhile: remember this: -W]

Perl would be Voodoo

Perl would be Voodoo – An incomprehensible series of arcane incantations that involve the blood of goats and permanently corrupt your soul. Often used when your boss requires you to do an urgent task at 21:00 on friday night. From If programming languages were religions…, via mt’s shared list.

The comments add Fortran and Assembler. I do C nowadays. Matlab and IDL don’t get a look in.


I have a twitter feed, Quite what its for, I’m not sure. Maybe it will turn out to be useful. Maybe I can embed it into my blog or something. Did I mention that I have a pointless facebook page? Oh look, facebook has a twitter app. It doesn’t tell me what it does, and I can’t work it out even after adding it, call me a grumpy old technophobe 😦

[Update: more adventures in web2.0 land, in which I’m lost. Thanks to Paul, I worked out how to get my twitter feed onto facebook (somewhat unimpressed to discover that I can only import one feed, so I can’t import the blog and twitter, but then if you want to read the blog, errm, you can do that via google reader). Still not sure what use it is, beyond repeating J’s bon mots, lightly sanitised.]