admin's blog

Using Google Maps with the Garmin Zumo 660

One of the best things about motorcycling is spending a nice day exploring twisty back roads far from home.  One of the worst things is getting lost while running low on fuel and being clueless not only about where you are but where to find gas.  Fortunately, technology comes to the rescue again with a variety of water-resistant GPS units built especially for motorcycles.  Last week, I became the owner of a Garmin Zumo 660 GPS.  I also purchased a bluetooth headset kit for my helmet so I could hear the unit.

After a rocky start, which included trying to charge the Sena SMH10 bluetooth device through the MP3 port (doh!), I spent a couple of rainy nights familiarizing myself with the Garmin.  It's an impressive device, as it should be with a retail price over $700.  But it had one very disappointing handicap: it can only import route sheets from Garmin's MapSource software.  Not only do Google, MapQuest and Bing Maps make MapSource look like a relic from the Windows 3 era, MapSource is only available for Windows, not my Mac.

Yes, the Garmin will let you import destination points from the more popular online map vendors but the Garmin will construct the route for you.  That's fine if you want to get to Point B as quickly as possible but I usually don't want the fastest route.  I usually want one of the least efficient paths -- one which will take me through small villages and across covered bridges with a stop at my favorite hot dog stand which may 20 miles off the optimum route the Garmin creates for me.  (For instance, my favorite route from Washington, DC to NYC is through West Virginia's Monongahela Forest).

tags: 

Tip for restoring a deleted Applications folder from the Dock

A lot of my blog posts are Post-Its for my own brain.  So is this one.  I've managed to accidentally drag my Applications folder to the trash twice now and both times I had to wade through a half dozen non-optimal solutions on the web to find the one that actually restored it to what I had before.

In OSX 10.6 it's actually pretty easy, if not very intuitive.

Database Meets Revision Control

Any developer who has worked with HIPAA compliancy knows that the law is murky at best and the fed doesn't publish a programmers' guide to make your life any easier.  However, one of the cardinal rules is the requirement to keep track of who sees HIPAA data, who modifies it and when this was done.  Failure to do so can subject a company to some pretty draconian penalties.

Database: Returning latest/highest record from a set of records

A common reporting requirement in database applications is selecting the latest purchase, or latest job, or oldest chlld for each person in a table.  Any beginning student of SQL knows how to return the most recent date in a table:

SELECT MAX(rec_date) FROM sales;

              max
-------------------------------
 2011-03-15 18:04:45.178057-04
(1 row)                                                           

But that doesn't tell us which person owns that record.  We can do this using a sub, or nested, query on the same table:

SELECT cust_name FROM sales WHERE rec_date = (SELECT MAX(rec_date) FROM sales);

  cust_name |          rec_date
------------+-------------------------------
 Dwight Schrute       | 2011-03-15 18:04:45.178057-04
(1 row)                                                 

This could return multiple records with the same rec_date.  But let's say we're not interested in who owns the most recent record.  Instead, we want to know the latest record for everyone in the table, such as the last sales date for every customer. Here's one of the possible solutions for that:

Pages