I was driving home about two weeks ago when I realized that I never check my gas site to see what the price of gas would be the next day in the GTA before going home. This wasn’t the first time that happened, and its difficult to solve since I don’t have a data plan nor are you allowed to play with your cellphone while driving!
It had been in the back of my mind for awhile to incorporate Twitter into my gas site somehow, but I was thinking that if I just tweeted predictions, it would be information overload. But as I was thinking about my current predicament, I realized that I could boil the problem down to a simple solution, I just needed notifications when the price of gas is going up tomorrow. I didn’t care if the price of gas was staying the same or going down the next day because I could still fill up tomorrow without any loss!
I set out to build a little Twitterbot that would do this, similar to my twitterbot to tell me the Leafs scores. Whenever the price of gas would go up the next day, I would get an SMS notifying me. Eventually I realized that, because I had to poll for the prediction, and then my twitterbot code had to poll for the fact that I now had a prediction, and then update Twitter on a delay; that by the time the notification reached my phone, I could be at home already! Instead I used the Twitter API and created a Twitter App to post to Twitter directly after I have a prediction. Now you can get notification around 5PM everyday if the gas price does go up.
The final problem I’m struggling with is that I want my to be available to people who don’t have or don’t want to use Twitter. I looked around for free SMS gateways but they’re either not reliable or free. I guess I am stuck with the Twitter infrastructure, but it really is good. My phone signals that I have an SMS while I’m waiting for the page to reload after a tweet!