Archive for April, 2008

Hooray for on-line training!

Monday, April 28th, 2008

Wow, never thought I’d utter that sentence.

Every two years, I have to re-take the Health Safety and Environment Orientation for contract employees. In the past, that’s always required me to show up at the HSE office at 7am, sit with a bunch of the type of contractors who do actual work (you know, with tools and stuff instead of computers), and be lectured on the proper way to dispose of dirt or what to do if your backhoe (or computer, in my case) accidentally ruptures a line carrying something nasty. Usually the lecturer is some grumpy old guy who reminds me of Jasper in that Simpson’s episode where he ends up teaching a class in the school. “Using a camera? That’s a paddling. Smoking on the property? Immediate firing, then a paddling. Improperly disposing of construction garbage? First we fine your employer, then fire you, then a paddling.” And of course, I can’t tell you how useful it is to know that I’m not allowed to use Kodak ladders or oxygen lines in my line of work.

This year, however, they’ve got on-line training. And not only that, but they have different training for outside workers and office workers. So I clicked the link, and got a stupid animated guy pointing at a button on the side menu saying “Start by clicking this button”. “Fuck that”, I thought, and clicked on the button marked “Final Assessment”. I took the test, got 10 out of 10, and got the certificate, all in way less time than I’m wasting on writing this blog post. So hooray for on-line training where you skip the boring bits (ie. all of it) and go straight to the incredibly obvious test questions.

BTW, the test questions were all on the order of “Where do you dispose of waste? A) toss it over the fence onto non-Kodak property, B) make a big pile and set fire to it C) put it in designated containers or D) Your contract will have instructions on proper waste disposal” And I’m not kidding, that is pretty much verbatim. (BTW: The correct answer is D - sometimes the contract will require you to remove the waste yourself.)

Note to self

Friday, April 25th, 2008

Your cow orkers are evidently neither gamers nor Penny Arcade readers, so when somebody sends an email to the group saying that it’s so-and-so’s birthday, and to come to the breakroom for cake, it’s not a good idea to do a group reply to say “THE CAKE IS A LIE”.

It’s like Half Life 2…

Wednesday, April 23rd, 2008

…only without medkits, saved games, and restores.

Saw this on Old Grover’s LiveJournal:

http://www.brightcove.tv/title.jsp?title=1438490562

Carp::croak()

Wednesday, April 23rd, 2008

I went kayaking after work today on Irondequoit Creek. The carp were mating, and there were lots of dead ones floating around, thus my little perl joke in the title.

It was a great day to blow off work a bit early, and Rob and I went upstream from Bay Creek Paddling Center up just past the Elison Park dog beach. I was pretty tired on the way back, and it didn’t help that the wind shifted around and got cold, so we ended up with headwinds in both directions. According to the thermometer in my car, the temperature dropped about 10 degrees in the course of the hour and a half paddle, although it felt like the temperature change happened all at once when the wind shifted.

The weir was a bit of a challenge, but nothing like it had been last time I took a look at it. I nearly dug a rail under, and was grateful for my spray skirt. Rob took about three tries, but mostly because he tried hitting it from one side or the other instead of coming right up the middle.

A couple of times we saw a bird that at first we thought was some sort of Loon because it was so low in the water, but it had no white markings, only black, with a bit of red or orange near the base of the beak. When it flew, we could see very long pointy wings. And when it swam it held its beak up at a 45 degree angle to the water, rather than parallel like a Loon does. I guessed it was a Cormorant, and after looking it up, I’m sure of it.

We also saw lots of geese. At one point, we heard a lot of honking up ahead, and as we rounded the corner this goose left the shore and paddled out in front of us, and did a bit of a fake take-off, presumably to try to lead us away from his nest. But this annoyed another goose, who then flew into the first one and attacked him until they both flew off.

Lots of people and dogs in the dog park, including two people who kept asking us all sorts of questions about paddling and seemed put out that we continued paddling instead of stopping to talk after we’d answered a couple. And one canoe coming upstream just as we’d flushed the Cormorant downstream for the last time. They asked us what the bird was, I said Cormorant, and the woman in the front of the canoe said “See, I told you” to the man in the back.

Lots of fun.

Torchwood, non-spoiler edition

Tuesday, April 22nd, 2008

I don’t think the cut tags work right in RSS, so I won’t be saying any spoilers here. But I just finished the last three Torchwoods, and all I can say is

WHAT? WHY?

Good shows though. I did not see that coming at all.

Having Microsoft flashbacks

Monday, April 21st, 2008

I just got a notice from Software Update that it needs to reboot my computer to complete the installation of an update of Safari. Since when is a web browser part of the operating system, Apple?

It’s bad enough you have to reboot when they update Quicktime, but this is just a little stupid.

Meta-x psychoanalyze-pinhead

Monday, April 21st, 2008

There’s something wrong. I don’t know what it is. All I know is that in the course of this week, I’ve blown up at the pilots on rec.aviation.piloting for telling lies about Al Gore[1], and then had an even bigger blow up at my best friends in the world on a couple of mailing lists. I’m not just talking about you know, some amusing list that some people read once or twice a day, I’m talking about lists that basically my life revolves around. I read these lists first thing when I wake up in the morning, last thing before I go to be at night, I carry a Treo with a data plan and an imap mail reader so I can read it when I’m walking to the bathroom or at lunch, in business meetings, and during any lull in conversation or any down time at all. I hate to go more than a few minutes between my fixes. Yes, I’m obsessed. Probably in a not very healthy way.
(more…)

Blow off work, go paddling, good times

Saturday, April 19th, 2008

We knew that today was going to be an amazing day - sunny, temps in the mid 70s, so Rob and I decided to blow off work and go paddling. And we planned it in advance, so we invited the rest of the Huggers Ski Club to go with us, and 5 or 6 others accepted the invitation.

We went somewhere new for me, Black Creek. The put-in is about half way between the Rochester Flying Club tie downs and Vicki’s work at RIT. And the creek runs very close under the approach path for runway 4 at Greater Rochester International Airport. Runway 4 was in use, so every few minutes our conversation was interrupted by a low flying aircraft. Not that I’m complaining, mind.

The river was pretty high, and it had flooded a lot of land, making route finding fun and interesting. Right from the start it we ended up taking wrong turns several times. Even more exciting was near the beginning there was a bridge where the water was so high I had to lie back as flat as I could on the back coaming of the kayak and paddle like that. One or two people just shipped their paddles and pushed themselves along the top of the arch. At another point there was a bit of shallow stream with a strong current coming over it but a tree lying across it making it impossible to paddle, but there was a much longer deep channel. I paddled ahead a few hundred metres and ended up on the other side of the same tree, telling the stragglers where they had to go.

In a lot of ways, it reminded me of some of the times Mom and I paddled through the Minnesing Swamp in spring time.

I couldn’t tell you how far we went, because of all the twists and turns and retracing our steps. But it was a lot of fun, and I think I’ve got a hell of a sun burn to show for it.

I LOLed

Friday, April 18th, 2008

Conversation at lunch today between R (been using emacs since 1981) and me (been using vi since 1987). It started off with him saying something about how he knew our latitude and longitude because he had to put it in his emacs config.

Me: When I’m looking for an editor, the ability to tell me sunrise and sunset times isn’t high on my list.
R: Emacs isn’t an editor, it’s an environment.
Me: Emacs isn’t an editor, it’s a lifestyle.
R: Yup. There’s straight, gay, and emacs.

At that point, I was literally laughing out loud (and I mean “literally” literally, not in the internet sense of “I smiled a bit”). I was lucky I didn’t have any food or drink in my mouth at the time.

Optimize this?

Sunday, April 13th, 2008

The main loop query of my waypoint generator app is kind of hairy. And trying to do an “explain” on a typical query shows why it’s so slow.

explain SELECT a.id, c.pdb_id, internalid, a.type, name,
address, state, country, latitude, longitude,
declination, main_frequency, elevation,
b.category, chart_map, tpa, ispublic
FROM waypoint a, type_categories b,
id_mapping c
WHERE a.type = b.type AND
a.id = c.id AND
country in (’US’, ‘CA’) AND
(a.type in (’AIRPORT’, ‘VOR’, ‘NDB’) or
(category = 3 and (chart_map & 7) != 0)) AND
deletedon is null;
QUERY PLAN
——————————————————————————————————————————————————————–
Hash Join (cost=4442.82..19955.46 rows=34752 width=111)
Hash Cond: ((a.id)::text = (c.id)::text)
-> Hash Join (cost=4.83..12938.32 rows=34752 width=107)
Hash Cond: ((a.”type”)::text = (b.”type”)::text)
Join Filter: (((a.”type”)::text = ANY ((’{AIRPORT,VOR,NDB}’::character varying[])::text[])) OR ((b.category = 3) AND (((a.chart_map)::integer & 7) <> 0)))
-> Seq Scan on waypoint a (cost=0.00..10759.48 rows=72467 width=103)
Filter: ((country = ANY (’{US,CA}’::bpchar[])) AND (deletedon IS NULL))
-> Hash (cost=4.37..4.37 rows=37 width=15)
-> Seq Scan on type_categories b (cost=0.00..4.37 rows=37 width=15)
-> Hash (cost=2091.77..2091.77 rows=127777 width=12)
-> Seq Scan on id_mapping c (cost=0.00..2091.77 rows=127777 width=12)
(11 rows)

Adding indexes on country and type doesn’t help. There is still that nasty looking “Seq Scan on waypoint a” line. And also, another “Seq Scan on id_mapping c”, which I don’t understand at all because the joining column, c.id, is a primary key, so shouldn’t there be an index involved?

I’ve got a few ideas on how to use the spatial capability of PostGIS to improve that query, so I’m going to have to run a few tests. The first few ideas I’ve had aren’t showing major improvements in “explain”. It looks like the whole “type in … or ((chart_map & NN) != 0)” is going to force a sequential scan on waypoint no matter what I do. Hmmm.

We’ll just consider that drawing board “backed”, shall we?

Sunday, April 13th, 2008

Ok, I just added some indexes, and now the PostGIS version runs in 45 seconds. Phew! Man, I love “-d:DProf”.

Back to the drawing board

Sunday, April 13th, 2008

In order to support a new product development I mentioned in an earlier blog post, I re-did my existing waypoint database as a PostGIS geographical database. I also added some foreign keys and some other cleanup that I’ve been meaning to do for a while. But obviously, I don’t want to support two databases, so today I’ve been converting one of my existing waypoint generator perl scripts to use the new PostGIS database instead of the MySQL database it was on before, but without any actual GIS functionality. And Houston? We have a problem. Doing a full US + Canada data load on the MySQL version takes about a minute and a half. Doing the same load on the PostGIS version takes twenty five minutes. Something tells me that I need to make some adjustments here.

That was close!

Saturday, April 12th, 2008

The theme I have been using for a couple of years on this blog (Maple) didn’t work very well with Wordpress 2.5 and I can’t find an updated copy anywhere. Since I’ve hacked the shit out of it over the years, I decided it was time to make a fresh start with a theme that’s actually supported. So the first thing I did was copy the default theme, and try to make it look more like Maple. That wasn’t fun, and I’m not 100% satisfied with the results. So I decided to look at other themes.

I couldn’t find what I wanted at the official themes site, mostly because their search engine doesn’t categorize themes by category, and also because their “preview” function doesn’t work. But I found this other site, whose name I won’t mention but it had the word “free” in the URL. I found a bunch of nifty themes there, and downloaded them. I was just customizing one theme to add gravatar support and give the comments an alternating colour scheme, when I noticed something weird down at the bottom. It looked like spam. I grepped the theme code for the spammy urls, and couldn’t find them. But I figured the offending code must be in footer.php. Sure enough, all the themes I’d downloaded from this site had encrypted code in footer.php. I couldn’t read it or decrypt it, but it obviously was there to insert spam code in your blog. I tried replacing the footer.php with one from the default theme, and that broke other stuff. Crafty buggers.

Anyway, I’ve removed all traces of this crap, and I guess we’re all stuck with the psuedo-Maple theme until the official site starts working again.

Hmmm

Friday, April 11th, 2008

I upgraded my blog to Wordpress 2.5 because the damn thing was nagging me all the time about being back at 2.3.3. But now I discover that my theme doesn’t work right with the new code, and one of my favourite plugins, the LiveJournal CrossPoster, doesn’t work. Now I’ve either got to find a less ugly theme, or fix the old Maple theme to support the new comment code with the built-in Gravatars.

Update: I might have found the fix for LJXP!
In lj_crosspost.php, change

if(version_compare($wp_version, “2.1″, “< ")) {
require_once(ABSPATH . '/wp-includes/template-functions-links.php');
}

to

if(version_compare($wp_version, “2.3″, “< ")) {
require_once(ABSPATH . '/wp-includes/link-template.php');
} else
if(version_compare($wp_version, "2.1", "<")) {
require_once(ABSPATH . '/wp-includes/template-functions-links.php');
}

Update #2:
I officially hate this update. It keeps adding bogus </code> tags even though my tags are perfectly well closed before I saved them. Let’s try with block quotes instead?

Bald Eagles!

Wednesday, April 9th, 2008

It’s rare for me to get my second paddle of the season so quickly after the first (first was Sunday, second was today, Wednesday), but the weather cooperated and today was chicken wing day in the cafeteria so I wasn’t hungry when I got home, so away I went.

The creek was quite deserted by other boats, except for one flat bottom dinghy that two guys were fishing from. I’ve seen carp mating in that area, so that’s probably what they were after.

Considering that Sunday I saw almost no wildlife except geese, today was a bonanza day. I saw male red-winged blackbirds staking out their territories, several kingfishers patrolling their sections of the river (and raising their crests in alarm when I got too close), a few pairs of ducks, and I finally saw the famous Irondequoit Creek bald eagles. I rounded a corner and saw two soaring birds, one quite high and one just above the ridge line, nd immediately said “oh, turkey vultures”, but then the lower one spread his stunning white tail and I noticed that the head was bright white as well. I never did make out for sure if the higher one was a bald eagle as well, but I think it was. One thing that impressed me was that while it was soaring, it seemed to be moving back and forth much faster than a turkey vulture does. Maybe it’s anti-vulture prejudice, but it just seemed more, I don’t know, purposeful or something.

I also saw a crow or raven down fairly low, but he flew away rapidly as I got near so I didn’t get a good look. There were very distinct primary feathers curling up at the tips, which I think means it was a raven.

I went a little bit further than I did on Sunday, and I wasn’t as tired when I reached the weir, probably because I paced myself better. Probably just as well, because on the way home there were two stretches where I was paddling into a very strong wind. My weather widget says that the winds at the airport are 21G33 knots, or 24 to 33 mph, which I can easily believe. And when the wind is blowing in my face like that, my old canoe trip instincts say “paddle as hard as you can for the lee of the upwind shore, and don’t rest until you get there”, so that’s what I do.