The Mobile Weather Problem and its solution

Posted on
Tags: perl, weather, web, cgi

I have Sprint PCS Vision, which means that my cell phone provides a small web browser that I can use to surf the web while on the go. Sprint, in keeping with the fine tradition of phone-company weaselry, has provided its Vision customers with a home page that links to a number of crippled services in order to promote their “premium,” for-pay versions of the services.

For example, Sprint has partnered with The Weather Channel (TWC) for its Vision weather. If you want anything other than the most fundamental weather information, say a radar snapshot of your home’s geographical region, you must fork over $3.99 per month – that’s almost fifty bucks per year! – for the privilege.

Yeah, I’ll be doing that.

Am I supposed to be impressed by the ability to retrieve “detailed” weather information on my cell phone? O Corporate Masters, thank you for solving the Mobile Weather Problem! I hand you my tribute of $3.99 this month with delight, for the value of your technical prowess is beyond priceless. [Opens wallet.]

No, I think that the correct solution to the Mobile Weather Problem is for me to write a small Perl script, which, having just done it, I can say with confidence is a simple task. How hard is it to fetch the forecast and radar image from the National Weather Service and drop the results into an XHTML Basic page? Let’s see, it takes fewer than 150 lines of code, including the code to handle caching and downed NWS servers, focus the radar image on my home and scale it down to cell phone–screen size, and perform text-messaging style word abbreviation.

If I’m going to spend fifty bucks on weather-related purchases this year, it will not be on “premium” mobile-phone services. I would much rather use the money to buy a mighty fine umbrella.

P.S. If you’re curious, here’s my mobile-weather Perl script. It has a few specializations for my geographical region, but it should be easy to adapt to your needs.