Ever since the THack Bangalore was first announced, I was eagerly awaiting the 48-hour hackathon to start, as it is the first such travel industry focused event in India.
NB: This is a viewpoint by Salil Panikkaveettil, winner of THack Bangalore. Panikkaveettil works as online marketing analyst at BankBazaar.
Let me take this opportunity to describe my travel hack, business problem, and my experience at the 48-hour coding marathon.
In the THack event, I was trying to solve a problem that affects Indian train travellers at large scale.
The problem
When a passenger books a ticket with Indian railways, s/he can either get a confirmed ticket which guarantees a seat/berth or a waiting-list ticket that will allow the passenger to board the train if someone with a confirmed ticket cancels the reservation.
Given the number of people travelling by trains in India, the waiting list goes to 500+ for busy station pairs. I wanted to build a system that will accurately predict whether the train ticket in waiting-list will get confirmed or not before the departure time.
The solution
I built pnr.me to instantly predict whether a person with a ticket in waiting-list will get a confirmed ticket on the date of travel. PNR number is a unique 10-digit identifier for Indian railways ticket and hence the name pnr.me
I had the idea for a while and was collecting data related to this problem for a week. In the 48 hours, I built:
- REST APIs for communication between the app and server
- Apps for major platforms like iOS, Android, Windows, Tizen, Blackberry and Web OS
Technicalities
I used Python's flask for website server code, bootstrap for mobile aware UI and Mongodb for highly scalable database. The apps were built on HTML5 technology so that it could be available to all major platforms. Phonegap and jquery mobile UI were used to achieve this.
Overall experience of THack
THack is amazing. Not only THack helped me meet industry pioneers but also very talented and motivated developers. I think THack is unique primarily because it helps in finding solutions that make business sense, at the same timt they are technically feasible.
Usually both these qualities hardly co-exist. Kudos to the Tnooz team in selecting judges who provided much insights into the solution's business feasibility.
Also, I think I won the THack primarily because I tried to solve just one problem - uncertainty about travel in Indian railways.
Let me also give you a timeline of what I did in the 48-hour coding window.
Saturday 9:00 AM
- I reached the event venue (Cleartrip's Bangalore office) with an idea to create an Android app for PNR prediction. Lot of questions remained unanswered at this point - what technology will I use? should I just make an Android app? should I make a generic HTML5 app that can be deployed to all platforms?
- Got necessary wifi passwords and other user credentials
- All set for fast development
Saturday 10:00 AMAfter a quick breakfast and one hour of research later, I made some conclusions:
- Having no experience with Android environment, it would be foolish to try, learn and build an app in Android
- My strength is HTML5 and JavaScript. I thought I should ideally work on my strength
- It made sense to build a cross platform app in HTML5 as less development would be needed
- I also met Gene, Karthick and Eshan and shared the idea with them
- I was given a team number - 14
Saturday 11:00 AM- After a lot of confusion between AngularJS and JQuery, I decided in favor of JQuery just because I was familiar with it. Then, I decided to build the app using JQuery mobile as the framework
- Also, I decided to use PhoneGap as the technology to create apps from generic HTML code for specific mobile platforms
- Met the team members of TripThirsty and Findmycarrots.
Saturday 1:00 PM- I was quite pleased with the progress made in the hack - created four static pages which worked well in my browser
- I decided to build an app and test it in the emulator
- Horror strikes: App didn't work as expected. Buttons in the app were not working at all
Saturday 3:00 PM- Decided to pause all development on the app and concentrate more on the server side
- Time to hack on flask (python framework)
Saturday 5:00 PM- All REST APIs except the main prediction was working fine on my local machine
- Finally, I decided to leave that API as it is and push other functions to the main website
Saturday 7:00 PM- All but one function were working fine at the main website
- Then, I was testing the app by making direct calls to the website
Saturday 9:00 PM- Finally, I figured out the bug which caused the buttons not to work
- More rapid development in JQuery Mobile and a basic app was ready
- Then, I decided to fix one function which was not working
- After being refused by three teams for dinner, I finally decided to have dinner all alone. Well, this is one of the disadvantages of working alone in a hack event
Sunday night - A much needed break: Tnooz conducted mini-break events by hosting a 10-minute travel quiz event, winners were given Airbnb vouchers
- I didn't win the quiz event, but I gave the mind a much needed break
Sunday 00:15 AM- After almost three hours of concentrated effort, the prediction algorithm finally worked
- I pushed the code to the main website
Sunday 2:00 AM- Basic app worked!
- The UI looked very basic, I had planned to beautify it in the morning
- Decided to get some sleep
Sunday 2:00 - 7:00 AM- Had an uncomfortable sleep on a bean bag for five hours
Sunday 7:00 - 10:00 AM- Made some UI improvements in the app and took it to a presentable state
- I started collecting some sample PNRs
- Decided to demo both web app and the Android app
Sunday 10:00 AM to 12:30 PM- I was looking at some data points related to Indian railways. Figured out that Indian railways earns $150 million (Rs 750 crores) as cancellation charges and every one in three tickets are cancelled
- Then, I prepared my demo presentation and rehearsed it many times
Sunday 1:30 PM- Deprivation of sleep and food as well as the nail-biting-tension was beginning to show its effects - Migraine symptoms were very evident
- After seeing a lot of teams being ripped apart by the judges, I decided to take a small break and just rehearse the presentation again. I felt very confident after this
Sunday 3:30 PM- Showtime - it was my turn to present my hack
- My demo went relatively smooth minus the minor shaking of hands
- Judges were not ripping apart my presentation, I thought that was a good sign
- A lot of questions were asked by judges and audience about my hack. But, I was prepared for most of the questions
Sunday evening- Judges announced my PNR.me hack as the first prize winner (Rs 50,000 in cash), I was elated and satisfied
- Got a lot of appreciation from other hack teams as well as from judges - that feeling was unforgettable
- To my surprise, Tripfactory CEO Vinay Gupta announced a round the world flight ticket as a gift for the winner (me)
- Met a lot of interesting people who gave quality feedback about my hack
Sunday night- I wanted to attend the travel professionals TMeet and socialize, but my deteriorating health was not of much help
- After a 25 kilometer journey back home, I collapsed on bed with a tired body and an elated mind
Some takeaways from the THack- Solve just one problem
- Always rehearse your demo, it boosts your confidence 10X
- Always play to your strengths, never try to learn anything new during those precious few hours in a hackathon
NB: This is a viewpoint by Salil Panikkaveettil,
winner of THack Bangalore. Panikkaveettil works as online marketing analyst at
BankBazaar.
NB 2:User image via Shutterstock.