Hackathon recap - Our prolific past few months

METHODOLOGIES

By
Quentin
Vika

April 27, 2018


Each month, we organize a two-day internal hackathon during which WATTx-ers dedicate their time to working on side projects and get a chance to explore new trends in design, tech, and data science. Over the past three months we hacked on many different projects. From Cryptocurrency to a smart autonomous vacuum cleaner and Augmented Reality, here’s what you need to know.


Roombox - making a robotic vacuum cleaner smarter

Pedro’s hackathon idea was to enable the possibility of remotely controlling a Roomba, an autonomous robotic vacuum cleaner. As Pedro only had the basic Roomba in his possession, he found that it lacked some autonomy and smart features that its more expensive brothers possess. As a first step, he planned to add a remote controler to it. To do so, he envisioned using his Xbox gamepad.

During his initial research, he found that Roomba was offering a great API that enables controlling its components, and additionally read all incorporated sensors (such as cliff sensors preventing it from falling, or sensors that prevent it from bumping into other things or allows it to park).

Using a Mini-DIN connector, he was able to jack into the hackport on the vacuum cleaner, and control it with a controller of his choice.

The result was satisfying: Pedro developed a fully controllable roomba via a Xbox remote.

In the video, you can see Pedro presenting his results to the team (which especially excited our office dog!).


Creating a Crypto Portfolio using PWA Principles

During our first 2018 hackathon in January, Omar, driven by his interest in cryptocurrency, built a tracking tool that could determine the average sell and buy price of all ongoing transactions an investor had made.

In the following hackathon, he picked up the project with the plan to convert his portfolio tracking tool into a service that would be consumable via a progressive web app (PWA). Using knowledge he acquired during his work with our Venture Loopstock (also, read Loopstock goes offline) on PWA, he created a basic frontend which would visualize the portfolio values.

The end result is exactly as Omar had envisioned it: a working front end application.


Loopstock goes offline-first

Omar also made further use of his knowledge on PWA principles in order to make the loopstock application offline-first. The initial reasoning behind the idea was that the application needs to be always fully functioning: often, when the loopstock team demonstrates the mobile version to potential customers, there is only poor or no working internet connection at all. This, among other things, leads to images and other static or dynamic content not loading and, thus, failing to represent the full potential of the application.

Applying PWA principles, Omar was able to create an offline-first frontend application for loopstock allowing a stable presentation of the prototype to customers, even without a stable internet connection.


React with reselect and/or recompose

Here at WATTx, our framework of choice is React (with Redux). Many projects has been built using this technology and we are constantly looking into how can we improve our products and further development.

During this hackathon Rafal wanted to explore two libraries, Reselect (1), and Recompose (2). Both of these are mature and very popular amongst other developers and could help the team simplify our products from a tech perspective.

Reselect

Reselect is a selector library for Redux. Dan Parker wrote a very nice introduction for those of you who may have never heard of Reselect before and are interested in the matter.

One of our current projects relays heavily on big datasets. Data manipulation was already happening in a functional way (without mutation being involved) and this is where Reselect could prove itself useful in our use case.

By creating multiple selectors, Rafal was able to achieve even better performance and flexibility. All selectors are composable – they can be combined together (as an input for other selectors). Our code did not only became cleaner, but we also got memorization out of the box.

Recompose

Recompose is a React utility belt for function components and higher-order components. So far, reusable components were always Rafal’s priority when working on a (new) project. Small components are easy to understand and serve one purpose. They are also more reusable than bigger components with a state and conditional render method. Recompose helps you prevent abuse of the setState() method by using Higher order Components (HoC). “Dumb” components can be enhanced with the HoC-function and return new components which could be again enhanced.

Using this approach, he was able to simplify one of the most complex Plot components we got at WATTx (it renders different charts, such as bars, lines, or scatter plots based on different datasets and props). The final solution not only leverages utility methods from Recompose but also creates a very natural “waterfall” components which we were able to reuse in different places without writing a single line of code.


Augmented Reality - Designing an office tour

A strong team composed of three tech and two UX WATTs set out to design and develop an experience using Augmented Reality (AR) technologies. Their goal? To create an office tour using a smartphone or the Vuzix glasses, with points of contacts such as how to set up a printer, room information, or displaying company values on the wall.

After a couple of hours reading up on the topic and getting more familiar with the AR Kit from Apple, the team quickly understood how ambitious they had been and that they needed a smaller focus to get started. They decided to design the WATTx logo in 3D as well as our illustration of a robot, and try to make it appear in the right place at the right time in the office.

The learning experience was great for everyone: the team used common graphic softwares for exporting files in the right format, like Photoshop, Illustrator and Sketch, and further made use of Xcode to position and place the assets in the real world.

After a few iterations, they finally succeeded with displaying the desired items with their smartphones. Unfortunately not in the intended location. The team also went on implementing shapes and indicators for the end user to make it more obvious where and what to search for in the augmented world.

The idea for a next hackathon is to work on positioning the object to its origin, as the main difficulty that was encountered during hacking was the difference between the origin point of the object and its appearance in the real world. It is also the aim of the UX team to design a smooth onboarding experience for the intuitive use of their creation.


Reinforcement Learning

Kostya and Christian, two of our data scientists joined forces to get their hands a bit dirty with reinforcement learning. Reinforcement Learning is a branch of Machine Learning, in which the goal is to master an interactive system of training a model. The model knows nothing about the system except the possible parameters to control it, and it improves through a reward system all while learning under which circumstances certain actions are promising.

As this is a very complex, although promising topic, the two decided to start with some basic tutorial first. Christian worked on the CartPole challenge with the goal to keep a cartpole which is fixed on a loose joint upright as long as possible using a trained model. Christian made use of a deep learning model for this.

Kostya on the other hand worked on the CarRacing problem with the goal to go through a track as fast as possible. His model learns from track images, but it takes a lot of time to training it, leaving room for improving it in upcoming hackathons.


Bitcoin exploration

As WATTx is currently exploring the field of Cryptocurrencies for one of its innovation projects, Blake decided to dive a bit deeper into that matter, not only out of professional but also out of personal interest. This project was merely to gain a better overview on the topic and share it with the WATTx team.

As a beginner to Bitcoin, Blake started out with getting familiar with terminology he had picked up in conversations around that topic: terms, such as address, wallet, blockchain or depth were mostly new to him. Our developer did an extensive reading on the topic first: he went through Mastering Bitcoin, the book available to the public on github, which he combined with the thesis, Bitcoin: A Peer-to-Peer Electronic Cash System from Satoshi Nakomoto (the name used by the unknown person or group of people who invented bitcoin), and created its original reference implementation.

The book Master Bitcoin encompasses information on why Bitcoin became a trend as a cryptocurrency, how to use the coin in the real world, who can benefit from it and most importantly, what the technology behind it looks like. He explains that the rise of Bitcoin as well as Blockchain is not due to the darknet but rather is due to the fact that it installs a new way of trust: a new framework that can be applied in many fields and for many other applications, such as transportation, production or manufacturing.

What’s more about this book is the paragraphs on technology: the thesis about Bloom Filter for fuzzy matching, consensus of nodes to solve Byzantine Generals Problem and the method for creating the difficulties of proof of work are mind blowing.