« | » Main « | »

I had an amazing three days at Pycon 2009 in Chicago. I won't have a coherent write-up (at least not just yet), so these scattered notes will have to do:

The weather was a great example of why not to hold conferences in Chicago: cold, wet, even snowy. Maybe next year we can hold Pycon someplace warm, like Siberia (it will actually be in Atlanta). On the other hand, it was great to be able to get on the Ell and be in the middle of a vibrant city.

Twitter was much bigger here this year than in the past, certainly for me. It helped create a sense of a single hive mind, letting me keep up with the talks I wasn't watching, and find out what was going on elsewhere.

I focused a lot of my time on testing topics, both because it's the thing I need to learn more about for work, and because of my interest in providing tools to other developers. There was a huge amount of energy devoted to testing at this Pycon. The testing BoF on Saturday night was a combination frat party and lightning talk session that went on until 11pm.

I gave two talks, on coverage testing and C extensions, which I think went well, and seemed to be well received, so that was very gratifying.

I took note of good one-liners, newsworthy tidbits, and interesting projects to follow-up on:

  • Barry Hawkins on the Python community: we're like the Elves at Rivendell, and hobbits show up and are impressed, and ask, "Why don't you tell more people about this?", and Elves/Pythonistas respond, "Meh, we just do what we do."
  • Brett Cannon is making the choice of what DVCS to use for Python core development. He compared svn to prune-juice: the old standby, but not interesting any more. Git is out of the running, they will choose between Mercurial and Bazaar, maybe as early as this week.
  • Jonathan Ellis lightninged on distributed databases, emphasizing Cassandra, which he claims does a good job on scalable writes, unlike many other solutions.
  • Jonathan Hayward: Asimov said, "The most exciting phrase to hear in science is not "Eureka!" but, "that's funny.."
  • Windmill deserves another look for in-browser web app testing. It looks really capable.
  • Mike Fletcher talked about his profiling visualizer called Run Snake Run, which I saw a little of in the speaker prep room. It looked very impressive, but I didn't see his talk.
  • Kevin Boers demonstrated his approach to testing with twill. He had a really good approach, building up abstractions to get to a point where each web page is represented in the tests by a class that can operate the page, and then building scenarios up from there. Unfortunately, twill won't help with Javascript applications, so it's good for basic HTTP testing, but doesn't get to rich applications.
  • In his GUI testing talk, Michael Foord offered this quote: "If you write applications without tests then you are a bad person, incapable of love." —Wilson Bilkovich.
  • Catherine Devlin did a lightning talk showing off a very cool SQL tool that lets you work with tabular SQL data as if it were Unix file data: sqlpython.
  • playerpiano is a tool for better python presentations. It runs doctests in an interactive python session so that you don't have to try to type code on stage.
  • pymite is a micro-python (subset) for micro-controllers: it runs in 4Kb of RAM!
  • web2py is another web framework that looks very slick, and was used to build the Pycon site.
  • DVDev is like Trac for Mercurial.
  • Melkjug is a tunable news reader.
  • txLoadBalancer is a Twisted-based load balancer.
  • Steve Huffman and Alexis Ohanian from Reddit gave an entertaining keynote discussing the history of Reddit and some of the interesting things they do now. Reddit has been open-sourced, leading to some, shall we say, interesting clones.
  • Reddit is working on an open-source CSS compiler called C55 to provide variables, nesting, and functions in CSS, just like what every procedural programmer who writes CSS wants.
  • Reddit has an interesting thumbnailer that looks for the most interesting square of pixels in an image, sometimes with humorous results.

I met a lot of great people, some of whom I knew by name, some of whom were new to me. Both knew and new were great to meet face to face: Aaron Maxwell, Menno Smits, Ken Whitesell, Mike Pirnat, Mark Ramm, and Rand Batchelder (!).

There was of course a lot of playfulness at Pycon, Beards of Python being my favorite (I was never a pony fan).

I'm already looking ahead to Pycon 2010 in Atlanta!

Ingrid Michaelson has perfectly captured the Twitter vibe with her Twitter song. She also has a lot of other really good music, so give her a listen if you don't know her yet.

tagged: music, online   /   via: dpitkin» 1 reaction

I've finished up the slides and written prose for one of my Pycon talks: A Whirlwind Excursion through Python C Extensions.

Whirlwind C Extensions slides

It's a 45 minute talk about how to write C extensions against the Python C API. Hope you like it...

tagged: python» 6 reactions

In English, if something is incomprehensible, we'll say, "It's Greek to me". What do Greek speakers say? It turns out they point to Chinese or Arabic.

tagged: language   /   via: Kottke» 14 reactions

On Jay Leno the other night, President Obama made a joke about his poor bowling scores, saying, "I bowled a 129 — it was like Special Olympics." Much has been written about it. I know Obama didn't intend to slight disabled athletes, he was slighting himself. But it highlights a popular misconception about Special Olympics.

I'm not talking about the idea that S.O. athletes can bowl much better than 129, though I'm sure some of them do. There may well be an invitation for a Down syndrome bowler to come to the White House and give the President some pointers, and it will be a good photo op, and it will further the cause of Special Olympics and the disabled in general, etc, etc.

Special Olympics has some very strong competitors, but the vast majority of them do not play at competition levels with typical athletes. When my son Nat played basketball in the Massachusetts State Winter Games a few weeks ago, we were thrilled that he scored any baskets at all. Any of the players in Obama's pick-up game could run circles (literally) around Nat on the court.

Special Olympics is the perfect blend of intense competition and universal support. In one basketball game I watched, players from one team were helping to coach an opponent to help her get a basket. This was on court, during the game. She was given a dozen chances at the shot. It was a great moment. And still at the end of the game, the winning team celebrated and pumped their fists in the air.

In another game, Nat's team was playing against a team that included a 50-year-old player who, no matter how hard he tried, could not score a basket. This guy was the last person you'd expect to find on a basketball court: he was only a few inches over five feet, and had trouble walking, much less dribbling the ball down the court. But you could see how involved he was in the game, how much he wanted to make the shot. You could see everyone on his team maneuvering to set him up for the basket, but he missed again and again. My son Max, watching from the sidelines said, almost under his breath, "I so want that guy to get a basket." That's typical at a Special Olympics event. Everyone is cheering, not only for the greatest on the court, but also for the least.

Sport is supposed to be about the celebration of human achievement, but too often it's a winner-take-all spotlight on one best, with the rest feeling bad because they couldn't be the one up on the stand. The way to celebrate achievement is to understand how far an athlete has come. We're all individuals, with our own abilities. The loudest cheering you'll hear at Special Olympics is for those finishing last. For some of these athletes, just being on the playing field is an achievement.

This is the misconception that Obama's joke underscored: that Special Olympics is aiming for the typical exclusionary model, competition as a way to pick out one and leave the others behind. If it were, then the joke would be funny. Obama's 129 would be funny.

In Something About Mary, Matt Dillon's character Healy also doesn't understand. Playing aggressively against disabled athletes, he says derisively, "you call yourselves special!" In the movie, the joke works because everyone knows that Healy is a clueless clod, that the point of Special Olympics isn't to pound your opponent into the ground. When I heard Obama's joke, he seemed just as clueless.

Obama was right: his score was numerically like some at Special Olympics, but with an important difference: no one at Special Olympics would have been laughing, they would have been cheering. I'll take that any day.

Today is Pi Day, and the end of nerdigras. Max and his girlfriend are baking an actual pie, nice!

I don't have a factoid about pi, but here's a math gem that pleases me, about prime numbers. Primes and composite (non-prime) numbers are mixed together throughout the natural numbers, in seeming chaos. Prime numbers can never appear in runs, since even numbers are never prime, but composites clump together. Here's the question: how many composites can appear consecutively?

It turns out that you can find arbitrarily long runs of composite numbers, there is no limit to how many will appear together. To prove this, here's a method to find a run of a desired length n. Consider the factorial of n+1, let's call it Q. Q is 1 × 2 × 3 × ... × (n+1), so Q is divisible by every number from 2 to n+1. Since Q is divisible by 2, Q+2 is divisible by 2. Similarly, Q+3 is divisible by 3, Q+4 is divisible by 4, and so on, all the way up to Q+n+1, which is divisible by n+1. So the run of numbers from Q+2 to Q+n+1 are all composite, and there are n of them in a row, a run of n composites, for whatever n you choose.

tagged: math» 3 reactions

I've been using Subversion 1.5 for a while now, and didn't know this existed: changelists. You can tag modified files so that you work on a handful of disjoint changes at once. When looking at your working directory status, the files are organized by changelist, and when committing, you can specify the changelist to commit.

This is the feature I missed most from Perforce, so I'm glad to see it in Subversion. I'm using distributed source control a little around the edges, but Subversion will be central at work, so it's good to have all the power I can.

Bre Pettis and Kio Stark together wrote The Cult of Done Manifesto, a pithy baker's dozen of mantras to help get stuff done (excerpts):

2. Accept that everything is a draft. It helps to get it done.

8. Laugh at perfection. It's boring and keeps you from being done.

13. Done is the engine of more.

And James Provost made a wonderfully schematic mnemonic poster illustrating the points:

Done Manifesto poster

The manifesto itself is almost self-referential in that its authors were following its precepts in creating it. It is an imperfect draft, and maybe they didn't know what they were doing, but they have a completed Manifesto of Done, and others do not.

If you examine any of the points too closely, you'll can disagree with them, but accepted and followed breezily, they have the feeling of moving you toward your goals, and sometimes that's just what you need to get you there. I know I could use more of their spirit guiding me.

Tomorrow is Max's 17th birthday, and he and his friends saw Watchmen on Friday. We made a Watchmen cake for them, simple but iconic:

Watchmen cake

Julien Breton is a very skilled calligrapher, in the bold, large stroke style. His work is masterful, but his calligraphy with light is what really stands out.

I've tried making some pikapika before, and it is difficult to know how the image will appear. You write in the air with a light in a dark room, and maybe it looks the way you want, maybe not. Here are my two best images:

Light smiley

My name in lights

Breton's images are far more assured. To be able to make such perfact lines in such an ethereal medium is truly astounding.

I'm undertaking a significant overhaul of coverage.py, my Python code coverage measurement tool. The first release of it is ready: coverage.py v3.0b1. Changes include:

  • Coverage.py is now a package rather than a module. The name is now a bit of a misnomer, since there is no longer a file named coverage.py. Functionality has been split into classes.
  • The trace function is implemented in C for speed.
  • Executable lines are identified by reading the line number tables in the compiled code, removing a great deal of complicated analysis code.
  • The singleton coverage object is only created if the module-level functions are used. This maintains the old interface while allowing better programmatic use of coverage.py.
  • The minimum supported Python version is 2.3. Python 3.0 is not supported.
  • Precisely which lines are considered executable has changed in some cases. Therefore, your coverage stats may also change slightly compared to earlier versions of coverage.py.

As you can see, very little has changed functionally since v2.85. So far this is a refactoring, reimplementation, and repackaging effort. The new code will be a much better foundation for more interesting changes in the future. This beta 1 release is so I can find out if I've screwed up anything so far or not.

You can download the kit in one of two ways:

If you find a problem, you can file a bug on bitbucket.org, or send me an email. Discussion is welcome on the Testing In Python mailing list.

John Hodgman isn't just funny and intelligent, he's also fighting the good fight for sincerity and engagement by opposing "meh":

It's part of the toxic Internet art of constant callous one upsmanship. And it is a sort of art, but not for me.

For another Hodgman demonstration of how to be cool, funny, emotional, and involved all at the same time, watch his wonderful brief digression on matters of lost time.

Chris Wilson notices a mathematical-calendrical quirk: if March 5th is 35, then 35×35 = 1225 means that March 5th squared is December 25th, so March 5th is the square root of Christmas! Pair this with Pi Day (3/14), and you get a nerd celebration:

I hereby declare that:

  • March 5th shall be known as the Square Root of Christmas and
  • The 10-day interval between the Square Root of Christmas and Pi Day shall be known as Nerdigras

Let the festivities begin!

tagged: geeky, math» 21 reactions

I'm in the middle of a major overhaul of coverage.py, and one of the changes I'm making is to move the code into a public repository with bug tracking. But I have to choose which one.

Google Code is kind of the default choice at this point. It has everything I need, and people understand it. But frankly, I don't want Google to own everything. I'd like to give the business to another player.

Launchpad is a good alternative. It's got tons of features, and is based on Bazaar, which is something I've wanted to learn more about. Distributed version control is here to stay, and has real advantages over Subversion. But Launchpad seems a bit heavyweight: it's got features that make it a good home for large projects like Ubuntu and MySQL, but I don't need all those features, and there doesn't seem to be a simplified experience that I could use.

Both Google Code and Launchpad require you to sign in to create a bug report, which is less of a problem for Google, since the chances are much greater that a random user will already have a Google account than a Launchpad account.

Github is very nice, but so far to my eyes, git is not, so I'm not seriously considering it.

I'm sure there are other choices out there, I just don't know what they are.

« | » Main « | »