One Engineer’s Clipper Card Hack – Next City

One Engineer’s Clipper Card Hack

For all the highfalutin talk of urban innovation going on these days, it can be difficult to grasp what these concepts actually look like in practice. One tiny example from San Francisco’s public transportation realm helps flesh out what we talk about when we talk about civic hacking.

Anthony Wu is a Bay Area engineer and co-founder of LearnSprout, a data analytics start-up that focuses on building APIs* for K-12 education. Wu was poking around on the website for Clipper Card, the Bay Area’s contact-less universal transit card launched in 2010 that works much like London’s Oyster Card and Washington, D.C.‘s SmarTrip. Using the Clipper Card to board buses and the like, Wu says, is a fine experience. But when he looked at the program’s online existence, he was horrified. “Not only is the clippercard web site a total UX/UI disaster,” he wrote on the code sharing site GitHub, “its behind-the-scene’s HTML structure and HTTP protocol is a complete exercise in palmface.”

Since he was “having a motivated Sunday,” Wu tells me, he “parsed the clippercard.com website for the relevant information much like how Google would crawl the web to index website content.” He packaged up his work and posted it as open-source code on GitHub so that anyone might use it to build better Clipper Card apps and interfaces. He called it an “unofficial but sensible” Clipper Card API.

Wu says that the wants driving the API’s initial creation were simple enough: “Why isn’t there an official Clipper Card iOS/Android app that lets me view my balances on the phone, and refill balances without going to the fare machine?” But digging into the code got him thinking. Could you build a way to connect Clipper Card to, say, Mint.com so that you could tie your budget to the cheapest transportation routes? Also, why aren’t more smartphone makers using “Near Field Technology” so that our phones could be used as contact-less transit passes?

Building the API was fun, Wu says, and “if for nothing else, these exercises help me become a better software engineer.”

Wu says that he hasn’t heard from anyone at Clipper Card. He imagines that what he is doing with the site goes against its terms of service, but says that “now that my code’s in the open they cannot make people unsee it.” If they tell him to stop or block access to the data, “I will be publicly vocal on principle,” he writes. Best case, the Clipper Card people build their own, supported API for everyone else to use. That’s the bigger point, really, of a small “civic hack” like Wu’s: Folks with a free afternoon can take up the task of showing how systems should work.

* An API, if you’re not familiar, is a Application Programming Interface, or a standardized framework through which separate software components can communicate.

Nancy Scola is a Washington, DC-based journalist whose work tends to focus on the intersections of technology, politics, and public policy. Shortly after returning from Havana she started as a tech reporter at POLITICO.

Tags: public transportationtechnologyshared citycivic techbay area