A new running season begins

You might be wondering what, exactly, marks the beginning of the running season? The answer: the start of regular training for spring races. That's probably the most accurate answer, but in my case, the timing is also due to the arrival of temperatures that, while not warm, are no longer likely to cause frostbite.

The Winter was not fruitful for my running career. There were many weeks where I managed a full 40 km, but there were just as many where I stayed inside because the temperature outside was 20 below zero. But the cold weather has passed (at least for now) so there are no more excuses. My first race is at the beginning of April, and week one of my 12-week regimen is currently underway: eighteen kilometres done and five hundred kilometres left to go.

New WrapVTK XML format

I've started working on my WrapVTK project again, which aims to be a new wrapper-generator for VTK. This project started last spring as a test-bed for the "2010 VTK Wrapper Overhaul". Essentially, I coupled my revamped vtkParse wrapper-generator front end with an XML-generator back end, so that I could be certain that vtkParse was correctly parsing the VTK header files.

My big news is that I have updated the XML that WrapVTK produces. In the first iteration, it produced highly verbose XML output that was less readable than I liked. This time around, I put a lot of thought into how I could use attributes to make the XML more compact, without losing any flexibility. This is the result. At the same time, I did a few fixes to make sure that it will work with the upcoming VTK 5.8 release (the first VTK release with my new Python wrappers!)

Also, if anyone out there knows of any other XML file formats for describing C++ header files, can you send me a comment? The closest things I have been able to find in my searches are GCCXML, XML-RPC, and SOAP, none of which are really suitable for me. GCCXML is almost usable, except that it cannot provide information about unspecialized templates, and is lacking in human-readability and compactness.

Winter running

The temperature here in Calgary was -20C for a week, and I chickened out on my runs. That's right, no running at all for 10 days. The cold spell is over and I'm back to running again, but it's definitely winter running with the temperature always below freezing, and with packed snow as my running surface.

I've found a simple schedule that works for me. Two runs on the weekend, and two during the week. The weekend runs are nice… the air is crisp and the sun is bright. The weekday runs are less pleasant. At 5pm the sun has already gone down, and the fact that I can't see the ice patches means that I have to run very cautiously. By the time my run ends, it is close to pitch black. And I'm continually blinded by the bicycles with their super-bright headlights. Did you know that many people in Calgary ride their bicycles all winter? The ice must be even more of a problem for them than it is for me.

Oh, and something new today. A beard icicle! I'm used to having my beard become caked with ice, but this was different. I had a beautiful little icicle, about an inch and a half long, hanging off my chin.

Better late than never

I have an embarrassing amount of source code that I haven’t released. Little projects that I started but never finished. Or worse, project that were finished but never tested. I like to pick through my pile of detritus every so often to see if anything is worth bringing back to life. Last month I did so for two projects.

Project 1: Stencil iterators. Way back during my PhD, I wrote a C++ class for storing a binary image stencil with run-length encoding. It performed well but was a big pain to use. I started working on an iterator-style interface for it to address its usability issues but (ah, yes) ran out of time and had to move on to other things. Now, six years later, I finally got back to it, and converted four VTK image processing filters so that they use it. I also took my old python code for generating image stencils from contours, and converted it to C++. And as soon as I had done so, a grad student in Vancouver started using it. Progress!

Project 2: MNI file formats. I use several file formats that were developed by the Brain Imaging Centre at the Montreal Neurological Institute. Some of the software that I've shipped uses these file formats, too. For the past four years, though, the code that I wrote for these formats was sitting around unused. Well, I finally started working that that old data again, so I thought it would be worthwhile to spend a few days cleaning up the code and releasing it. Now VTK has a vtkMNIObjectReader/Writer (for anatomical geometry like brain surfaces), a vtkMNITransformReader/Writer (for image-to-image transformations), and a vtkMNITagPointReader/Writer (for dataset labelling).

All of these have just barely come in under the wire for the upcoming VTK 5.8 release. It's nice to see the kids leave the nest.

Cold hands

Running in the evenings has become a cold and dark experience. By 6pm, when my run ended, the stars were out and the temperature was below freezing. My summer gloves were not enough to keep out the chill, and when I came back indoors, my hands hurt like hell for fifteen minutes while they warmed back up. Next time out I'll take my winter gloves, frostbite could happen very easily on these 10k runs.

The next race is so far away…

My next race is the April Fool's Run in British Columbia. As you can guess from its name, it isn't until April… that is a full 5 months away! How can I keep myself motivated to run during the winter? Especially now that that daylight savings time has ended, and the sun has already set by the time I get off of work?

Honestly, the thing that keeps me going right now is habit. I have been running regularly since February, when I started training for my first half-marathon. Running has become easy, I can just put on my shoes and go. There are no sore muscles, no aches and pains. When it is cold, I put on extra layers (nothing fancy for me, just old sweatshirts). When I can, I leave work before the sun sets and then finish my work in the evening.

SimVTK 0.2.4 Release

Announcing SimVTK 0.2.4, the lates SimVTK release. Source and binary packages can be downloaded at http://media.cs.queensu.ca/media/SimITKVTK/downloads.php. We have also written a new article on SimVTK, which can be found in the VTK Journal. This new release includes Windows and Mac OS X binaries for VTK 5.6.1, and features various style and stability fixes.

Progress on SimVTK had been going slow for the past year, but we finally have a student working on the project again. With this added manpower, we will be able to merge this project with my WrapVTK project, which is itself a spinoff of the VTK/Python wrapper enhancements that I did over the summer. The result will be that more VTK parameters will be successfully wrapped in SimVTK. We also hope to speed up the wrapping by doing a rewrite of the Perl code-generating code.

CPU upgrades are fun

Why do I do this to myself? I decided to upgrade my PC's CPU from 2.4 GHz to 3.0 GHz. I had a good reason to do so, the old processor was one that I bought cheap on ebay and it was a poor match for my motherboard. Also, the new CPU had three times as much cache and was more energy efficient, not to mention that it ran at a faster FSB and would therefore increase the speed of my memory.

Unfortunately the switch did not go smoothly. After I inserted the new CPU, the computer tried to boot three times before it finally booted far enough to allow me into the BIOS. There, I noticed that I had hard-set the multiplier to that of my old CPU, so I fixed that, and rebooted. This time it almost finished loading Linux before it died. Multiple reboots and playing with the BIOS got me nowhere, usually it wouldn't even make it to the BIOS screen. Finally, I found the motherboard manual and did a BIOS reset. Oddly, afterwards it said "recovering BIOS from IDE partition" and refused to boot past that point until I disconnected my hard drives. When it finally did boot, the system was still unstable.

So, I put in the old CPU — it's a big pain to switch these things — and thankfully it booted faithfully. Then I downloaded a newer BIOS, saved it on a floppy (yeah, I still have some) and went though the rigamarole to flash the new BIOS onto my motherboard. Afterwards my PC went through the whole "recovering BIOS from IDE partition" thing, requiring me to remove the hard disks, but I figured that the BIOS had been loaded. Since everything seemed to be working with my old CPU, I decided to try the new one again.

No luck. Just as bad as before. At this point, I'm thinking that something must be broken and I'm just hoping that it isn't my fault. Next time I get to the BIOS, I crank down the CPU speed to just 2 GHz and the memory speed to just 800 MHz, and this time it boots all the way into Linux but dies 5 minutes later. So now I'm thinking that it must be a bad CPU. Or maybe a bad power supply, because bad CPUs usually don't boot at all, while bad power supplies are better at keeping you guessing. It was 2 am, so I went to bed debating whether to buy a new power supply, or whether to try and exchange the CPU at the store.

In the morning, I checked online for the power consumption of the new CPU. Yup, exactly the same as the old one, but I still wasn't convinced that it was the CPU's fault. But in my day, I have seen many failed power supplies but never a faulty CPU — the quality control at Intel is very strict. I re-checked the online info for my motherboard to make sure it was compatible, and yes it was for the BIOS that I had loaded.

Since it was 8 am on a Sunday and the stores would not open for three hours, I decided to give the BIOS one more shot. So I switched back to my good CPU (gah! what a pain!) saved a BIOS to floppy again, and re-flashed my motherboard. This time I noticed something odd.. the checksum was all decimal digits, but last time I could have sworn that I saw some hexadecimal digits. If the checksum was not the same as before, that could not be a good thing. So I tried again… and again it was different. At this time I'm also cursing my motherboard manufacturer, because what good is a checksum if it just prints it but doesn't, you know, check it and tell you if it is wrong!

You know what my problem was? A bad floppy! Since my BIOS was trashed I had to reset it again and boot up and save a new BIOS on a new floppy and re-flash and then re-flash again to make sure the checksums matched and then finally reboot. And you know, that first boot screen goes by too fast for my monitor to even come out of it's power-save mode, so I cannot even verify that the BIOS version of my motherboard matches the version that I loaded from the floppy.

Anyway, after yet another CPU switch, my computer is finally up and running at 3 GHz. And 10 hours of my weekend are irretrievably lost. Well, I can't say "lost" because it was kinda fun, but only because it all worked out in the end.

Decreasing mileage

Fall has arrived in Calgary, and running in the morning is not as comfortable as it used to be. Since the mornings are well below freezing, and the evenings are getting darker, the best time to run is first thing after I arrive home after work. The problem is that going out for a run is the last thing that I want to do at that time. My after-work frame of mind is focused on rest and dinner. So I have not been going out as often, and only manage around 30 or 40km per week.

How can I turn this around and get back up to the 50km per week that I promised myself? I don't think my reluctance to run is purely psychological. Before dinner I really am short on energy. As a trial solution, I am going to bring extra snack food to work so that the afternoon hunger pangs don't hit me as hard.

A collector of virtual computers

You know those people who keep all their old computers on the off-chance that they might eventually find a use for them? The ones that even have their old Commodore 64 and its original monitor? Well, I can understand these people because I have a fondness for old things… especially old computers. But I'm not a packrat and since I usually only stay in one city for a few years, having too much stuff weighs me down in a very real way.

So, a while ago I started the habit of virtualizing my old computers before selling them — or recycling them, if too old to sell. This started with my old Amiga 1200, which I had been packing around from 1992 until 2007. The old beast had to go but I couldn't really part with it, because I had written a ton of old software for it that wouldn't run on any other machine:

  • My first GUI widget toolkit, written in Amiga BASIC.
  • My first 3D graphics library, written in 68000 assembler.
  • My first interpreter, for Scheme (a variant of LISP).

None of these are particularly useful to me now, but I still enjoy playing with them now and again. So I spent a day recreating this old machine's hard drive on my Linux box, copying the files over on a 720k floppy. Then I downloaded an emulator, and ran the virtual machine… with all the files exactly where they used to be.

Since then, virtualizing my old computers has been a habit of mine. For most of my computers from school or work, I just keep a copy of all the files. But for my home computers, I keep the old hard disk (or sometimes just the partition) and run it as a virtual machine… either inside VMWare or Parallels (or for Linux, just inside a chroot). So for example, on my main home computer I have:

  • 64-bit Linux as the main operating system, for work.
  • A virtual Windows XP system running under VMWare, actually a copy of an older work machine.
  • My old 32-bit home computer running in a chroot jail with its own X session. I use CTRL-ALT-F9 and CTRL-ALT-F7 to switch back and forth between my "work" computer and my "home" computer.
  • Another Windows XP virtual machine (running on my virtual "home" machine).
  • My old Amiga with all its software, games, and art.
  • An Apple II+, the first computer I ever used.
  • Full backups from school/home/work going back to 1988.

You might think this is a bit excessive, but hey, none of these take up any shelf space, and it's nice to keep all this old stuff around. Now if there was only some way that I could virtualize my old pets, so that I could keep them around forever, too.