There are only 2 bus companies in Singapore. SBS Transit being the largest and whose buses I travel on most frequently.
They released an iPhone app called iris, for poor people like me who cannot afford our own mode of transportation, which we can use to check the time the next bus will arrive at a specified bus stop.
It was frustrating to use. I hated the loading screen which wastes a few seconds of my time. And then I had to spend a few taps to get to my favourites list which I’ve added the bus numbers that I frequently use.
On top of that, there are frequent unknown errors and I would have to try and reload the bus timings again and each load takes a long time to complete.
I happened to learn about the mitm proxy tool from an article that exposed how the Path app was sending user’s address book info in plain text to their servers.
This tool can be used to analyze traffic data between a phone and the internet. So I set it up and used it to analyze the HTTP requests made from the iris app.
It made a lot of requests which explains why it’s always so slow.
So knowing the structure of the data that was sent and received from the iris servers allowed me to write my own web app to get the information I want. And the result…
It worked perfectly. And very fast.
I’ve added it as a bookmark icon on my phone. One tap, it brings me to the browser and loads my web app. Instantly, I’m shown a list of bus numbers that I frequently use. Tapping on the bus number, will load the next and subsequent time remaining till that bus arrives at the bus stop. That’s all I need.
There’s even a short cut to load the timings for 2 buses that I travel on everyday to get to work.
It uses cache.manifest to make the browser cache the jQuery file and the index file, this made loading the app almost instant.
I’ve also added 2 fields at the bottom which takes in the bus number and bus stop number so I can check the bus timings for other buses just in case.
tl;dr: programming and computers are fun.