My wife got me one of those GPS devices for Christmas. I really like it. Actually, I work closely with Steven Pemberton on the W3C Forms Working Group, and every face to face meeting we manage not to get lost because Steven has one of these devices. His talks a bit much and sounds just a little pouty when you don't follow her directions properly, though I think that's just a skin.
Perhaps needless to say, I've wanted one of my own for some time now because I'm pretty good at getting lost. I once took 90 minutes to complete a 7 minute journey-- well, it was 7 minutes according to Google Maps, but my version of "take the first left out of the San Jose airport" occured earlier than their version, and next thing you know, I was headed for LA rather than San Fran.
Anyway, so I visited Research Triangle Park recently for the Forms face to face, and although it is an easy trip from the airport to the hotel, I took my new GPS device along so I could get used to using it before I have to truly rely on it. Well, my plan went slightly wrong in that I ended up relying on it after all.
You see, I had dutifully printed off and memorized the Google Map instructions before leaving the rental car lot, so I knew exactly what I was supposed to do. I knew exactly what script to run. And sure enough, my handy GPS device was rattling off the correct command "Turn right onto Exit 280" when an unfortunate arrangement of traffic prevented me from executing the command. Then something wonderful happened. Without a pout, my GPS device said "recalculating" and next thing you know the device was in control of getting me to my destination.
It was then, when "recalculating" happened to me alone as I hurtled down the interstate somewhere near the speed limit, that I realized what an excellent example this was of the power and efficiency of declarative programming. I had declared my intent to arrive at a location. The rule was: get me from where I am to this location. The device computed the best way to get there. And when a change event occured, then the device recalculated a new sequence of instructions for me to run in order to achieve my objective. I suffered so much less than I did that time in California. It's just so much more effective. It's just so like XForms.