I’ve ordered a couple of things from Duluth Trading. Mostly they make stuff for people in the building trades, but they make good looking and durable clothes. But that’s not what impresses me the most. What impresses me the most is that I choose the cheapest shipping option, and the package arrives two and a half days after I ordered it. I compare that to some site I once ordered something and chose their expensive express shipping, only to find that while they sent it FedEx Overnight, they didn’t actually give it to FedEx for 4 or 5 days.
Category: Revelation
This could work
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.
Another weekend, another upgrade
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.
The change of life
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”
For the first time since learning Java, I wish I was doing C++
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++”