Side effects matter

One of my cow-orkers used his new fancy GUI IDE that showed him that a variable wasn’t being used in my code, so he commented it out. Only one problem: the variable was one of a list of variables being retrieved from a SQL select statement, and like is common with these things, I was retrieving them with:


int a = rs.getInt(p++);
int b = rs.getInt(p++);
String c = rs.getString(p++);

Notice the problem there? If you comment out one of the getInts without removing the field from the select statement, you also lose the “p++”, so everything after it gets the wrong field stored. Which causes a pretty nasty little bug.

Thanks, guy. That’s a few hours of my life I’ll never get back.

It figures

I’ve got the mission (to Chicago tomorrow, back home on Sunday), I have my choice of planes, and I have almost perfect VFR weather for the entire 4 days over the whole region (probably the first time that’s happened this winter). But I’ve also got non-refundable plane tickets on United, so instead of 4 hours of fun flying, I’m going to have an hour or more of security, an hour of waiting for a connection in Dulles, and two hours of sitting in torture tubes, and then who knows how many hours getting from O’Hare to my destination (which is close to DuPage airport).

Oh well, at least I don’t have to worry about pre-heating the engine on Sunday at an “away” airport.

This is getting ridiculous

In the last 24 hours, MT-Blacklist has stopped 168 comment spam attempts, and let one through.

Keep in mind that I close comments on any blog entry over 100 days old, so this is probably fewer than 100 blog entries that were the lucky recipients of those 169 comment spam attempts. Neither MT-Blacklist nor I see the attempts to comment spam the older ones unless I look for POST commands in my web log.

One thing I’ve noticed recently is that comment spammers are GET-ing pages on my web site with the referrer string set to the site they’re trying to spam for. I guess they’re hoping that people are running webalizer (which I note is enabled by default in Fedora Core 3) or some similar log analyser that puts up a log of referrer strings somewhere where Google can find it. So a warning to everybody reading this: if you’ve got a web log analyser, make sure it’s not somewhere were Google or any other search engine can find it.

Is that so wrong?

The TiVo picked up a Masterpiece Theatre that I caught a bit of last night. It’s a mini-series(?) about one of the Channel Islands that got invaded by the Germans during World War II.

One of the scenes showed one of the shop keepers refusing to sell to the German soldiers (I think her husband had been killed during the invasion), and then the German commander going ballistic and forcing her to lie down on the ground while he held a gun to her head. And all I could think of was that line from that British comedy series (whose name escapes me right now) “This is a local shop for local people – there’s nothing for you here.”

Couldn’t stand it

After going all weekend without my new laptop, I called up MacShack for a progress report. According to them, the replacement part (the hinge/clutch) is back-ordered and Apple hasn’t gotten back to him on whether there is adjustment that they could do themselves. So before I could even suggest it he suggested that I come and claim the Powerbook until they can get the part in.

In other news, as predicted, Apple immediately came out with a new bump to the Powerbook. That’s the only reason I got a good price on it, after all. Nothing that I can’t live without – a 1.67GHz processor instead of 1.5GHz (a whole 11%) and a 100G drive instead of an 80G. I kind of like the idea of that fancy two finger track pad thing, and the acceleratometer that senses when you’re dropping the Powerbook and parks the drives sound cool. But I’d rather have a few bucks in my pocket instead.