Jeppesen Responds

After receiving the email I mentioned in Rants and Revelations » Who’d have thunk it?, I responded with

I have renamed the part of the Wiki that uses the trademarked word
“NavData” to “DAFIFReplacment”. However, I am going to continue to use
the “/navdata/” part of the URL as that is a generic term and
untrademarkable and changing would break people’s bookmarks. You can
have a look at http://xcski.com/navdata/ if you wish.

I hope that meets your requirements.

Evidently their lawyers work nights, or they’ve outsourced it to India or something, because I got a response at 8:47pm:

Mr. Tomblin,

We appreciate your prompt action and reply to our notice.

While we cannot agree that the navdata term is generic, we understand the
bookmark issue and are satisfied with your action regarding this matter.

John Jaugilas
Jeppesen Intellectual Property
(303) 328-4178

Who’d have thunk it?

Well, it turns out that using the WikiWord “NavData” has upset Jeppesen Sanderson because they’ve got a product with that name, and they’ve sent me an email telling me to stop using the word or they’ll start legal action. I’m still using the word “navdata” because lots of people use it as a generic word meaning “navigation data”. So my Wiki url is still http://xcski.com/navdata/, but all deep links you might have are broken. Replace the word “NavData” with “DAFIFReplacement”.

Java Thread Locking

Ok, maybe I was a little succinct in my previous post.

You see, we’ve got an architecture where there are 3 or 4 layers of code, each one of which calls the one below it and then gets information back in the form of callbacks. Oh, and one of the very lowest layers is accessed through an RMI interface. Also, the very lowest layer deals with content, which can be created/modified/deleted through the program, or through other programs or just by doing file system stuff, which that lowest layer finds out about through dnotify.

The front end GUI has a dialog where you can delete content, and the problem was that evidently one of our customers have the fastest fingers in the world, and they complained that they delete the content and then go to ingest (slurp in) new content but the content they just deleted is still there (the deletion process takes a good 10-15 seconds) so the ingest fails due to lack of disk space. So they wanted the deletion to actually wait until it was done. And the lower level library actually provided a method called “deleteContentWaitTilDone”. So I thought it would be a simple matter to call it – once the method returned, the content would be really gone.

That’s when my problems started. I spent a week on this damn thing. The sad thing is that if Martin was still around, I could have used his Eclipse debugging skills and got this done in half the time. But when I attempted to install Eclipse on my machine, every time I fired it up, the whole machine locked up.

The problem seemed to be that the deletion process called callbacks in the higher levels, and ultimately some of them would do GUI stuff, and they’d also call down to the library. I had a hell of a time working out what was the actual problem. I ended up putting System.out.println debugging statements all over the damn place.

What I found first was a bunch of extraneous “synchronized” methods – the problem with that was the methods were synchronized to prevent different things. So instead of synchronizing 6 methods in a class where 2 of them were synchronized to prevent simultaneous accesses to a variable named “childThread”, and 2 of them were synchronized to prevent simultaneous accesses to the library, and 2 of them were synchronized for some other reason. I removed the “synchronized” on the method names, and then protected the important parts with different synchronization Objects, one called “childThreadSyncObject”, one called “librarySyncObject”, and it turned out the other ones didn’t have to be synchronized at all. Further digging revealed that the code one level above this that called this also had a synchronization object, which was redundant and I removed it.

The next thing I found was that one of the GUI level callbacks called “fireIntervalChanged” and it never returned. Ever. That’s when I had another epiphany – the callbacks aren’t in the gui event thread, and the event thread is currently locked because it’s waiting on that “deleteContentWaitTilDone”. So I went through all the GUI level code and made all the callbacks do the bulk of their processing in the event thread using SwingUtilities.invokeLater. The standard way to do that is

SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
//..do stuff..
}
});

but unfortunately you can’t pass arguments that way, so I ended creating a metric buttload of tiny private classes that implement Runnable but take arguments in the constructor.

After all that work, I finally had stuff working. But unfortunately I neglected something that’s probably important – I didn’t give any sort of dialog or busy cursor or anything while that processing is going on. Oh well, maybe next time.

Break in

While I was mowing the grass on Saturday, I managed to notice that both the passenger side doors on Laura’s car were unlocked, and the front one was actually ajar. Since both Laura and Stevie were known to not lock their doors when they were passenger’s in Vicki’s or my cars (in much the same manner that fish are known to like to swim in water), I assumed that she or her friends had just been careless the night before. I somehow managed to miss noticing that the back window was smashed. Somebody evidently broke into her car and found nothing worth stealing.

I guess I should probably stop leaving my GPS, digital camera, film camera, kayak paddle, and flight bag with 3 expensive headsets, portable transciever and my worthless but irreplaceable log book in the trunk of the car any more. Not sure about the XM radio – yeah, it’s supposedly portable but that would be such a hassle to drag in and out of the car every night. The CDs can probably stay – they’ve all been ripped to MP3 anyway, and besides they’re all obscure crap that nobody would steal.

Back when I worked for GeoVision we had a tradition in the winter that the night of the full moon, we’d go cross country skiing in the dark up to one of the lodges there, cook some dinner, hang out for a while, then ski home. It was extremely cool. One day at work, the day after one of these ski trips, I noticed that there was no money in my wallet. No matter, I thougth, I’ll just head over to the Toronto Dominion next door. But somebody else who had been skiing with us asked if my car had been broken into last night. I said I didn’t think so, so they asked me if there was any money in my wallet. They suggest that I go down to my car and look for a small hole beside the keyhole. Sure enough, there was one. Evidently somebody had gone around to all the cars, punched a hole in the door panel near the keyhole and opened the door somehow, and stolen any money he could find in the car, but only money.

The next full moon came, and this time I decided to be one step up on the theif. I put my wallet in my bum bag so it would come with me when I went skiing, and left the doors unlocked so I wouldn’t get another hole in my door. However, I stopped for gas on the way to the parking area, and so my wallet made its way from my bum bag to my work pants, so didn’t come with me on the ski. I came back to find my wallet had been emptied once again. Buggeration.