Archive for October, 2004

Turning flyspell mode on in comments

October 29, 2004

Add:

(add-hook `c-mode-hook `flyspell-prog-mode)

to your ~/.xemacs/init.el file and your comments (and only your comments) will be spell checked.

Planet Humbug updates.

October 25, 2004

I’ve finally got around to doing a little work on Planet Humbug.

I’ve tidied up the HTML a fair bit, those long suffering safari users should be having a slightly better experience.

I’ve fixed the empty feed links, which was slightly perplexing. I’ve also installed mxTidy which cleans up people’s feeds before assimilating them into the planet HTML. This means that people who accidentally leave off ending tags won’t screw the rest of us. (We’ve all done it, but it was Martin’s last stuff up that pushed me to actually do something).

Planet Humbug almost validates as HTML. This is quite staggering considering how many places it comes from.

I still plan to add the option of individual subscriptions, but that’s a little way off yet. And of course, a style update is desperately required…

Cheers!

DB API/psycogpg Quibbles

October 11, 2004

I’ve been learning about talking to databases through Python, which means learning the DB API v2.0. At the moment I’m using the Psycopg adapter, mostly because the ODBC driver is completely broken.

One of the most helpful things an adapter can do is quote values being passed into queries. Unfortunately table name and column name quoting is different to value quoting, but every argument to a query is value quoted, which breaks things. I could do the table quoting myself and leave the value quoting to the adapter, but that would make each query a little too icky for my liking, so I’m doing all the quoting myself. There’s probably going to be a way to do this properly in the next version of psycopg.

A feature I’m a little surprised isn’t around is a simple way of getting an auto id column value from the cursor object, instead I have to do yet another query.

Oh Mysql, what a mess!

October 11, 2004

As happens when you’re doing database stuff, I had to choose between MySQL and PostgreSQL last week.

It was a fairly easy choice, I wanted both foreign key constraints and full text searching; both databases support both features, but MySQL only supports them on different backends, so you can’t use them together, useful!

MySQL also seems to have some dorky constraint behavior.

Given all the other problems that MySQL has, PostgreSQL seems the obvious choice.