09 Dec 2012

The tech behind getting Blizzalert into its third season


I've re-launched Blizzalert for its third season!

Blizzalert is a web service that provides snowfall omniscience via SMS. It monitors the weather at over 400 mountains across the United States, keeping track of snowfall. You select which mountains you want to watch, and Blizzalert sends text messages letting you know how much snow is coming, where, and when - all before it happens. I wrote a bit about the internals in my post Never Miss New Snow With Blizzalert.

This re-launch is exciting, because I've completely re-written the site & service. It's now a Ruby on Rails app, and I'm using Foundation to make the site responsive - it looks great on desktop computers, tablets, and phones.

Blizzalert still uses the National Oceanic and Atmospheric Administration's API to monitor the weather at all of the areas, and it still uses Twilio to send text messages to customers. The rest of the site is completely overhauled, because of my migration from PHP/CodeIgniter to Ruby on Rails.

I was able to use a number of Ruby gems to make development easier. Here are some of the gems that were particularly helpful, and how they helped:

  • airbrake
    Send your application errors to our hosted service and reclaim your inbox.
    I'm using the airbrake gem, and sending all of my error logs to my own instance of Errbit that I've got running on Heroku. Errbit is indispensible for running Rails apps - use it or something like it to make error handling in production a snap.
  • combined_time_select
    Generates a time_select field like Google calendar.
    This was pretty useful for creating a nice form for time input, which I need to give people a way to choose their earliest blizzalert time.
  • newrelic_rpm
    New Relic is a performance management system, developed by New Relic, Inc. New Relic provides you with deep information about the performance of your web application as it runs in production. The New Relic Ruby Agent is dual-purposed as a either a Gem or plugin.
    If you're building/running a site, you need to be using New Relic. The visibility into your app/server that this service provides is amazing, and web developers are blind without it.
  • phone
    Phone number parsing, validation and formatting.
    This was really useful to normalize all phone numbers coming into Blizzalert, and for displaying them nicely on user pages.
  • stripe
    Stripe is the easiest way to accept payments online.
    I still can't get over how easy it is to use stripe. At this point, I wouldn't consider another service to accept payments oneline.
  • stripe_event
    Stripe webhook integration for Rails applications.
    By adding this gem, I get to handle stripe webhooks with simple blocks right from the initializer file. It would have been much more time consuming to handle all of that on my own!
  • twilio-ruby
    A simple library for communicating with the Twilio REST API, building TwiML, and generating Twilio Client Capability Tokens
    This gem made Twilio integration easy.
  • whenever
    Clean ruby syntax for writing and deploying cron jobs.
    This gem allowed me to easily add/modify cronjobs right from the Rails app. I don't work with cron directly, any more. Now, I just edit the whenever's configuration file & capistrano handles the rest during deploy.

Tags

api blizzalert noaa ruby ruby-on-rails ski ski-area sms snowboard snowfall stripe text-message twilio weather

Related Posts

17 Dec 2013 Donoku
28 Dec 2012 How to make SublimeLinter work with Ruby & RVM
03 Nov 2012 Little-Corner is now a Heroku-ready Rails app
14 Oct 2012 Sip as a replacement for Pick as a replacement for Digital Color Meter in Mac OS X
08 Oct 2012 Launch Soon is a Heroku-ready viral Coming Soon page