New year, new list

It’s the beginning of a new year. Time to reflect on the previous year and look ahead to the new year. The highlights of 2005 for me had to be spending 2 months in Madrid improving my Spanish and visting Google’s headquarters in Mountain View (I saw Larry Page in the canteen too); the remaining 10 months or so were rather shit.

As is traditional at this time of year, I thought I would declare some of my New Years resolutions; they are more goals for 2006 really. I’ll strike them off the list as I achieve them. In no particular order:

  • Learn to play the guitar.
  • Achieve fluency in Spanish.
  • Get involved in an open source project.
  • Get something published in an established publication, either in print or online.
  • Sleep with Jennifer Lopez.
  • Stop being delusional (see item above)

Logging SQL queries

A note to myself about how to log SQL queries when using PostgreSQL. In postgresql.conf set the following parameters:

log_statement = true
syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

The database will need to be restarted in order for the changes to have any effect. To view the SQL queries that are being executed, log in as root and issue the following command:

[root@localhost ] tail -f /var/log/messages

Once you have finished the analysis don’t forget to turn off the SQL logging.

The reason I needed to do this was that Postfix was rejecting email for a virtual domain set up on my server. The mapping tables were in the database so I needed to see what SQL query Postfix was sending to PostgreSQL to try and figure out why the lookup was failing. As it happens I figured out the problem, but that’s a post for another day.

Microsoft works with Mozilla

Microsoft’s RSS team has just announced that they have adopted the icon Firefox uses to represent the presence of an RSS feed. It will be incorporated into IE7. According to the announcement Microsoft “worked with the Mozilla team to encourage consistency between browsers”. Yet more kudos to Microsoft. Perhaps the sleeping giant really has woken up.

Open source software: Reuse or redo

Last week was a frustrating one. I downloaded and installed a module that was supposed to provide some sort of integration with a Jabber server. It basically provides a user interface and a bunch of functions that I can call from within the toolkit I am using. It was a pain to install due to the lack of documentation and the documentation that did exist was badly written. After spending way too long getting everything up and running things didn’t work as they should have. But I have the source code. No problem right? Wrong! Going through the source code didn’t particularly help either. Why not? Not a comment in sight. Just a large amount of undocumented C code.

After spending a bit of time thinking about it I figure I have two choices: try to figure out what is going on or rewrite it. There is a fairly large amount of code so rewriting it could take me a long time. On the other hand because of the lack of documentation it could also take a long time to (fully) understand how everything works, which would be necessary before I could start fixing things.

I guess this could apply to any open source project. If the code is badly written but there’s lots of it and there’s no documentation, what should one do? Reuse or redo? I would be interested to hear from anybody who has had similar experience with open source software and what you did about it. As always, feel free to leave any comments.

Windows Live update

Windows Live now supports Firefox. I have been playing around with it in Firefox and it’s pretty slick, particularly the drag and drop stuff. So far I’m quite impressed. Thumbs up to Microsoft for playing ball this time around. Still doesn’t work in Safari though. Maybe that’s asking a bit too much 🙂