It never fails

It never fails that when on “FAA Data Reload Day” (which occurs every 56 days on the ICAO cycle), I manage to screw something up and end up staying up late. It doesn’t matter how early I start.

Today’s screw up was after loading the data, I realized that I’d done something wrong, and needed to restore the database to the state it was before I started the load. For reasons too complicated to go into here, I load the data on my home Linux box, and then scp it up to my colo box where the web site lives. The database that lives on my home box doesn’t have all the same tables as the one on my colo box, just the tables that are important to data loading.

So, I thought, the easiest way to get back to the data as it was before the data load is to upload the script I use to export the appropriate tables on the home box to the colo box, run it there, copy the file back to the home box and load it. Except after I loaded it, I noticed a distinct lack of data on my home box. As a matter of fact, it appears that the load went way too fast, like it had no data at all. A quick look at the export file confirmed that there wasn’t any data in it, just some table deletion and creation stuff. Oh oh.

That’s when I realized that one of the consequences of having different versions of PostgreSQL on the two boxes was that “pg_dump … -t waypoint -t comm_freqs -t runway…” works on my home box, but not on the colo. Not thinking too straight, I then used a ‘for table in …” command to run pg_dump on each table individually. When I copied them home, I discovered that this messed up the foreign keys rather badly. So I tried to manually stitch all the files together. That wasn’t working very well, because I had things in the wrong order and the foreign key stuff still wasn’t right.

That’s when it suddenly hit me. Duh. The whole reason I have an external drive on my machine is so that I can do hourly rsync backups. I have a copy of the postgis.dump file that I copied over 56 days ago. As a matter of fact, I have dozens of copies of it. The only reason I was avoiding it was because I had done a few small manual modifications to the database since then. But those were still in the history buffer of psql, and so they were easy to reproduce. I restored the backup, made the changes at around 10:45, ran the updates again, and now here it is at 11:30 and everything is finally done.

I just hope this doesn’t happen again in 56 days, although I’m sure it will.

I hate to admit it but…

Much as I bitch and moan about my new job, I have to say that in spite of the extra work involved and the constant worrying about stains, I love the look and feel of a good dress shirt, especially those Joseph and Feiss no-iron ones. Dress pants I’m not so enamoured of, mostly because they feel tight around my thighs when I’m sitting down. And dress shoes should vanish off the face of the earth. Immediately.

I remember when I was at Gandalf I dressed up most of the time, except when I was either feeling pissed off about something, in which case I couldn’t be bothered to make the effort, or when I was anticipating spending time in the lab rewiring networks or upgrading computers. And that was with riding my bike to work in the morning, showering and changing there, and going for a long ride after work. My shirt and pants for the day were folded into a MountainSmiths backpack that I’d bought for doing the Silver Courier du Bois in the Canadian Ski Marathon, so they probably weren’t as unwrinkled as they should have been. Or as uncontaminated by ski wax.

Even *I* recognize this as overuse of the passive voice

I’ve been yelled at by English teachers, co-op work term report markers, and Microsoft Word for overuse of passive voice. Mostly I look at the sentence or paragraph they’re yelling about and say “what? I don’t see what’s wrong with it”. But even I recognize this as too much.

From a job ad on Monster.com:

System design, based on the requirements and the development of diagrams along with implementation of the computer language will be part of this Software Development position. Determining testing requirements followed by unit and regression testing will be performed in this role.

NRA assholes

I got a phone call from the NRA. They’ve been persistent about it – evidently they called a couple of times and asked for me when I wasn’t there, so somehow I got on their list as a gun owner, even though I haven’t owned a gun since long before I moved to this country. They made me listen to a recorded message from the president of the NRA with a bunch of bullshit about how Barack Obama wants to team up with Nancy Pelosi and Hillary Clinton to steal your guns. Then they asked me a couple of questions:

The first one was “Are you a proud gun owner” – I said yes, even though I’m not, just to see where they were going with this (as if I didn’t know).

The second one was an incredibly leading question about Obama, something about being worried about his “anti-gun ownership agenda”, and when I said “Absolutely not”, the questioner was utterly flat footed, like she’d never heard anybody answer the wrong way before. She thanked me for my time and hung up.