Saturday, July 23, 2005

Weekend of the WOD

It's been a busy weekend so far. Today I cleaned up the logging code in the WOD and added a setuptools script for building eggs and so forth. I moved a huge amount of code around and consolidated a number of dangling modules at the wodfs.* level into the wodfs package.

I also threw together a wodfs.SimpleSystem class that can be easily used whenever you want to hack with the WOD programmatically (i.e. not through the filesystem). I also shifted the code from wodfs.server so you can call wodfs.start(port=9000) to get a self-documenting XMLRPC server backed by the WOD.

I then shuffled the website around and moved everything to wodfs.org. The old address now issues a permanent redirect to the new one.

Type-checking module for Python

I just published version 0.1.0 of typecheck, a type-checking module for Python. It is registered at the Python Package Index and everything.

I wrote the setup scripts in about fifteen minutes and tweaked them for an hour or so using setuptools which I am now convinced kicks some pretty major ass. It was really easy to package everything up and upload it to PyPI. setuptools can even do special tricks like allowing you to deploy a "development" version of your package that you can edit from your checkout directory but that still gets included in sys.path - really neat stuff.

Thursday, July 21, 2005

Pattern recognition

Jeff Atwood describes the practice of Just Try Again where coders sometimes re-execute code that fails to see if it "does it again".

I think that one of the benefits of running code multiple times without modification is that it allows us to see patterns. It's a bit like trying to pick out the lyrics in a song: listening to the song once is not enough. In fact, even several times may not be enough to allow you to isolate the different ways the singer has of pronouncing certain words. Depending on which words are grouped with which others the pronounciation may change. This is all very similar to the way that different components in a software system act together to increase the overall complexity of the task of isolating an error.

So when I re-run broken code without changes what I'm really doing is looking for patterns in different parts of the code on each run. Doing so allows me to break down the run into a set of behaviours which I can then analyse to figure out what is out of place.

Universalism and a machine existance

In his article WWW and UU and I Tim Berners-Lee says:

The whole spread of the Web happened not because of a decision and a mandate from any authority, but because a whole bunch of people across the 'Net picked it up and brought up Web clients and servers, it actually happened.


This really captures (for me) the way we should be living our lives: not as subjects to an external authority but by working together towards a "good" that can benefit us. Our own internal authority should allow us to interoperate and co-exist much better than machines. And yet it seems they have the upper hand.

Tuesday, July 19, 2005

Myofilms Launch

I just launched the Myofilms Blog with Olivier. He promises to write and keep in touch.

Thursday, July 14, 2005

Python gets CPAN

Phillip J. Eby has put together a set of extensions to distutils called setuptools. One of the included scripts, easy_install.py is a shot at duplicating CPAN/apt-get and other package management tools.

setuptools also works with Python Eggs, a package format that extends the distutils format.

Although I haven't tried to package anything as an Egg yet I have tried the setuptools package (which incidentally comes with a bootstrap script that downloads and installs the package automatically). Everything ran straight out of the box and I was able to install and upgrade several packages already installed on my system very easily. Great work! This is something Python has sorely needed for a while.