Tuesday, September 16, 2008

Post PyCon UK

Due to my harried transit I didn't get to prepare my lightning talk "PyAsshole: Simulating a partial information non trump card drinking game in Python." I did spend my flight home working on a simulator. It currently onl-y has one strategy (random legal plays) so I have to add a player that uses my preferred strategy [play to win or - when you can't - play not to lose]. I'll also have to implement a drink count in the simulation. The idea is that no matter what the player plays he has a chance of reverting to a random play at a chance based on his drink count.

Unfortunately adding in a drink count immediately injects a social (and thus very hard to model) component to the game. The mechanical rules say you drink if you are skipped or if you pass. But the social rules say you can be made to drink for any reason by someone higher than you in the chain. People being people those optional drinks are subject to retribution and those kinds of things are very hard to model. I expect tit-for-tat to work well in simulated play but that completely ignores the human propensity which is to engage in cooperative play.

Sunday, September 14, 2008

PyCon UK: Class Decorators, Radically Simple

I'm giving a new version of my EuroPython talk, Class Decorators: Radically Simple.


Two thirds of the slides are new. There is much more front end emphasis on what decorators are and simple function decorators examples. The examples of class decorators and metaclasses have also changed.

Post Con

I changed the slide that used the old 3rd party decorator module to use the standard lib functools equivalent.

Speakers thoughts: The details of this talk were substantially different than the EuroPython version. I had more slides but there was less talky-talk involved with each one so it ended up the same at about twenty minutes. I intend to rejigger it again and submit it to PyCon as a mix of the two talks. The more concrete slides at PyCon UK went over well but most of the metaclass banter fell off and all the esoteric stuff (which will probably stay dead). The topical slide about getting my passport was skipped during the presentation - I did it as a lightning talk instead.

I wasn't nervous for the talk itself, there were maybe 75 people in the audience. I was nervous for my 5 minute lightning talk immediately afterward "How to get a new US passport same-day while committing the minimum number of felonies." I don't know why - I've spoken in front of larger crowds before and the idea of lightning talks is that they aren't expected to be polished (I had no slides and just spoke extemporaneously). The lightning talk went well and might have tied for the highest number of laugh-lines with the other humorous talk "Why I love Zeppelins."

Next time I intend to cheat and take some Beta Blockers before any speech. For those who don't know: beta blockers repress the physical symptoms of the fight-or-flight reflex only and don't change your brain. So they will suppress a quiver in your voice or hands but don't help with "umms" or "aahs." The only way to suppress the um/ah reflex is to practice before hand - a mirror works fine; just have enough canned variations on the topic that you can pick and choose the most suitable one at runtime which is more fluid than you think.

I only had one question during the talk and one question afterward. I'll have to think of ways to introduce more uncertainly into the talk for my next version. The first version At EuroPython elicited two or three questions during the talk and two or three after. Based on that feedback I answered those in this version but I'd like to generate some new ones next time.

Wednesday, September 10, 2008

PyCon UK Flight Plans

What to do with on a 12 hour flight between Boston and Birmingham (1 stop in Amersterdam)?

  • I could work on my presentation. This would be OK but not ideal since I don't have internet conectivity to look stuff up.

  • I could work on my lightning talk: "PyAsshole: Simulating a partial information non trump card drinking game in Python." I'll do some of that but I only have five hours of batteries. [if you aren't familiar see here for one set of rules]

  • I could bring Neal Stephenson's Anathem but I could fit two or three other books in my bag instead of that door stop; I'll do that because if I can't get into his book I'm stuck with it.


I'll likely do a mix of PyAsshole and books with at least one of those being Heinlein's The Moon is a Harsh Mistress which is frequently cited but which I've never read.