Back in Action

During the 40 months or so of this blog’s life I’ve worked to keep it focused on my technical and professional interests, not personal stories. That means that you are conveniently spared having to read the story behind the lack of posts here since late May. Summary: Things were bad, but are much better now.

So I’m now back in action, and sporadic posts should be forthcoming without another four-month wait. For those waiting on the book, rest assured that it’s well under control, and closer than ever to being in your hands. Final details to come. But soon you’ll be able to buy it, carry it to the cafe, and put it out on your table next to your laptop as a sign of your great savvy.

Pocket Django

At the Western Mass. Developers Group meeting this week I showed a few people some of the unixy fun you can have with a (jailbroken) iPod touch and the Cydia package manager. Cydia is a port of Debian’s APT system to the iPhone platform – i.e. it’s a real package manager. It made it a snap to install Python, Mobile Terminal, Mobile Text Edit, Subversion, etc.

This is the toolset that has allowed me to even do some work on the book as I mentioned in my last post.

The iPhone keyboard doesn't suck

This began as a quick reply to a discussion on the Well about a recent posting from John Gruber which links to a hit list from Crackberry.com about the iPhone. Gruber focuses just on the keyboard issue, about which I found I had this to say:

With the built-in spelling correction, I can type close to 30wpm on my iPt keyboard. This is faster than I ever was with Graffiti, which I used for about 8 years and was pretty good at if I say so. Most of the stuff I do with the device doesn’t involve the keyboard, and then I’m really happy not to have a hard keyboard.

Python one-liner of the day

This is a function that takes an integer and returns its ordinal representation, e.g. “1st” for 1 and so on.

It’s not the most readable thing, but once I saw the pieces falling into place I couldn’t help myself. Repetition of the “th” literal is the only thing that bugs me. Oh well.

ord_text = lambda n: "%d%s" % (n, "th" if 10 < n % 100 < 14 else {1:"st", 2:"nd", 3:"rd"}.get(n % 10, "th"))

Comes with a one-line test suite!