Archive for the ‘Books’ Category

Clippings: August 19, 2009

Wednesday, August 19th, 2009

By way of Radley Balko, we found an interesting Slate article; wine expert Michael Broadbent is suing author Benjamin Wallace for allegedly libeling Broadbent in his book, The Billionaire’s Vinegar. I’ve read (and recommend) Wallace’s book; the Slate article gives a pretty good short summary of the whole Jefferson’s wines fraud. My opinion is that Wallace doesn’t libel Broadbent; he makes Broadbent look careless, but not criminal.

In other news, the Williamson County Attorney has decided that letting a waitress fondle your patrol rifle in the parking lot of a restaurant is not a crime. At least, not if you’re cops visiting from another county. Twin Peaks is right around the corner from work; I haven’t been there yet, but I’ve heard it described as “Hooters without the class”. (Personally, I would apply that description to Bone Daddy’s.) For once, I find myself agreeing with the Williamson County establishment; I couldn’t see what the criminal conduct was when this story first broke. Bad taste? Poor judgment? Sure. A crime? Not as long as she wasn’t pointing it at anyone or making threats.

Edited to add: Our friend James points us to a second article from MyWestTexas.com. According to this article, one of the five deputies was fired, three were suspended for three days without pay, and one was issued a letter of reprimand. Even better, this article includes a photo of the waitress and the patrol rifle.

Edited to add 2: Our great and good friend Commvault Bryan points out that The Smoking Gun is now on top of the story, complete with legal documents, a larger version of the photo, and the fascinating tidbit that the waitress uses the name “Bambi”. Seriously, “Bambi”. If I put that into a work of fiction, my editor would reject it as implausible.

Efficient closest point calculation; how to?

Tuesday, July 28th, 2009

Randall Lawrence Waterhouse

Current meatspace coordinates, hot from the GPS receiver card in my laptp:

27 degrees, 14.95 minutes N lattitude 143 degrees, 17.44 minutes E longitude

Nearest geographical feature: the Bonin Islands

—Neal Stephenson, Cryptonomicon

One of the projects that I’ve had cooking in the back of my mind is to implement something like Waterhouse’s signature block in Cryptonomicon. After all, I’ve reached a point in my life where I actually have GPS equipment and a computer that are small enough to use on an airplane. (Unlike Waterhouse, I tend to fly coach.)

There’s a couple of different parts to this project as I see it.

  • You need an interface to the GPS reciever to get the current position data. That should be easy; both Perl and Python have GPSD interfaces.
  • You need a database of geographic points. It looks like that shouldn’t be a hard problem to solve; there’s some online databases that I think can be made to work, or converted, for this purpose.
  • You need an interface between your programming language and the database to look up points. Again, that should be easy; I’m assuming the database of geographic points is stored in some sort of standard SQL databse, and both Perl and Python have SQL database interfaces. (One possible problem is that I want to be able to run this on a Nokia N800, and the SQL database choices for that machine are kind of limited.)
  • You need to be able to calculate distance between two points. That’s easy: see http://www.movable-type.co.uk/scripts/latlong.html  for an example.
  • But here’s the problem. Let’s say you have a database of two million geographic points. How do you efficiently find the closest point to your current geographic location?

I’m stumped by the last part. Doing two million Haversine calculations seems like a time consuming operation; I suspect on a N800, the closest point would have changed substantially by the time the calculations finish.

Anyone have any good ideas? If I ever do write the script, I promise public acknowledgment (and public posting of the code).