A friend of mine is working on a Senate campaign here. This
weekend I spent a little time helping him out. I imported some voter
registration data from the county into postgres and ran a few
queries. I haven’t done any database hacking before, so this was
pretty fun. Of course I ran into all the usual snags: the data was
incorrectly formatted, the version of postgres I have can’t directly
import CSV data anyway, etc.
On the flip side, all the needed tools were already just sitting
around — I installed tcllib and postgresql-tcl via up2date, and then
wrote a short import/export script. (I chose these since I already
know Tcl well enough to just type it in, but really it could have been
anything.) Tcl is slow, but for a single import, it hardly matters,
and postgres 7.5 will solve this directly anyway.
I think the fact that this was just a weekend hack is pretty
interesting. I’ve been thinking about expanding this code a bit, to
help my friend some more, say by writing a web app that talks to the
database so that we can get the information distributed more
efficiently. All the parts needed to do that are just an up2date away
— and this kind of bundling is a property of free software, and more
or less prohibited by the proprietary business model. That’s pretty
nice for us end users.
Be the first to leave a comment. Don’t be shy.