Archive for March, 2008

I probably shouldn’t give too many details, but I’ve been in talks with a certain freeware developer over developing a flight planning application for a web connected hand-held device. (Anybody who knows anything about me can probably guess the developer and the device.)

My part would be a server app that would respond to requests for data from the device and send new data or updates. Nothing too different than what I’ve been doing before, but one of the things we’ve been talking about is managing “areas”. His concept was that if the user entered an id that wasn’t on the device already, my server would send the device a whole “area”, and the device would keep track of what areas it had in memory already, when they were last updated, and would occasionally request updates of the areas it knew. He thought that each area could be a whole country. The first thing that struck me about that is that if the point you asked for was in the US, you could be asking for thousands of waypoints (70,584 in the current database). That could take a long, long time on an Edge network. Then we discussed maybe breaking it down by state or province in the US and Canada.

But the thing is, I used to be a GIS (Geographic Information Systems) programmer. I know there are better ways. At first I started looking around for the HHCode algorithm since I worked with Herman Varma and the Oracle guys implementing the original Oracle “Spatial Data Option”, until that scumbag Jim Rawlings screwed me out of three months pay. But I can’t find the source code anywhere.

So my next idea was a modified quad tree. Basically, when populating the database, I made a “rectangle” that incorporates the whole world and start adding points. When I hit a threshold, I subdivide that “rectangle” into 4 equal sub-rectangles, and move the points into whichever rectangle they belong to. This means that where points are sparse, the rectangles are large, and where they are dense, the rectangles are small. That way I’ve got some consistency in the size of the file to be sent to the device, and I’m not wasting people’s time sending the 19 waypoints in Wake Island, say, as an individual file.

I’ve been experimenting today with PostGIS, which is an extension to Postgresql which adds some very efficient geographic query tools. The program I wrote to take the data from my old MySQL database and put it into the PostGIS database while building these quad cells runs pretty fast. Surprisingly fast, even. PostGIS is pretty capable. Too bad the manual for it sucks rocks.

One thing that I keep forgetting is how much faster computers are now than when I was doing GIS for a living. I keep expecting things to take hours when they end up taking minutes, because the last time I did this sort of thing I was using a 40MHz SPARC and now I’m using a dual core 1.86GHz Intel Core2 Duo, and I’ve got more RAM at my disposal now than I had hard drive space back then.

Anyway, mostly I’m writing this because I’m really enjoying working with GIS-type stuff again. I wish I could do it full time again.

If I ever write a book about management, my first rule will be:

If you don’t trust your experienced employees, then the only people who will want to work for you are people who know they can’t be trusted.

Unfortunately, that’s the only rule I have, so the handbook will probably have to wait.

Today the developers were invited to see what our new usability expert has come up with. Evidently he hired some local company to do the graphics, and somebody else to whip it up into a fancy all-signing all-dancing Flash demo. It’s all eye candy and very little substance, and it looks childish to me. But evidently all the suits and managers love it, so it’s going to go ahead. I can’t tell you what it looks like, except the back drop looks like it was copied from the default background/splash screen/packaging of a certain fruit-based cat-themed operating system that was recently released.

The fact that the interface looks like it was designed more to impress suits than to help the people who are going to use it day to day isn’t the part that sucks. The fact that it’s all going to be written in Flash semi-sucks. The fact that it’s apparently going to be designed without talking to the people who’ve been working on the program for 6 years semi-sucks. What really sucks is that the project leader is talking about either outsourcing the entire Flash part of the user interface, or hiring their Flash programmer away from them. It was left to my cow orker Rohan to speak up and say “the reason you hired good people in the first place is that with a little training we can do anything, including Flash”.

A. Evidently, when it’s given to you by your boss’s boss’s secretary.

Every month, we have to fill in this stupid charge code thing. It’s especially stupid for me, because I only ever have one charge number, so it’s just a matter of pulling out my timesheets for the month and adding up the numbers. But it’s always due on the last business day of the month. So we get a reminder email saying “Please have your [foo] hours in by noon on Friday” about a week before. Then we get another reminder at the beginning of the week. Then a few of us get another email a few days before it’s due. And then today, 21 hours before the deadline we were given, my boss forwards me an email from the secretary saying “I sent these guys three reminders already and they still haven’t put in their time”, and a note from the boss saying “PUT THEM IN ASAP!”. WTF? If the deadline is noon tomorrow, why can’t I put it in tomorrow morning? I wrote back to her saying “if noon Friday isn’t the real deadline, why were we told that was the deadline?”

The way I see it, I have a very good reason for waiting. I’m paid hourly. That means if there is nothing for me to do, (and or the weather is nice for flying or kayaking), then I have a duty to bugger off and stop costing them money for nothing. So I don’t put in my hours until the last minute, because I could end up putting in my hours on Thursday morning and then run out of task so need to take off Thursday afternoon.

So I guess it comes down to: do they want accurate numbers, or is this just an exercise in bureaucratic masturbation?

Update:
Oh, it gets better. Here’s an email from my boss

Curious why you can’t just complete a simple little task without making a big deal about it and copying in the rest of the team. In doing so you take up additional time on their parts as well as mine. Mike and Wanda review the input prior to noon to ensure it is correct. Noon is the actual cutoff time in the system. I find it absolutely ridiculous the amount of time it takes us chase all of you down each month. You have an entire month to put your time in – why wait until the very last minute to do so?

Every morning, there is an ISO of the new build of our software in the drop box. If any of your code is new in this build, you’re expected to “integration test” your code to make sure it at least doesn’t make anything worse. Most people do it on the Integration Test Plex but some of us have our own mini-plexes cobbled together out of obsolete equipment.

This morning, I installed the ISO on my mini-plex as per usual. Only problem: my entire content directory was missing, and none of the software would run because it had evidently been compiled with Java 1.6 and the mini-plex has Java 1.5 installed on it. It turns out that one of the developers who doesn’t work with us very closely put together a new installation procedure that requires a special DVD instead of our normal installation procedure that is supposed to reformat our content directory as XFS, and upgrade it to CentOS 5.1. When I complained that nobody told us that we needed to follow a special upgrade procedure, he said “why didn’t you wait until it passed integration testing?”. Because I was trying to integration test it, dumbass!

After yesterday’s success upgrading Gallery, I decided it was time to upgrade the Browncroft Neighborhood Association CMS. It was running Drupal 5.1, and I see from the Drupal web site that the currently supported versions are 5.7 and 6.1. So first I tried upgrading to 5.7, and that worked fine. Then I tried upgrading to 6.1, and that failed horribly. Fortunately, both times I made a copy of the site on a test address in order to try the upgrade, which allowed me to try a few different approaches.

The upgrade to 5.7 didn’t require all the stuff they always tell you to do, like turning off all the optional modules and setting your theme to the default. The second upgrade failed silently a couple of times until I did it by the book and *did* turn off the optional modules. And that’s when I discovered that the upgrade script failed on some “ALTER TABLE” commands, which makes me think that it was expecting a newer version of PostgreSQL than the one I have installed.

I note that Debian Etch has both PostgreSQL 7.4 and PostgreSQL 8.1 packages available. I installed 7.4 because it was the default. But from work, I know 8.1 has more “ALTER TABLE” commands than 7.4. So now I’m trying to figure out just how I go about changing my 7.4 installation to 8.1 without breaking Drupal, Gallery, and all my custom configuration. So, lazyweb? Anybody out there do that upgrade and know?

A year or so ago, I tried to upgrade my Gallery from Gallery 2.1 to Gallery 2.2. I was promised all sorts of amazing new things if I did so, including much better CAPCHAs so I could re-enable comments. But the upgrade blew up terribly and required a very time consuming restore from backup. So I got some help from the nice people on the Gallery forums, fixed some database problems, and tried again. This time I’d been smart enough to make the backup locally, so the restore wasn’t quite so painful, but suffice it to say it blew up again. The nice people on the forums gave me more things to try to fix the database, but I’d had my fill of restoring from backups and so while I did the things they suggested to fix the database, I didn’t do the upgrade.

Today I decided to be adventurous, and I tried the upgrade. And lo and behold, it actually worked! Only a few little glitches, mostly errors when trying to rebuild thumbnails, but I think that’s because Gallery currently doesn’t handle PDFs very well.

The upshot is, if you’re a user of the gallery, and see anything wrong, please let me know. I’m going to turn on comments, so let me know if you see spam as well.

I’ve always been a book learner. I’ve learned just about everything I know about computers from books, sometimes from books bought in order to learn something I said I knew to be read in between the time I said I knew it and the time I’ve started the job where I was supposed to know it. Hell, even when I was in school I used to read in class instead of paying attention to the professors. But lately, between my internet addiction and all the other distractions in life, I just don’t seem to be able to get through text books the way I used to. Glancing over at my book shelf, I can see books on Ruby on Rails and Ajax that I intended to read once and become and instant expert on, just like I always used to, but which I ended up reading two or three chapters, wandering away, and never coming back. And that’s not to mention the growing pile of unread or barely skimmed magazines that has to be culled every few months for fear of them taking over the house.
Continue reading ‘The change of life’ »

I started doing C++ back just before cfront 2.0 just came out. For those of you not paying attention, cfront was a program that turned C++ code into C code, and then fed that into the C compiler. There wasn’t any such thing as native C++ compiler, or C++-aware debuggers. It was “fun”, especially when you got a core dump and you had to read a symbol like “foo_vt0_bar_xyzzy” and figure out that this meant that it had something to do with a virtual method in foo called something like bar. And of course, the line numbers in the backtrace were no help at all because the generated code bore little resemblance to what you’d written. Cfront 2.0 was when multiple inheritance was first introduced into C++, and I think it was around 1989 or so. I know I went to Usenix in Baltimore a few months later to take a class in C++ from Stanley Lippman, who’d written a book whose title he’d insisted on pronouncing as if the word “primer” was derived from “prim” rather than “prime”.
Continue reading ‘For the first time since learning Java, I wish I was doing C++’ »

Oscar
Well, not really mine. The division I work at just won their 9th Oscar, and to celebrate they sent it around to the division offices so everybody could get their picture taken with it. In spite of the fact that I had nothing to do with it, I sat down at the table. Of course, I wasn’t allowed to actually touch it or anything – the photographer and her assistants handled it with rubber gloves on so it wouldn’t need re-polishing.

A few weeks ago I did one of those “guess the tune from the first line things. I guess it’s time to post the answers. Any ones that commented managed to figure out will show as strike-outs, and ones that nobody guessed are not. The answer follows in <em> tags (italics). This is where you all get mad at me because I’m not good at deciphering lyrics.

The rules, as quoted from Eminy’s LiveJournal:

You know the rules: 20 random consecutive songs from my library, first lines given here (or second lines if the first contains the title). You identify the song, and I’ll cross it out. Googling is cheating. N.B.: Items in square brackets are instrumental only, included here to preserve the consecutivity principle.

  1. I have to swear by Almighty God Guns On The Roof, The Clash – Rob G
  2. When we were young, we pledged allegiance Stones In The Road, Mary Chapin Carpenter
  3. All you pretty women, bring it to my home Bring It to Jerome, Bo Diddley
  4. [skipped one in Bulgarian]
  5. I’ve been [loved?], down in the delta How Long Blues, Odetta
  6. Her eyes they shone like diamonds Black Velvet Band/Galway Shawl, 4 To The Bar – Ayana C
  7. Dust falls on the empty halls of my old school Within A Mile Of Home, Flogging Molly
  8. Well, you could see it in his eyes as they strained against the night Canol Road, Stan Rogers
  9. Men and people will fight ya down (Tell me why!) Exodus, Bob Marley – Ian York
  10. [Bach keyboard concerto]
  11. [Red Shingle Bay, Many Hands]
  12. He started out to be a tugboat man, but he never got the hang of a ratchet bar Steamboat Whistle Blues, Bob Bossin
  13. [Something from Green Linnet]
  14. Many’s the day I took for granted, breathing the air that silenced some The Kilburn High Road, Flogging Molly
  15. Ships may come and ships may go, as long as the sea does roll Jolly Roving Tar, Great Big Sea – Becca
  16. Now come tell me Sean O’Farrell, tell me where you hurry so Rising of the Moon, Shane McGowan and the Popes – Ian York
  17. [Mozart: Ave Verum Corpus]
  18. High speed drift on a prairie road, hot tires sing like a string being bowed SteelSilver Wheels, Bruce Cockburn- Ian York
  19. Well I’ve got a friend who’s a man (who’s a man?) Hateful, The Clash – Rob G
  20. [Duologue, Rare Air]
  21. I was a miner, I was a docker Between The Wars, Billy Bragg – Becca
  22. [Marion Livingstone, Rare Air]
  23. There’s a noble fleet of whalers, a sailing from Dundee Old Polina, Great Big Sea – CMD
  24. In the merry month of June, when from my home I started The Rocky Road To Dublin, The Irish Descendants – Fnord Prefect
  25. [skipped first line]He had a little tavern by the strand Yarmouth Town, Great Big Sea – Laura
  26. [Infernal Dance of King Kashei, Stravinsky]
  27. [Water Music, Handel]
  28. [skipped first chorus]Said – said – said: I remember when we used to sit, In the government yard in Trenchtown No Woman, No Cry, Bob Marley – Ian York
  29. [Trumpet Concerto, Wynton Marsallis]
  30. [The Pigeon On the Gate, Casdh An tSugian]
  31. The island, it is silent now, but the ghosts still haunt the waves Thousands Are Sailing, The Pogues – Ian York

Only half a year or so late, I finally upgraded my blog to Wordpress 2.3. And it seems to have worked “out of the box” with no surprises and everything working. That’s my favourite type of upgrade.

Whoever wrote the fucked up dependency checking in javac, and didn’t provide a way to turn it the fuck off.

I’m really sick and tired of having javac deciding that it needs to recompile something 3 directories ago in spite of the fact that both the jar file and the class file that it made about 3 seconds ago are in the CLASSPATH. This seems especially bad on directories that are NFS mounted, but if there is any clock skew between the NFS server and the NFS client, it’s less than a second and those source files haven’t been touched in weeks or months. It means that every time a low level class gets a new dependency, you have to modify the CLASSPATH in every fucking Makefile in the system because maybe, just maybe, javac will decide it needs to recompile that class for no apparent reason.

And don’t tell me “just switch to ant”. I have another rant building up against how ant and eclipse cause developers to forget everything they’ve ever known about partitioning of code and they start putting in calls to higher level stuff in low level code and causing circular dependencies.

The following software developers need a good swift kick in the balls:

  • People who can’t let a boolean stand alone, and have to compare it to another boolean, as in "if (isOffline() == true)“. Why not be extra safe, and make that “if ((isOffline() == true) == true)“?
  • People who don’t realize that after you’ve modified a value in a Map, you don’t need to re-add it back to the Map to have it take effect. “get” returns a pointer to the original object, not a clone of it.
  • Eclipse (or maybe Visual Age) users who leave the code littered with comments that say “ * TODO To change the template for this generated file go to Window - Preferences - Java - Code Generation - Code and Comments" or Insert method description. Either configure the template, or turn off automatically generated comments.
  • Anybody who declares a method to throw “Exception”, and anybody who calls methods that have explicit lists of what they throw, but who surround it with a “catch (Throwable t)” block. I don’t care if all you’re going to do is print the stack trace and continue, there’s no excuse for that sort of laziness.
  • Anybody who changes huge swathes of somebody else’s code without asking the original developer if there is a better way. Especially if it’s code I wrote just a few weeks ago.
  • People who use ‘do {…} while(cond);” People who use “if (cond == true) do { … } while (cond == true);” need to be kicked repeatedly.
  • The entire staff of my company’s China office.

My new laptop
A first look at my lovely new toy, “Snowbird”, named after the best precision flying team IN THE WHOLE WORLD.