Why I Wrote Tleave

Why I Wrote Tleave

Tleave.com will tell you which train to catch based on your current stop and your desired destination.

I wrote tleave.com for two reasons. The first reason was to try out a different technology stack. Coming from the Zope world, I felt it was time to find out what the other python based frameworks had to offer. The code for tleave.com was first based on Pylons with SqlAlchemy for the data layer. I wrote a small script using BeautifulSoup that scrapes the existing MBTA schedule. This was done before the MBTA began working with Google Transit. I have looked at the data supplied by Google Transit, but it was not immediately clear how to reuses the data to calculate current schedules. I have since ported the application to repoze.bfg. The port was relatively easy as I was able to reuse most of the work done in creating the data model.

The second reason I wrote Tleave was for my own use. The current schedule provided by the MBTA website is essentially a direct implementation of their paper schedule. The paper schedule works great, it is based on solid information organization principles. However as an interactive application falls quite short.

  • The schedule wastes screen real estate.
  • The schedule should be able to calculate direction (inbound or outbound) and determine whether you are traveling on the weekday or weekend.

See http://mbta.com/schedules_and_maps/rail/lines/?route=NBRYROCK

The app reflects my own use case. Most of the time I really only want to know what are the next trains I can catch in the near future, and I want to figure that out quickly. As I , the layout of the site is optimized for mobile devices.

The MBTA also provides a mobile version of the schedule here:


I don’t find this version of the schedule at all useful. As it is organized by train number (I have no idea what train number I usually take), the end user has to spend a bit of time searching for both time and destination.

Right now tleave.com is running using the Paste server, so even though it is monitored by Supervisor, I need to spend some time to move it to mod_wsgi. Second item on my to-do list is to add MBTA service alerts so the user isn’t patiently waiting for a train that is a half hour late.

Comments !