Apple’s solution to confusing error messages:

Just don’t show them!

If you try to eject a CD or DVD and the drive is still in use by another program, an operating system can’t eject the disc because that might crash that program. In GNOME, a helpful error message is generated:

Unable to eject media
umount: /media/dvdrecorder: device is busy
umount: /media/dvdrecorder: device is busy
Error: umount failed
eject: unmount of `/media/dvdrecorder’ failed

This error is a little confusing, because the first line tells you the error, but the reason is buried in the raw log text. It would be nicer if it just said “Unable to eject media, disc is in use by another program.” But that’s still not great, because it doesn’t tell you which program is using the drive.

On Mac OSX, their solution is: just don’t show an error. You can push eject as much as you like, and the big eject icon will appear on the screen, but else nothing happens. Problem solved!

In another case, we have a fibre storage system that has an artificial read-only mode. In other words, a mounted drive appears to be writable but actually isn’t. I’m told on windows if you try to write to that drive you get an error. Probably “Unable to write to this drive.”

On OSX, it lets you write to the drive. But it doesn’t actually work. In fact, you can somehow read the files on that drive to supposedly confirm that they are there. But they are not. The next time you unmount / remount, or reboot, the files are gone. No error message, no indication of any kind that the procedure failed. I’ve also seen this problem with regular AFP network drives, where a file is written to a disconnected share and there’s no indication of a failure.

I can understand hiding weird messages from users, but sometimes an error message would make my life as an administrator a lot easier. We once lost 2 days of work to the “haha you thought you were writing to the drive” error, so this isn’t just an incidental problem.

Side-by-side comparison of X-Men 3 anti-aging effects

As I posted on Digg:

Side-by-side comparison of X-Men 3 anti-aging effects

“The actors had no special makeup, not even hair colouring. There were no special tracking markers, greenscreens, measurements or considerations given to the effects team.” As photoshops these would be pretty good, but in motion — wow.

This story reached the front page like I knew I would. It was an awesome link and I made sure to put the “wow” in there. “Wow” seems to guarantee a front page story.

Sorry fxguide for killing your server.

For posterity:


Summer news trend

A lot of people have noticed that during the summer the news media seems to pluck an issue from the air and decides to run with it all summer long. Previously we’ve seen the Summer of the Sharks, and the Summer of the Missing White Girls, and then the Summer of the Sharks again. In each case the actual incidence of these events hadn’t increased, but the coverage had.

What’s going to be the issue for ’06? What could possibly fill the airwaves of 24-hour news networks and yet still feel like news?

You can see why one might get the impression that Alberto is a big storm. Mentioned in the same headline as Katrina! “The Worst!” A hurricane wiped out a city a little while ago, so maybe this one could do the same!

Oh wait, no:

Alberto unlikely to become hurricane

I can’t remember ever hearing about storm “A” before. By the time I find out about a named storm, they’re usually up to D or E. This is because, of course, that most storms don’t become hurricanes and peter out before they’re worth discussing. If they’re already comparing tropical storms with Katrina, you can bet you’ll hear about B, and C, and D… all the way up to alpha and beta. I’m sure by October we’ll know more about plywood than we ever thought we could.

Tour de Nat training: Part 1

Ever since I read about the infamous Tour de Nat challenge, I knew it was something I wanted to do. In August, I will do it.

I have the bike and I have the system, all I need now is a body capable of the task. So a few weeks ago I started riding every weekend that the weather was good, of which there has been only one.

This is the route I took two weekends ago:
route1.jpg (31 miles)

The link takes you to the mapping site I used. Load this GPX file to see the route up close. The route was quite good, although the first hill in Belmont at waypoint 15 kicked my ass.

I’ll be posting all of the routes I take on my way to Tour de Nat 2006, but I can’t guarantee quality choices. I don’t have years of experience to rely on, so I’m using a combination of google maps and google earth to pick my roads. Google Earth sucks for determining elevation, however. I’d prefer a real topographical map. I’ll be steadily increasing the mileage until I can do 60 miles reliably. Come August, I should be ready.

Bicycle GPS navigation on the cheap

Necessity may be the mother of invention, but being cheap is the mother of glorious hacks.

My friend Mike and I went bike riding two weeks ago using a route from a book. This was awkward because each of us could only retain three or four instructions at a time (“right? left? Mountain? Peach Orchard?”). We had to check the map so often that progress was slow and uncontinuous. Ah, but for a handlebar-mounted gps with mapping!

Vista -- pricy!

Ouch! Ok, nevermind.

So I did some googling, and discovered that someone had made some Garmin-specific files of Boston area bike rides. Char and I own the cheapest Garmin, the eTrex. No mapping, no magnetic compass, no altitude, just location data and route information. I got it at target thinking we might do some Geocaching, but we haven’t done any yet. The problem was, how to get the maps into the GPS?

serial cable

Cheap-ass serial cable! I learned that the data port on the Garmin is simply a serial port: Rx, Tx, Ground. Wire those terminals to a 9 pin serial connector (everyone has a 9 pin serial cable lying around in a drawer somewhere of course!), and you’ve saved yourself $38.00. My cable isn’t very well made and could use a little solder to improve the connections, but right now it works well enough.

While it’s nice to use other people’s maps, I really wanted to create my own. As you can see by my previous post, the solution was handed to me on a silver platter, as was the problem of format conversion and linux-based uploading. This weekend I created a short map on the website, uploaded it to the GPS, and Char and I followed the path around the neighborhood. The problems I noted after that walk led to the development of the python script I wrote.

The last problem was the one I had been avoiding thinking about: mounting the GPS on my thick handlebars. The sanctioned mounting kit fits handlebars of one-inch, but mine are larger. After some fiddling, it appeared that I might be able to attach the device to the stem of the bike. Maybe zip-ties could do it?

GPS hack

Yes! And in the event of catastrophic zip-tie failure, the lanyard is secured to the stem so the GPS doesn’t go careening to the ground.

Had I gone the “legit” route, I would have paid:

Garmin Etrex GPS 100$
Data Cable 38$
Bicycle Mount 18$
Software 30$
Total 186$

And that’s not counting the price of windows! (:P)

If I had gotten the Vista, it would have been 250$ for the device plus the same 18$ and 38$ for the mount and cable, plus an optional 117$ for a national map (which, by the way, I can’t get for any price with my eTrex) for a total of $423. That’s a lot to pay for directions.

Instead I paid:

Garmin Etrex GPS 100$
Serial Cable free (from drawer or old mouse)
Out of Date Credit Card free
Zip Ties free (from work)
Total 100$

Which I think is a better deal, even if I have an ugly cable and worry-inducing mount. I bet the map-creation interface is better, though :). You could go even cheaper by getting a used eTrex on ebay or craigslist. I hope to take the whole contraption on the road this weekend. The one big feature I might miss is the “beep on upcoming waypoint,” but the screen is large and clear so that shouldn’t be an issue.

Happy Hacking!

Creating GPS route maps from google maps

This is an expansion of the excellent work done by Mr. Davis at his Open Source GPS HOW TO page. He has a google maps hack here that allows one to make a GPX xml file by clicking on intersections. This is a very quick way to make a route map.

I wanted to expand on his work in two ways:

  1. I wanted to fill in waypoint names for items that were left blank, and
  2. I wanted to automatically check for waypoint name duplication, because duplicates cause data to be overwritten in Etrex GPS devices.

I wrote a python script that does both things. All one has to do now is:

  1. Create a map on his website
  2. Name major waypoints on the map (I like to name intersections using the name of the street I’ll be turning on to)
  3. Save the GPX file to disk
  4. Run [inputfile] [outputfile]

gpxrecode removes the leading number and hyphen from the waypoint name. If the waypoint is blank it gives it the same name as the last one. If the waypoint is already in a cache of waypoints, it adds a number to the end of the name. The cache is maintained between runs of the program, so multiple routes shouldn’t clobber each-other’s names.

Source after the break.

Continue reading “Creating GPS route maps from google maps”