select c.cutoff, g.cutoff from customers c, groups g where c.group_id = g.id and c.id = 45;
However, what I want to do is:
select mymax(c.cutoff, g.cutoff) from customers c, groups g where c.group_id = g.id and c.id = 45;
The problem is, mymax() doesn't seem to exist. I can't use the regular SQL max(), because that's an aggregate function that works across multiple rows. I want to return the larger of two columns in a single row. Oh, and it should know that any given integer is greater than null, because the common case is for there to be no cutoff, and only very rarely will both a customer and a group have a cutoff. I came up with a hideously complicated way of doing it using coalesce(), but it was so nasty I resorted to doing the comparison in python instead. Am I missing something? Surely this should be easy in SQL. I'm using PostgreSQL 8.3, FWIW.
Of course, I'm a firm believer in not putting all of your eggs in one basket. So my machines are hosted in two separate datacentres, and although the main server is powered off (and I've decomissioned the other one that was in the same datacentre), I still have fully working DNS, SMTP and the critical web sites are all up. In the event that the main server has problems, I can move the non-critical web sites over, too. I have multiple copies of all the data. But still, it's an anxious time. I'll find out if all's OK in about 6 hours. Like I say, fingers crossed...
 What's that about? It's not as if it's a prehistoric phone. Sometimes I despair at the increasingly disposable nature of the consumer electronics market.
Sometimes you can really appreciate living in a world that isn't 100% driven by a company's bottom line. Can you imagine the uproar if Gates, Ballmer or Jobs had come out with a comment like that? Yaaay Linus.
The problem is that my main server was starting to spend a significant proportion of its time in disk wait state, while the bogofilter processes tried to access the word database. The load average hit 100 last night, which was an indication that things had gone badly wrong and I needed to do something about it. I don't know how Berkeley DB is implemented internally, but my guess would be that it's vague hash table shaped, and so the size of the database shouldn't significantly affect lookup times. But I don't know that for sure, and my database had grown to a non-trivial 1.5GB in size. Furthermore, bogoutil was failing to read the database file, possibly indicating that it was corrupt, which might have been causing each bogofilter pass to take much longer than necessary, and hence increase contention for the database file on disk.
So at this point, I decided to scrap the word database and start again. I have a corpus of both ham and spam that I used for the initial training, which I knew wouldn't be perfect, but it was a good start, and I could further train it up over time. Then I left it and went to bed. This morning, I realised just how much work bogofilter had been doing on my behalf. You see, in the 12 hours since I switched over to the new word database, I received 18,000 spam messages that bogofilter was now no longer filtering out for me. I knew the spam problem was bad, but that's at least an order of magnitude worse than I expected.
The next step is to train up bogofilter again so that it filters the majority of those out for me, and given the volume of mail that I'm getting, I think I'm going to need to use bogofilter to feed a Jef Poskanzer style dynamically updated block list that I can pass to blackmilter. 18,000 messages (plus however many bogofilter blocked) in 12 hours? That's insane.
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
Grrr. If you're going to stick that at the top of your feed, please mean it. 0xA0 is Latin1, not UTF-8. Lying to me like that just makes my life miserable
Tiscali must die. And I'm not talking about a quick death, either. No, this needs to be long and painful, and I need to be there to gloat while they suffer.
A greater hive of ineptitude and incompetence you will not find anywhere in the galaxy. I've logged the fault, but if their track record is anything to go by, it'll disappear in to the ether, never to be seen again, and the problem (in this case, they're bouncing my email) will be resolved at some undetermined point far in the future
The machine powered up, fans were whirring away, but all I got was a blank screen, not even getting as far as showing the BIOS POST information. No diagnostic beeps. Nothing. A bit of digging and judicious unplugging of everything in turn revealed it to be a bad memory stick. Of course, as is the way of PC hardware, not only does it fail frequently, but when it does, it's considered obsolete, so you can't easily replace it anyway. My local PC components shop no longer sells DDR400 RAM, so I'll have to get some mail order, which will no doubt take forever. In the mean time, I'm limping along with 512MB RAM. Sigh...
In the studio
Not a great year, but not a bad one either, and a few surprises. I wasn't expecting Mötley Crüe to come out with such a strong album ever again. Nor was I expecting the GNR album to be any good. Indeed, I wasn't even planning on getting it at all, but it was cheap in the Woolworth's closing down sale. While it's not as good as they were 20 years ago, it's not bad. Of course, there's every reason to call the band Axl And The Hired Guns rather than GNR, but that's an argument for another day. Judas Priest had made a great return to form with their reunion album, so it was a bit of a disappointment to see them follow it up with "Nostradamus". There's nothing wrong with the album, but there's not much memorable about it either. In truth, only perhaps the top four albums in the list are really worthy of their place, and while I like the others, they're nothing special.
There are a few albums from 2008 that I haven't heard yet, but had I done so, I might reasonably expect them to make a showing in my list of favourite albums of the year:
For me, 2008 saw 151 bands playing at 34 shows. The highlights were:
Another strong year in terms of live performances. I hadn't been impressed with Rage's "Speak of the dead" album, so despite some good performances in the past, my expectations weren't high. Fortunately, they were touring in support of a vastly better new album, "Carved in stone", and on the strength of their excellent performance at The Underworld, I picked up that album at the show. A great choice of setlist, and they even brought out Jen Majura for a few songs, including "Dies Irae", a song I never thought I'd hear them play live.
Sabaton blew me away the first time I saw them, and since then I've been to all of their London shows. Once again, they were outstanding. Pain were something of a surprise. I'd been vaguely aware of their earlier material, but it hadn't really made an impression. But what a live band! They completely blew headliners Nightwish off the stage. Other notables this year were the large number of good performances at Bloodstock, particularly from bands I'd never heard of before (Metalloid, Hellfighter and Mantra stand out there).
Also of note was Liquid Sky's change of vocalist. I thought they'd struggle to replace Hecate, who put in a great performance at Barfly early in the year. Her replacement, Tiffeny, looked competent at Bloodstock, but a bit shaky. Then again, it was her first ever show with the band, and when I saw them again at The Peel later in the year, they were much improved. It was the last date of their tour, and it showed. Having had a bit of practice, she was much more at ease, and far more confident on stage, which made for a great show.
On the screen
This is where I struggle a bit. I didn't see many films this year. Indeed, off the top of my head, I can only recall two. The first was "The dark knight", which was hugely overrated. A decent performance from Ledger, but a poor film overall, and very disappointing after the promise shown by "Batman begins". The second was "Burn after reading". Holy crap. I want those two hours of my life back. How can such an all star cast end up producing such a terrible film?
Since we don't have TV reception, I can't comment on anything there. However, we've been watching a bunch of stuff on DVD. "Heroes" was excellent, and I can't wait to see the second season. I bought the complete set of "The X-Files", which is nearly a week of continuous 24x7 viewing. We've done the first series so far. Also seeing time on the DVD player have been "Magnum", "Dexter", "Doctor Who" and "Torchwood", all of which were good.
int = "fxp0"
ext = "rl0"
nat on rl0 from 192.168.8.4 to any -> 10.0.8.230
block in log
pass in log quick on $int
pass out log on $ext keep state
But packets are still leaving rl0 with a source IP of 192.168.8.4. Does anyone have any ideas about where I might be going wrong? Jorg?
"Card readers? We don't need no stinking card readers." -- Peter da Silva (at the National Academy of Sciencies, 1965, in a particularly vivid fantasy)