Monday, July 28, 2008

German, American, or Other? Part II

My PyCon 2008 posts included an item "German, American, or Other" with a list of core python developers (anyone with subversion privs) and a guessing game on nationality. I just updated the post with some statistics on how many Americans come from German immigrants (hint: lots) but I'll repeat the update up top.

German ancestry is dominant** in 17% of Americans or about 50 million people. You can be 1% German and have a German last name or 99% German and have a Spanish last name but if people mate randomly* the number of people with German last names would be at least as high as the number of people who self-report that they are mostly of German ancestry. There are 80 million Germans and somewhere near that number of Americans with German last names so this quiz becomes somewhat less surprising in hindsight.

* and mate randomly they do. The urge to mate is much stronger than any weak favoritism for ethnic continuity. In the US the idea that like-marries-like doesn't last for two generations (see "My Big Fat Greek Wedding"). And the idea is weakest in the majority (aka white people). Growing up I was amazed that the O'Dea kids down the street were 100% Irish. They weren't recent immigrants so the only thing in my mind was: wow, what are the odds?

If you want another anecdote, here's one: my father's father (who's last name I have, obviously) did not like the Pennsylvania Dutch ("Dutch" being the popular corruption of "Deutsch") . He was a 3rd generation New York German but he didn't care for the country bumpkin Pennsylvania Germans who got on a Westward boat 10+ generations before his own ancestors. His bias was entirely theoretical and limited to jokes and stereotypes. He didn't consider my mother (100% Dutchy) or any of her family as "Dutchy" because they were doctors, lawyers, businessmen, and engineers. He was encouraged to not bring it up and everyone else was reminded that he didn't really mean it. "Etlay itway opdray" is our family motto so this was rarely a problem.

** German ancestry is a plurality but thankfully English/Scottish law is dominant. At the time of the Constitutional Convention in Philadelphia, Pennsylvania the dominant language in Pennsylvania was actually German. Those German speaking Americans were not parochial, however, they voted to make English the official language of the state.

NB, if you ever read a story about harsh race relations in America please take my grandfather's story into account. My grandfather's rhetoric far exceeded reality. His words (accurately quoted!) would have been an indictment but were far different than his beliefs in practice.

Tuesday, July 22, 2008


I suspect you've spent too much time using Python when you start calling C variable assignments "mutations" ;-)

Fredrik Lundh in a thread at Ned Batchelder's blog.

Friday, July 11, 2008

ICFP at a Glance

This years problem is simple and very very hard (otherwise it wouldn't be much of a contest). It is a hard path finding problem with time constraints like many past years. Unlike recent years the problem doesn't favor big teams or teams with lots of CPU power. OK, it favors them a little but not much.

The problem is to write a "Mars Rover" control program that communicates over a TCP/IP socket and receives and sends messages with a small real-ish time delay (around ~100ms). All submitted programs will run on the same hardware so the team with the best algos will likely win.

Bob is out but I'm still sticking to the bourbon and steaks theme. I spent an hour on the porch reading and interpreting the problem. And I brought some friends:

Beside Huey, Duey, and Louey are the printed problem description, a fifth of Bulleit bourbon, my engineering notebook, and a trusty Uni-Ball Roller (blue).

If it doesn't violate the rules ... here is how I'm approaching the problem for a first draft:
* ignore the delay in sending commands
* treat all boulders and craters as square
* treat hostile martians as immobile boulders

As the joke goes a Physicist was asked to guess how much a horse weighed and said "Well first we assume the horse is a sphere..." Good enough for a first estimate.

You will notice that I'm a good sport - the rubber bands have been cut on the lobsters. Also, lobsters aren't a big deal in Boston. They cost $8/lb (similar to luncheon ham) so what would be extravagant in land-locked Iowa costs just $30 here.

The problem has a bunch of complicating quirks, of course. It may be profitable to crash into a boulder to slow down and on some maps it may be best to suicide as quickly as possible because of the scoring system. 20 grad students spent a month designing the problem so I'm sure more subtleties will out. Bastards.

Aside I should have mentioned that I went bowling before food shopping and the problem was published. 152, 159 - not good but not terrible considering I was jet lagged and I was a week out of practice. Plus the lanes were messy (that's my excuse and I'm sticking to it).

ICFP 2008 Starts NOW

The ICFP programming contest starts in a couple hours. I have done it the past five+ years and care enough that I flew back from EuroPython early just so I could participate. Unfortunately my usual compatriot Bob (an Electrical Engineer) has been sidelined by an illness. This is a double blow because not only do I not have a second, our normal weekend of beers and grilling (really $50 bottles of bourbon and Omaha Steaks) is off.

I'll be doing it anyway but with a reduced level of fun (and likely success). If anyone reading this wants to participate let me know. I'll be running a bzr repository and depending on the problem (which changes by year) the code will be somewhere between 90% python and 90% C.

Foord, Brandl? I'm looking your way.

I've been meaning to publish my contact information for a long time; John Patrick has been a big deal at IBM for a long time and published "Net Attitude." He makes all his contact information (phone, IM handle, etc) publicly available and swears that is no more than a nuisance. Previously my information was unpublished and the biggest nuisances were head hunters and telemarketers. To put it a different way: all the annoying people already can find me, so why not make it public?

So if you are looking for semi-serious team for the ICFP contact me at or 617 821 1734 ('mercian). If you're in Boston there are a few wifi enabled cafes/bars/restaurants where we could collaborate.

3 hours until the problem is published.

Thursday, July 10, 2008

EuroPython Errata

Hettinger used tinyurl URLs in all his presentations to give short URLs to resources like CPython source code. Unfortunately I miss-typed a '3' into an 'E' and landed on a gay porn page. This wouldn't have been a problem but I was sitting in the front row and the room lights were out so my screen was BRIGHT. I couldn't just close the page because it had popups, I had to bookmark it first, etc.

The price of a con varies but costs about the same as a vacation. For EuroPython the plane ticket from Boston to Vilnius was $1400 ($600 for the airline, $800 in taxes!), conference hotel was 100 euros/night, walking-around money was $60/day. If you plan ahead (which I did not) you can save money on everything but the airfare. Some of the attendees stayed at a hostel (15 Euros/night) or rented an apartment (50 euros/night). Food and drink prices vary by city: PyCon Chicago was about $100/day, and the Iceland sprint was about $200/day. You can avoid that by buying food and drink at a supermarket which are reachable by public transport. Conventions are vacations for me so I voluntarily spend quite a bit around town.

Vilnius was unusually cheap. The public bus from the airport cost 1.10 litas (about $0.30 US). I thought the hotel was unusually cheap - the venison (deer) plate was 35 litas ($11 us) and 0.5 liters of beer 9 litas ($3 us). The hotel was expensive - prices in town were around 25 litas for a meal and 4.5 litas for a beer.

Conferences should have water and coffee available ALL THE TIME. The PyCon organizers tried to do this but the hotel staff sometimes cleared the service. At EuroPython coffee was available all day but water only rarely; the hotel had no water fountains, none at all (are water fountains an American thing?).

Vilnius is not a wealthy country. Our hotel seemed to be the center of the "jet set" for Lithuania. The casino in the hotel basement was full of locals spending flashy money and the stip club across the street the same (so I am told).

Bars close whenever they feel like, as do restaurants. We had to leave a diner/breakfast place at 7am because they were closing. The casino was open 24 hours a day but to get in you must give them all your information and they take your picture. I think I mostly thwarted them with my state drivers license and a bad picture. I didn't gamble - the rest of the hotel barstaff went on strike but the casino did not.

A Vilnius taxi ("taksi") costs twice as much if you hail one on the street instead of calling. This is the local law. So if you need a cab have the hotel call one for you.

I was worried about attendees English (mostly for my presentation). The ESL (English as a Second Language) English was as good at EuroPython as at PyCon. Also, the material being technical python stuff most of the written content is understandable even if you don't speak the language (I can read Brandl's PyPy talk just fine and I know zero German).

PyCon is about 3/4 American and 1/4 other. EuroPython was the reverse.

If you are standing in a group of people and two of them have speaker's badges then ALL of them will have speaker's badges. This isn't because of elitism; it is because the speakers tend to speak everywhere so they already know each other.

Wednesday, July 9, 2008

Class Decorators: Radically Simple

The slides for my presenation are now online: Class Decorators: Radically Simple. Hopefully the pdf export worked OK.

The talk went reasonably well but I went a bit too fast and finished in 20 minutes instead of 25. I did have a full room.

Update Christ on a crutch and other blasphemies - The talks weren't recorded but I turned on my video camera and left it next to me on the desk. The audio was pretty good and oh boy - I really talked much too fast. I need to master talking in front of 150 people at the same speed that I talk to five.

I also dislike what my voice sounds like on tape, but that is a normal thing. Also, most people can't expect to be as sonorous ss Alex Martelli (an Italian with a booming voice and a English diction that would put most teachers to shame).

Saturday, July 5, 2008

Off to EuroPython

My flight out of Boston leaves in a few hours. I'll be arriving in Vilnius on the 6th at 2pm (Lufthansa 3252). If you see me in the Airport I'll be the tall redhead with a Lithuanian phrasebook in one hand, looking all American-y.

(short hair and no mustache again, like PyCon2007 and not like PyCon2008)

later: "looking all American-y" didn't work out. The Lufthansa stewardesses spoke English to the English, French to the French, but German to me. Sure, I am more than half genetically German (and I look it) and .. I didn't exactly dissuade them by answering "coffee, ja" when the drinks cart rolled around, after she had said something unintelligible to me that must have been "something to drink?"