Designing Smarter Train Tickets at HackTrain VI | Nathaniel Read

Designing Smarter Train Tickets at HackTrain VI

Trains, train delays, scary SOAP APIs, coffee and zero hours of sleep were just a few of the things that I experienced last weekend when I took part in my first ever HackTrain hackathon; it was three days of excitement, adventure, chaos and code.

So what is HackTrain? It’s a hackathon spent, unsurprisingly, on trains, with a focus on looking at how the rail network can be improved; with a cohort of 80, using teams of different backgrounds from across the globe to brainstorm and rapidly prototype new ideas and concepts. Now in its sixth iteration, our hackathon had a focus on ‘putting passengers first’, with all of the challenges having some emphasis on improving customer experience across the network.

Day 1: Hello London

Up bright and early, I jumped on the train down to London for the hackathon’s grand opening at St Pancreas Hotel and met up with Harry, a #hullCSS alumni and now Microsoft Engineer. The opening event was led by River, the hackathon founder and leader and Andrew, the Chief Executive of Network Rail.

We had a host of speakers from the rail industry, each pitching us their challenge areas for the hackathon, with ideas including everything from reducing network delays to modelling digital twins and developing intelligent chatbots. We chose the latter solution and pitched it to the audience, trying to gain support for the idea and find our third member!

Everyone got an opportunity to pitch their implementation of an idea, and around 45 people did. After pitching finished, teams had to convince audience members to give you one of their three stickers, and collect the most stickers not to be eliminated! After surviving the brutal team elimination and with 26 surviving teams; we found Ava, our third member and back-end developer to complete our group.

HackTrain pass, a man with Thanos's hand guiding to the station and Harry coding

After team formation, we grabbed our travel wallet with the tickets we needed the weekend and followed Thanos (see image for context) across London to Waterloo, where we’d wait for our delayed train down to Plymouth. On the train we discussed our hackathon plan for the weekend, and when we eventually arrived, set up for the night in the Village Hotel, ordered some drinks and got to work planning our core infrastructure.

After planning how our services were going to work, we headed to bed as we knew it was the only sleep we’d be getting over the weekend.

Our project was decided to be a chatbot that will allow you to cancel and exchange tickets using natural language, as well as suggest alternate routes if your train is cancelled for you, or find you an alternative method of travel.

Day 2: Home of Computing and Rail

Up bright and early, we stacked up on our breakfast before the busy day ahead of us and headed to get our train over to Network Rail’s Basingstoke Campus, an operations and training centre. After going through a lengthy security process to get into the building, we saw their test-track and got to work in one of their meeting rooms.

We had a great lunch from the Taco Van at to power us through the afternoon. After a question and answer session and test-track demo from our Network Rail mentors, we headed on a coach over to Bletchley Park, determinedly programming through the motion sickness.

HackTrain pass, thanos and Harry coding

We grabbed our table at the National Museum of Computing and set up for the evening of code ahead, once again fed well by the fresh burgers served for tea, and with the wraps at midnight to keep us powering through the night.

As the night progressed, Harry continued working on his project, implementing Microsoft’s Bot Framework to understand and learn from interacting with users. Ava continued to wrangle the unusually configured SOAP API provided by SilverRail, as I continued to develop our rerouting tool and get it to find alternate walking, train and underground routes to get people to their destinations.

We headed to Dragons Den at 11pm to pitch our idea and progress to a panel of mentors to get their feedback so far, we got really positive impressions from them, spurring us on to keep working through the night. We hit a roadblock with API security implementation around midnight, and all worked together to find a solution and unblock development.

Harry, Nathaniel and Ava team photo

As the hackathon numbers dwindled, as more and more people headed to bed, we decided to plan our next steps. I became the scrum master, and we held our first standup at midnight and then every hour through the night. We found a room that nobody was sleeping in and discussed our progress so far, any blockers on our tasks and estimated how long their completion would take before we moved to implementation.

As the most significant part of the project, we divided up the work on our API conversion layer (from SOAP to JSON REST), and both Ava and I kept building the APIs as Harry consumed them and trained his bot on potential cases they may be used.

Throughout the night Harry would ask people to find the most awkward phrasing of a question they could, as we worked to train his bot on every edge case and get the highest answer confidence scores we could.

Day 3: Code Faster and Pitch

As the sun started to come up, there was a pile of empty Red Bull cans on the table and a lot of commits. We’d successfully implemented ticket cancellation and were working on exchange. We had to head over to get the train to London, so we paused work and packed up.

Train delays weren’t going to stop us from finishing the app in time! When we heard that our train from Bletchley into London wasn’t running on time, we nabbed the first bench we could find at a station, jumped on to Harry’s hotspot and kept committing. As we headed over to Fujitsu’s Headquarters, I worked on the presentation for later in the day, as Harry polished off bot implementation and Ava worked on API changes.

Last Minute Coding

As soon as we got to Fujitsu’s headquarters, we were pulled to one side for our code review, the part of the hackathon where the sponsors check your code calls the APIs you say it does and that your implementation ticks all the boxes. We passed and impressed the judges, then heading to grab a quick lunch while Harry prepared his speech for the presentation.

Then came the big moment; we had to pitch in front of the audience. Harry had only four minutes to convince the judges on our project, and be selected to go through to the next round of the judging. We made it into the final six teams and had to be ready to present again, grabbing another Red Bull and biscuits between, we prepared for the final showdown.

After presenting again, and giving the audience a live demo of our platform in action, we got some great feedback from the judges and some really positive encouragement on it. Both the developers and the challenge setters from SilverRail were also impressed with the product that we created.

Overall it was an exciting weekend, and it was really cool to see what the other teams had been up to throughout the hackathon too, from modelling point clouds to helping passengers request assistance with web apps. I had a great time working with Harry and Ava and was really pleased with the end products we managed to produce in such a short amount of time.


Harry also has a blog, it’s available here.

You can read more about how the solution worked on its project page here.

  Some photos and HackTrain branding used courtesy of Hack Partners, All Rights Reserved. Other energy drink brands are available 😉.