My First Adventure Race

August 29th, 2009

Today I participated in the Gleneagles Challenge. I must say it was a lot more fun than I expected from an event that takes 4.5 hours and requires you to be constantly on the move.

About 20 minutes of running, 30 minutes in the kayak, an orienteering course and a lot of bike riding. The bike’s odometer showed 19.33 miles when I got back home (that included about 3 miles to get to Lake Bond and back).

Thanks to Bryan, Rob and Justin for letting me join them. Overall I think we did pretty well, second place when we only aimed to finish the race in one piece.

keyutils, python and you

July 30th, 2009

Over the weekend I wrote Python bindings for keyutils. So this blog announces python-keyutils.

If you are not familiar with keyutils, it is a library that allows you to securely store sensitive information, directly inside the Linux kernel. You have a reasonable guarantee that the information cannot be retrieved from the memory or swap.

keyutils comes with a binary, keyctl(1), that gives you access to the kernel’s key management facilities. The man page describes the types of available keyrings. The ones the most interesting to the use case I had in mind were the per-thread, per-process and per-session keyrings.

The need for python bindings came when we realized that our release process requires typing the passphrase for signing packages way too many times, so there was a real need for a key agent of some sort. Searching for gpg-agent protocol specifications (or seahorse) returned some information, but nothing I could readily use (I may not have found the proper examples for speaking assuan; the end result was that I could not get anywhere in this direction).

Future versions of Conary will have the ability to read passphrases from the session keyring, if python-keyutils is installed. You can get python-keyutils from either contrib.rpath.org@rpl:2 or foresight.rpath.org@fl:2-devel (depending on whether you need the python 2.4 or python 2.6 version).

Keep in mind that I only implemented the bare minimum I needed for being able to set and get key information. There are other functions the library provides, that could be useful to have. If you find the need for one, let me know; as usual, patches will be cheerfully accepted.

The code is hosted on bitbucket and can be checked out with Mercurial.

Vote for Cary as the best place to play tennis

July 21st, 2009

Please vote for Cary!

The winner of the 2009 Best Tennis Town award will take home $100,000 to be used for community wide programming or facility enhancements that the winning entrant endorses, and the community will be recognized during the 2009 U.S. Open.

According to the town of Cary:

To support tennis, the Town of Cary constructed the Cary Tennis Park with 30 championship lighted courts, later converting one court to four permanent 36-foot QuickStart courts, making the Tennis Park the largest in North Carolina and one of the largest in the Southeast.  The Town also boasts 25 other tennis courts at four parks — Annie L. Jones Park, Harold S. Dunham Park, Robert V. Godbold Park, and Middle Creek School Park.   Furthermore, the Town has assembled top notch staff charged with operating the tennis program with a team based philosophy.

In addition to the Town’s tennis facilities, there are more than 200 tennis courts in Cary including public courts, private clubs, schools, businesses, and HOA facilities.  There are more than 20,317 people participating in organized tennis activities in Cary including Town programs, Western Wake Tennis Association tournaments and leagues, private club programs, corporate leagues and adult social leagues.  Many of these organizations work together to provide adult league play, junior league play, charitable organization fundraiser events, QuickStart tennis programs with local elementary school PE classes, Bridge II Sport’s wheelchair tennis program and local public and private high school teams.

python: the dangers of assert

July 1st, 2009

I ran into a piece of code that looked like this:

import threading

class A(threading.Thread):
    def run(self):
        self.foo()

    def foo(self):
        assert(threading.currentThread() != self, "Blah?")
        print threading.currentThread() == self

a = A()
a.start()
a.foo()
a.join()

In the original code, there was no a.foo() invocation, because that would have triggered the assertion. Or so it was thought. I added it for my own edification.

The intention was for the foo() method to be callable only from within the running thread. In my quick test above, a.foo() should have failed.

There were two problems with that piece of code. First, it was not failing. Second, in python 2.6 you get a warning whenever you use assert with paranthesis. This is very deliberate, since assert is not a function. Using paranthesis will simply pass a tuple to the assert construct, and the tuple will always evaluate to True.

Very dutifully, I removed the paranthesis, and moved on to do some other things (and I even forgot I did it). A few days later, a coworker reported problems with the code.

As it turned out, the assert was hiding a very old bug – the condition should have checked for equality, not inequality. But since the condition _and_ the error message were paranthesized, the code passed no matter what you did. Removing the warning uncovered the problem, probably 3 years later.

Probable causes for errors

June 1st, 2009

If you needed an excuse-of-the-day look no further than the DMTF specs for CIM.

The CIM_Error class has a ProbableCause property which can have a long list of values:

http://msdn.microsoft.com/en-us/library/cc150671(VS.85).aspx

“Toxic Leak Detected”, “Ice Buildup”, “High Winds”.

In a way, I feel refreshed to see the potential causes for the world’s problems are no more than 129.

27-mile week

May 30th, 2009

Yes, I ran more than a marathon.

Unfortunately, spread over 6 different days.

Last week I ran 24 miles (4 days 4.5 miles each, a longer weekend 6-mile run), and this week I wanted to increase the distance by 10%. That was 6 days with 4.5 miles each – tomorrow is rest day.

I am not training for anything at the moment, so I am pretty happy, especially after coming from a 3-week vacation where the only running I did was a 15-minute downhill Tâmpa in Bra?ov. I will probably try to keep it at this level, I have no interest in increasing the weekly distance at this point.

Sprained ankles

May 30th, 2009

Thankfully, the title is not about me.

I was running my usual trail course today and found a lady who sprained her ankle so bad, the pain almost made her pass out. I helped her hop on one leg to a house less than 100 yards away, where a very nice gentleman drove her home.

She mentioned that she doesn’t want to go to urgent care because she recently got laid off and has no medical insurance. This is so sad on so many levels. Silly economy. Stupid medical system.

Dinner in Vienna

May 8th, 2009

Flying back from Romania, we had a one-night layover in Vienna, Austria, and we spent the evening sightseeing.

Here is the dinner-on-the-run we got from a supermarket (we wanted to use the daylight for pictures, so we chose to eat at the hotel instead of a restaurant in the city).

The Limburger was not “ripe” yet (i.e. it was still firm; as with the Camembert, if you let it outside for a few hours, it will become soft and spreadable – and extremely smelly). Off the supermarket shelves, one only gets a hint of how rotten it will become.

In the train that was taking us back to the hotel, every time I was opening by backpack, I was afraid the HAZMAT unit will show up and throw us out.

The cheese strudel was pretty good too, but it had no good story behind it.

“We know your vehicle best”, dealership says.

April 12th, 2009

Recommended tire pressure in my wife’s Honda Fit: 32 PSI.

Actual tire pressure, almost 2 months after the car was at the dealership where they rotated tires and adjusted pressure, with no intervention from me ever since: 40, 32, 35, 37 PSI. Measured at cold (not driven for a day).

Given that we’ve seen the tires slowly lose pressure in her vehicle (dropping from 32 to 25 in about a month, thus triggering the onboard sensor several times in the past), makes me wonder how much air they’ve put on Feb 16th.

Autopark Honda, I’m watching you.

What? No rain?

March 29th, 2009

The past two events (Lake Johnson Night-O, directed by yours truly, and Schenck Forest) were extremely wet, coming after several days of rain _and_ with rain during the event.

Today’s event at Umstead didn’t look great either if you were to trust the weather forecasts at the beginning of the week. However, as the event got closer and the forecasts predicted the rain would stop some time Saturday night, we’ve seen a lot of people registering. I know because I happen to be on the list that gets the notifications.

Today was a bit windy, but otherwise sunny and – what a change – dry! Mostly. There was still a lot of mud everywhere, and on some steep hills I felt like skiing. But coming back with my clothes completely dry, that’s definiltely different.

Jozef designed a beautiful and very challenging course. The Green course was longer than our Red usually is (6.7km), and Red was 7.4km. If that doesn’t sound much, maybe I should add the elevation changes that pretty much killed my legs by the time I got to control 13 (out of 19). By then I was obviously no longer thinking straight, I lost probably at least 10 minutes looking for control 16 after I passed it probably by 30m. Then I lost a few minutes at control 19 (the last), a trivial one, because I took the wrong clearing (which was not mapped), instead of the obvious one with some man-made objects in it.

In a way I wish I stopped after #13 and call it a Green day; on the other hand I found out how out of shape I am (not that I didn’t know, having skipped some of my runs for wimpy reasons like “the trail is wet” and “I’m too tired to wake up”). 106 minutes of running (and walking towards the end) proved to be quite tough on those hills. Once the results are posted, I’ll know how bad I did compared to others.

I probably need to train for a specific goal, maybe I’ll set one after we come back from vacation in Romania, mid-May-ish.

To quote a slogan I read on a t-shirt: “procrastinators, unite tomorrow!”

(to be fair, I know I will not train while on vacation, except for maybe a food contest, so there’s little reason to plan for something now).