October 13, 2008

GNOME Workspace Switcher

While searching for the Workspace Switcher shortcut keys, I discovered that you can switch workspaces by moving the mouse over the Workspace Switcher applet (in the bottom panel) and then scrolling the mouse wheel.

The following Workspace Switcher shortcut keys don't work when running Debian inside of VirtualBox:


  • Press Ctrl+Alt+right arrow to switch to the workspace on the right of the current workspace.

  • Press Ctrl+Alt+left arrow to switch to the workspace on the left of the current workspace.

I did find a workaround. Open Workspace Switcher preferences in the bottom right panel. Update Show all workspaces in: from 1 to 4 rows. The following Workspace Switcher shortcut keys now work:


  • Press Ctrl+Alt+up arrow to switch to the workspace on top of the current workspace.

  • Press Ctrl+Alt+down arrow to switch to the workspace on the bottom of the current workspace.

Posted by bourea at 07:54 PM | Comments (0)

October 06, 2008

Zip Code Based Search

I developed a Ruby on Rails application that depends upon a geographic search. I thought that a zip code based geographic search would be easy to both create and use. I started with Josh Huckabee's Simple Zip Code Perimeter Search in Rails. Josh's code depended upon the U.S. Census Bureau's zip code data. I included validation in my application to only allow valid zip codes, those contained in the list from the U.S. Census Bureau.

I released this Rails application assuming that the U.S. Census Bureau's zip code data was up-to-date. I had a visitor comment that his zip code wasn't recognized as valid by my application. His zip code was 23608 which was split from 23602 in 1995. The zip code 23602 was recognized as valid by my application but not the zip code 23608. I did some research and found the Census Bureau's position regarding zip code data.

The Census Bureau does not have maps or digital files showing the boundaries of U.S. Postal Service ZIP Codes. The fact that ZIP Codes aren't required to be polygons makes them difficult to map. They are networks of streets served by mail carriers or just individual post offices and are a tool for mail delivery. They also change periodically as required to meet Post Office operational needs. Various companies have created maps by interpolating boundaries between occurrences of ZIP Codes on the ground. However, this does not guarantee that the U.S. Postal Service delivery routes will follow this interpretation.
There is no correlation between U.S. Postal Service ZIP Codes and U.S. Census Bureau geography. This is because individual U.S. Postal Service ZIP Codes can cross state, place, county, census tract, block group and census block boundaries (just to name a few). The geographic entities the Census Bureau uses to tabulate data by are relatively stable over time. For instance, census tracts are only defined every ten years. In contrast, U.S. Postal Service ZIP Codes are designed to meet the day-to-day operational needs of the U.S. Postal Service and tend to change more frequently than every ten years. Because of the ill-defined nature of ZIP Code boundaries, the Census Bureau does not have a file (crosswalk) showing the relationship between U.S. Census Bureau geography and U.S. Postal Service ZIP Codes.

Given the complexity of zip code delineation and the fact that there is no correlation between zip codes and geographical areas why do so many websites depend upon this relationship? There are many expensive services that try to relate zip codes to geographical areas. These services make their own interpretation of the USPS's zip code definitions.

Like so many other application developers I almost fell into the trap of using zip codes for geographical search. I am in the process of refactoring my application to use a different approach for geographic search.

Posted by bourea at 01:01 AM | Comments (0)