C Paul Program, C Paul Rant

I was playing around with the Google Maps API and loading some of my nav data into Google Maps when I noticed a few waypoints with the wrong province. Oh oh. For instance, CDT5 Buctouche Airport is marked as being in Quebec instead of New Brunswick.

The DAFIF data never provided province data, so a long time ago (March 2001 according to Google Groups) I located some shapefiles with provincial boundaries and wrote a C program to do “point in polygon” to figure out what province the points are in. Obviously there is a mistake either in my algorithm or the shapefiles. Which is too bad, because a while ago I discovered that I don’t have the source code for the program any more. Not sure where it went, but I can’t find it anywhere. Funny, that program has moved without recompiling from my home system to Gradwell hosting to Linode Virtual Private Server to my rack to back on my home system. But now it’s time to recreate it.

The first step to recreating it is to find the library I used to access shapefiles, and after a bit of searching I discovered its name and web site, and also that it’s in the default Debian distribution. Of course, being Debian, in spite of the fact that it’s a positively tiny little tar file when you install from source, they had to break it up into libshp1, libshp1-dev and shapefile packages. Was that really necessary?

The next step was to find the Point In Polygon algorithm, but fortunately the newsgroup thread that I found my asking about it in 2001 also had the pointer to the comp.graphics.algorithms FAQ for that.

Now the biggest hurdle is that I’ve got to get my mind back into C programming again. Ugh. It’s hard to think that I used to do this shit every day, and it was all second nature to me. Now I’ve got to stop and think that when the function signature says “double *” and it returns X, Y, Z, and “M” (whatever that is), that I really need to declare “double maxBounds[4]” and pass it as “maxBounds”, but when it says “int *” and it returns a single value, I need to declare it as “int nVertices” and pass it as “&nVertices”. Even when I was doing C++ I didn’t have to deal with crap like this because C++ programmers were *far* more likely to declare a class and use that as the return type instead of passing in a huge list of arguments to return values in. There was a time when I thought C was the greatest language. And I helped write a gigantic Geographic Information Systems product in it. Those were the days.

Yet another reason why Lotus Notes is not my favourite software program

I asked one of my bosses why I wasn’t invited to a certain meeting. He said he did, but it was declined. A few years ago I got tired of the constant stream of meeting invites, modifications, and cancellations, I set it to automatically accept any meeting invitation, so this was a bit of a surprise. So I went into the highly intiutive Actions->Tools->Preferences menu, only to be greeted by a popup saying

Availability Problem
Your availability time range is invalid, please correct.

and when I clicked on “Ok”, I got another popup

Cannot locate field

and when you click on “Ok” on that one, a third popup

Notes Error – Cannot locate field

Going into “Calendar & To Do”->Scheduling on that dialog subjects you to many more of these triple threat popups, like every time you attempt to edit one of your availability times. My availability was set to 4am to 5pm, which seemed a bit over-zealous to me. But I couldn’t edit them, and I couldn’t save the Preferences dialog, either.

I found this page on IBM’s support site for Notes, but none of the complicated options actually did anything except subject me to more of those triplet popups.

Then I found another unofficial page where somebody said to turn on Saturday and Sunday availability, edit their available times, save it, then come back in and turn off Saturday and Sunday availability. Sure enough, Sunday’s availability was set to go past midnight, and when I set that to “11:30 AM – 11:31 AM” and saved it, the problem went away. And then I was able to set my weekday availability to a more reasonable time as well.

Thanks very much Notes. Rot in hell.

Update: I just figured out why his meeting notice was declined: He had it scheduled to repeat every Tuesday and Thursday, and Notes is smart enough to see that there is a conflict (22 November is a company holiday) but dumb enough that it rejects all instances of the meeting instead of just one. And why did it allow him to create the meeting then? Sheesh, what a piece of shit.

Ok, I’m confused

I’m trying to find a way to put a nice formatted table in my Google Web Toolkit application, and I was looking at gwt-advanced-table – Google Code. The code comes with no documentation, just an example that took a lot of wrangling to get it to work. And is going to take even move wrangling to get it to work in my demo.

But the problem is that we want to avoid viral licenses in the code we use. And since this isn’t packaged up as a nifty jar, its code will mingle in with ours. Our company lawyers have cleared a few open source licenses, but obviously not the General Public Virus. One they haven’t cleared yet is the Mozilla Source License. So I look at the Google Code Page for this code, and there at the top right is the banner “License: Mozilla Public License 1.1”. But down at the bottom (and in comments in the code), it just says “License: Freeware”.

So which is it?

MRI’ll Do Whatever You Want If You Let Me Out Of Here

On Monday night, I was supposed to have an MRI on my elbow. However, once they got me in the tube and took a series, they said that my elbow was too close to the edge of the tube and they couldn’t get a good image. So I was scheduled this morning for an “Open MRI”.

An Open MRI is a gigantic upright cylinder that looks like a Mayan ruin with a slot in the side that they slide you into like a pizza into an oven. There’s barely enough room for them to slide you into this slot – later on I discovered that I could get my good hand up to my face, but only just. But before they slid me in, they put your arm into a ring that is plugged into the device – I suspect that’s some sort of focusing magnet. The tech said “I need to open your elbow up”, and so she put me into an extremely uncomfortable position, and then put weights on my hands and arm to keep it in that position and filled the space in the ring with cushions “so you don’t move too much if you start spasming”. I should have taken the hint and left immediately.

Anyway, after they peg you down in this uncomfortable position, they said “ok, this is a 2 minute series”, and you hear some thumping and whirring noises and then some pulsating noises. Then it stops and before you can say “can I have a second?” they say “ok, this is a 2 and a half minute series” and it starts making noises again. Each series got progressively longer until the last one, but because there was no time to flex my arm in the interim my elbow was getting more and more painful, my hand was going numb, and my upper arm muscles were spasming after about the second series. Before the 4 minute one, I yelled out begging for a break, but they either don’t hear you or don’t care. By the end of it, I was crying. I tried pinching myself or biting my lip or anything to distract me from the pain in my elbow, but nothing worked. By the end of the 4.5 minute one I was ready to tell them anything they wanted to hear. By the end of the 5 minute one I was ready to swear there wasn’t anything wrong with my elbow any more, or ever if that would make them happier, so we might as well stop right now.

But it’s over now, and I might regain the use of that arm in a few hours. I hope it was worth it.

A Rant About Splash Screens

(This might look familiar to some people)

Can somebody please shoot all the asshole software designers who make a splash screen that remains on top even if you switch to another application while it’s loading? I don’t want to fucking see the fucking credits for your software every time it loads, fuckers. I especially don’t want to see it blocking my view of what I’m working on in the interminable time it takes you to load your software. Adobe, I’m looking right at you.