OSCON 2008

I’m in Portland, Oregon this week for OSCON 2008. Asheesh and I are speaking tomorrow on ccREL and `liblicense <http://wiki.creativecommons.org/liblicense>`_.

Things I’m hoping to see this week:

  • lots of attention paid to identi.ca, not just as an alternative to Twitter but as a first step towards truly open services,
  • lots of discussion about how free software can enable user autonomy,
  • corporate suit-types excoriated for not giving back (or for expecting us to build our “open” systems on theirs (I’m looking at you, [STRIKEOUT:Sourceforge 2.0] Atlassian).

So I’m probably just dreaming when it comes to the last one (maybe all of them, particularly with my qualifier of lots), but for the first time in a few years, there are actually talks I want to go to scheduled against one another. Maybe I’ll have to revise Yergler’s Theorem of Conference Value. But probably not.

date:2008-07-23 09:28:43
tags:oscon, oscon2008, portland

First World Problems

I did a closet purge today and wound up with four garbage bags of clothes to donate. Four bags of clothes I haven’t worn since moving to San Francisco a year ago. My problems are obviously first world, problems of luxury.

Yet another reminder of how fortunate I am.

date:2008-07-20 21:42:23
category:my life
tags:first world, problems

Unicode output from Zope 3

The Creative Commons licene engine has gone through several iterations, the most recent being a Zope 3 / Grok application. This has actually been a great implementation for us[1]_, but since the day it was deployed there’s been a warning in `README.txt <http://code.creativecommons.org/svnroot/cc.engine/trunk/README.txt>`_:

If you get a UnicodeDecodeError from the cc.engine (you’ll see this if it’srunning in the foreground) when you try to access the http://host:9080/license/then it’s likely that the install of python you are using is set to use ASCIIas it’s default output.  You can change this to UTF-8 by creating the file/usr/lib/python<version>/sitecustomize.py and adding these lines:

  import sys

This always struck me as a bit inelegant — having to muck with something outside my application directory. After all, this belief that the application should be self-contained is the reason I use zc.buildout and share Jim’s belief in the evil of the system Python. Like a lot of inelegant things, though, it never rose quite to the level of annoyance needed to motivate me to do it right.

Today I was working on moving the license engine to a different server[2]_ and ran into this problem again. I decided to dig in and see if I could track it down. In fact I did track down the initial problem — I was making a comparison between an encoded Unicode string and without specifying an explicit codec to use for the decode. Unfortunately once I fixed that I found it was turtles all the way down.

Turns out the default Zope 3 page template machinery uses `StringIO <http://www.python.org/doc/lib/module-StringIO.html>`_ to collect the output. StringIO uses, uh, strings — strings with the default system encoding. Reading the module documentation, it would appear that mixing String and Unicode input in your StringIO will cause this sort of issue.

Andres suggested marking my templates as UTF-8 XML using something like:

< ?xml version="1.0" encoding="UTF-8" ?>

but even after doing this and fixing the resulting entity errors, there’s still obviously some 8 bit Strings leaking into the output. In conversations on IRC the question was then asked: “is there a reason you don’t want a reasonable system wide encoding if your locale can support it?”

I guess not[3]_.

UPDATE Martijn has a tangentially related post which sheds some light on why Python does/should ship with ascii as the default codec. At least people smarter than me have problems with this sort of thing, too.

[1]Yes, I may be a bit biased — I wrote the Zope3/Grok implementation. Of course, I wrote the previous implementation, too, and I can say without a doubt it was… “sub-optimal”.
[2]We’re doing a lot of shuffling lately to complete a 32 to 64 bit conversion; see the CC Labs blog post for the harrowing details.
[3]So the warning remains.
date:2008-07-19 12:57:33
category:cc, development
tags:cc, development, license engine, python, zope

Ubuntu Netbook Remix on the Eee PC

Last year when Asus released the original Eee PC 7xx series, a colleage and I made a lunch-time trek to Central Computers down the street and each picked up a 701 with 4 GB SSD and Linux. The stock distribution is Xandros based. That’s great since Xandros is Debian based itself, but not so great since it seemed configured specifically to resemble Windows in many ways. Progress, right?

Shortly after purchasing my Eee I installed eeeXubuntu on it. This configuration actually worked pretty well. Combined with an additional 4 GB of storage in the form of an SD card I carried the Eee with me as my sole computer for a week in Europe in January. Upon my return, however, the Eee saw less and less usage. In retrospect I’m not sure that the decline had anything to do with the Eee at all — all my non-work computing declined dramatically during the first half of the year. The small form factor of the Eee still called out for use, so I dabbled with it periodically. One weekend I tried installing a Sugar shell (successfully, for some definition of success, I guess). Another I tried updating my eeeXubuntu installation from 7.10 to 8.04, without success (disk space issues). When I saw Ubuntu Netbook Remix, I decided I wanted to try that on the Eee. The combination of a focused, single window user interface and specialized launcher seemed like a good combination for the space constrained display.

Today I successfully installed Ubuntu 8.04 and the Netbook Remix on my Eee.

The steps were actually pretty straight forward:

  1. I installed Ubuntu 8.04 using a USB stick. When it came time to select tasks, I didn’t select anything to get a minimal installation.
  2. Added the Array.org repository and installed a kernel with Eee-specific customizations.
  3. Added the Netbook Remix repositories and fired up aptitude. At this point I just picked my way through the packages in the ubuntu-desktop task, picking those I wanted. In particular I omitted things related to Bluetooth or CD support (since I have hardware for neither).
  4. Installed the ume-launcher and other Netbook packages.

If these instructions seem a little thin it’s because I mostly just followed the instructions of others, both found in the excellent Eee User wiki.

I’m heading to OSCON next week so I’m going to play with the installation this week to determine whether I can use it as my sole machine for that trip.

date:2008-07-13 20:39:53
tags:eee pc, netbook remix, ubuntu

Readonly Attachments for Thunderbird 2

Last seen here two years ago, I’ve just updated Readonly Attachments for Thunderbird 2. It still does pretty much exactly what the last post describes, bugs and all.

Right now I’m just releasing a preview. At this point I’ve only tested it with Thunderbird on Mac OS X 10.5.3; I’ll test with Linux tomorrow[1]_ and if all goes well I’ll update addons.mozilla.org at that point.

UPDATE: (2008-07-13) Things seem to work fine on Linux, so we’re just waiting for it to clear the review queue at AMO.

[1]Unfortunately I won’t be testing on Windows. My work laptop dual boots but frankly it’s so painful to load Windows these days that I can’t bring myself to do it. I’m trying to do more with my spare time these days that I enjoy and testing for Windows just doesn’t pass that test. Sorry.
date:2008-07-10 19:10:48
tags:projects, readonly attachments, thunderbird