Archive for April, 2008

Phasing in PostgreSQL

Since I like to avoid the Sun, I’ve started migrating my stuff away from MySQL and into Postgres this weekend. So far, I have a functional PostgreSQL ActiveTable driver and most of my ActiveTable demo app working with it.

Postgres isn’t bad. It’s a little confusing initially, when you can’t figure out how connecting works (it can auth based on whoami if you just want to connect via a UNIX domain socket, and it supports hashed passwords for connecting over TCP/IP, etc), but once you’re in, it’s easy. I really like phpPgAdmin - I wish phpMyAdmin was this nice.

The major differences I’ve seen between Pg and MySQL are

  • No auto_increment. Instead, there’s a SERIAL type you can use that creates a sequence for you automagically.
  • Timestamp doesn’t accept 0000-00-00 00:00:00 as a valid value.
  • Postgres doesn’t let you specify an empty string in an integer column.
  • Instead of enum, we have a CHECK() that takes in any expression. Enums are CHECK(column IN (’A',’B')).

It has some pretty ridiculous features, like arrays and polygon datatypes, too.

The only problem I’ve had thusfar is that my sequences got all fucked up when I imported my data. I specified the value for my PK columns, but the sequences stayed at 1. Easy enough to fix, though. I wrote a little script to clean things up in no time.

As Anticipated: Sun Ruins MySQL

As I’ve been anticipating since Sun announced its acquisition of MySQL AB, Sun is ruining MySQL.

I was expecting them to start adding horribly slow Java bullshit first, but it looks like they’ll be using a different caliber round to shoot themselves in the foot: MySQL features only available in Enterprise Edition with no code available to review/optimize/submit patches for/have tested by thousands of people.

Thanks, you douchebags. Way to not get it.

I guess I’ll be switching to Postgres now. Oh, hello there, 2006…

Finally, Web2.0 produces something useful!

I’m not a fan of all of the stupid web 2.0 trends. Ugly designs with rounded-corners and gradients everywhere, useful links to site news being hidden away in the footer, YouTube videos and obnoxious screencasts coming at you from every which-way, and stupid business models…I hate them all. It’s like the original .com bubble, just a thousand times more annoying and in-you-face.

I mean, FogBugz is great and all, but there’s no way in hell I’d ever pay $25 a month for a single user on a bugtracker. Sorry, Joel, your blog is great, your application is even greater, but it’s not worth that kind of recurring cost. $25/m for five users, sure, OK. But for one? Are you kidding me?

But.

I’ve finally seen something useful come out of this web2.0 craze. Something with a simple, quiet (for web2.0 standards) UI, a good pricing model, and an absolutely to-die-for service. Enter: GitHub.

Github is Git repository hosting plus a web frontend. It’s just gone into its public testing phase, so it’s nowhere near perfect yet - for example gitweb is still a much better way to view revision history, since it supports all kinds of crazy diffing, but I expect to see that in GitHub sooner or later.

Fast, free Git repository hosting you can manage through a web UI. No backups to worry about, no making accounts and copying keys around - if you want to give someone write access to your repository, you just add them as a contributor.

If you want to work on some code for someone else’s project, there’s a ‘Fork’ button you can press. It clones the repository to your account. When you finish, you can send the original owner (or anyone else, for that matter) a ping and let them know you have some code they might want to pull in. It’s nice.

There are RSS feeds everywhere (this is web2.0, after all). If you look to the right, you’ll notice I’m pulling in some messages from my GitHub RSS feed right onto the owlmanatt.com sidebar. The messages kind of suck. I wanted the commit notes, but that isn’t really practical (they can be long), so I just threw the feed into Yahoo Pipes (ugh, I’m hitting the web2.0 bong pretty hard today) and munged the titles/filters around a bit until I was happy.

In other news, I’ve changed the OwlManAtt.com theme. It’s been a few years, so…why not?