Hacktrain EU

What an experience! As soon as I heard about this amazing hackathon, I knew I had to participate! Hacking on a train for 48 hours from London to Paris, from Paris to Lyon and back sounded incredible. And it was! It was SO much fun!

Of course, the theme was hacking the rails and this was the hack’s third edition! Organised by Hack Partners, this event is more than just a fun weekend. At the end of the hack, 10 interesting projects get selected and go into an accelerator program, becoming real start-ups in less than a year.

Two amazing examples from last year, include Busybot and Vivacity. The first one is integrated in the trainline app and allows customers to find where empty seats are on a train so that they can wait next to that coach. A very convenient feature for peak hour commuters. Vivacity, on the other hand, is developed by a group of Cambridge graduates and offers state of the art video analytics. With the use of machine learning it can also predict numbers of people at a station, boarding or alighting the train, queues at the ticket office and so on.

This year, each sponsor provided challenges and data sets for the participants. Out of 600 applicants, 80 hackers were selected to take part and we were split between 2 trains : HackTrainUK and HackTrainEU. I was lucky to go on the EU one, having the opportunity to see my beloved Paris once more (if only for a few of hours). The four main sponsors were Arriva, Eurostar, TfL and SNCF, joined by EY, BAE systems, the Department of Transport and many more.

Our journey started at St Pancras, taking as in.. wait a minute.. Business Class!!! to Paris. It was amazing! As the teams were already formed, this 2 hour trip offered us the chance to brainstorm ideas and organise our projects. I was really surprised that as soon as we entered France, the train’s speed reached 185 miles/hour. It was crazy!

I was part of a team of 3 hackers and we chose to focus on allowing train companies to improve their communication with clients during disruptions. Helping them to also store and make predictions for future events regarding the number of passengers impacted by such events.

For this, we used TfL’s data set from the Tramlink service, where they use door sensors to count how many people board and alight the trams at each station. This was great for us and we managed to mine the data and observe patterns of commuters and periods when trams are disrupted and how many people are on those trams, as well as how many people are waiting to board at next stations. These are some screenshots of our prototype, which will allow the train controllers to view the passenger data regarding each train passing a station.

Screen Shot 2016-11-10 at 09.55.54

Screen Shot 2016-11-10 at 09.55.20

The winner of this year’s edition was FlexiRail and they developed an app that allows users to opt for flexible train times so they’ll be offered a ticket on the most convenient route to avoid overcrowding. Runner ups, AutoMapr, tackled the most technically challenging data set, the LiDAR data, offering machine learning integration for visualising train wires. What they managed to do in 48 hours was amazing! The topic is usually one for research groups at Princeton University.

The weekend was packed with amazing ideas, people and stories! I would strongly encourage other people to join the Hacktrain next year as it truly is a unique hacking experience!


Facebook Hackathon

This weekend has been an amazing experience! 24 hours of non stop coding and fun. The Facebook team offered us the most amazing time, with great food (all the time), drinks, snacks, music and raffles, everything you ever wanted.

I met my team on the day and we quickly brainstormed ideas before the hack officially started around 12:30 on Saturday. I was very keen on developing a project for social good. So I researched before the hackathon the internet.org initiative and their commitment to make Internet accessible to everyone in the world. Their guidelines for developers suggested eligible apps should not include rich data such as video, high resolution images or anything that would require large HTTP responses. As a result, we thought, what is text only and awesome? Code!

So we decided we should make an app to teach children in developing countries to code by sending them short challenges that they could solve, either via the mobile app or offline, through text messages. So if you would send a piece of code in a text message, it would compile on the server and a reply would be sent with the output of your code or an error message if something wasn’t right.

For that, we thought we should create a new programming language, easy to understand for children. We called it Lilo (from Lilo&Stitch) and it complies to Python on server side and also maps to JavaScript on client-side. We thought of a funny and childish syntax for our new language. A variable would be a box, since you can store “things” in a box. Boxes will be labelled with names, just as a normal variable, will be manipulated and they would be able to store any type of object – numbers, strings, boolean values etc. Boxes are also resizable and can store more than one object. In terms of commands, to output something we defined say ‘..’, as a natural command to allow your code to say something. Instead of functions, we decide to call them dogs. A dog is usually called and can return something you’ve instructed it to. A dog knows how to do only one thing and when required, it “fetches” you what you need in your program. Moreover, a dog is happy to get called by you anytime you need it. Loops and conditional statements would stay the same in Lilo, while a line end will be marked by a dot, as it is easier to type in a text message than a semicolon.

The Lilo to Python compiler was written from scratch during the hack. For the SMS processing we used Twilio, a cloud service that handles this sort of interaction with the server. We’ve tested the system from multiple phone numbers and it always works, just like in my screenshot below. The hashtags #bc and #ec just stand for begin code and end code, needed in parsing the content of the text message for testing purposes.


On the frontend side, when Internet was available, we created the Ionic app, with a simple interface for 9 basic lessons and Facebook authentication. Since it addresses children, we also integrated a story, based on Facebook’s sticker character, Biscuit. It would teach children how to code through funny stories. For example, to explain the loops, we imagined the student and Biscuit are playing hide and seek, so the student had to come up with a program in Lilo to count form 1 to 10. When we introduced box assignment, we said Biscuit is giving the student 2 boxes and they have to fill them in with their name and phone number and label them so that they won’t forget what’s inside. The code would be syntactically checked in a live code editor inside the app, CodeMirror, based on JavaScript. Also, the code was mapped client-side from Lilo to JS, so little to no server-side requests had to be made.

In addition to all this, on the app’s Facebook page, users can post a snippet of Lilo code and receive the output of the compiled code as a comment to their post. This is making use of Facebook APIs and scrapes the page for new Lilo code posts every 30 seconds.

Screen Shot 2016-03-14 at 14.13.16 (2)

Even though we didn’t win the hack, it was amazingly fun! My team was purely awesome and we had a great time hacking and sharing stories! The winning team developed a new Terminal experience for developers, enriched will all sorts of new features.

The project is available on GitHub and you can access the app here (it has bugs, we know, but it’s a hack!). Here are some screenshots and photos I took during the hackathon.

Screen Shot 2016-03-14 at 13.48.39 (2)

Screen Shot 2016-03-14 at 13.49.37 (2)

Screen Shot 2016-03-14 at 13.54.56 (2)






The aftermath:


The team:



Christmas Hackathon

Yey! Bing’s London office organised in December a 3 days Christmas Hackathon. There where 5 main prizes to be won and luckly, my team won one of them – the best end-user value award!

Shiny and beautiful, this award hides a lot of work to make sure a working prototype is created while facing the constraints we had. This was the second hackathon I ever took part in. So even though I had an idea, I couldn’t find the courage to belive I would be able to do it. This is where the team jumped in. People in the office told me I should definitely pitch the idea. So I did pitch it, and there I was, on the first day of the hackathon with a team of 4 members – 2 developers and 2 program managers.

My idea was to include a maps answer in Bing’s Page Zero experience. As soon as the user entered an address or a location nearby, they would see a prewiew pane with the detailed address and the map, right next to the autosuggest list. Clicking on the map, would lead the user to the more detailed Bing Maps page. I think this would be a very nice project that would enable users to get the information they need faster. Who knows? We might see it implemented sometime in the future!

I would really like to thank the team again for believing in my idea! We have built a wonderful project together, having an extremely rewarding feeling of seeing the map loaded in Bing’s autosuggest. I have personally learned a lot, too, by having to interact with the back end data. It offered me the chance to have a high-level overview of some relevance algorithms and see examples of how data is being passed on to our UX team.