Introducing: Hack Street's Back!
Having come agonizingly close to an award at the Hack Manchester 2016 event, Zuto entered a team (entitled "Hack Street's Back") into the 2017 event, hungrier than ever for the prize.
Having been through the challenges (and the prizes) we decided to have a go at the challenge set by GCHQ.
Because spies are cool.
What was the challenge?
The challenge was to develop a new way to send information to the emergency services. This could involve communicating data in a secure or anonymous way, verifying the received information is genuine or interpreting and analysing information so that it provides new insight.
What did we build?
Feeling motivated, we headed down to Zuto Meeting Room 3 (Sandinista), to do some product design. There, we came up with "Beacon". It would be a voice-activated device that listened for a particular keyword and notified the emergency services. There would be a web interface for the emergency services to track outstanding calls, and an app that received a push notification when it was triggered and allowed users to cancel the call.
How did it work?
The device itself is a Raspberry Pi with a USB microphone. Using Raspbian, we set up a long-running process that listened for sound starting and ending, then created a WAV file.
The Pi then passed the WAV file into AWS Lex. We used the speech-to-text functionality within that to pick out a keyword. If it found the keyword, it executed a Lambda function (written in node.js) that orchestrated the data storage and the push notification.
We also added functionality to the Pi to use the GPS chip to get the current location, then enrich the request with this data, via an API Gateway call.
The web UI was written using react.js and used API Gateway to get outstanding calls and delete them. The app could also do the same, using the same API Gateway.
But a picture paints a thousand words, so here's a diagram:
Apart from some early struggles with the Pi itself, getting all these components talking to each other was actually fairly straight-forward. Lex in particular was very easy to get set up working for our simple use-case, and a shout out to the in-built testing framework in the AWS Lambda console, which made testing / debugging the function much easier than I thought it would be.
We also had to make a video to demonstrate our product. Please keep in mind we were VERY tired, had drank a LOT of coffee (and possibly a couple of beers at the free bar the night before), so cannot be held responsible for the quality or content of the following:
The Awards Ceremony
Having been awake for almost 40 hours, 25 of which were spent frantically coding, what we really needed was... more free food and alcohol! So off we went to the awards ceremony...
Hack Manchester is a great event that the organisers put their heart and soul into every year, and the awards ceremony is always fantastic (particularly if you like cheese jokes), and this years was no exception.
So when we were short-listed for the GCHQ prize, we suddenly felt like it was going to be last year all over again, until the winners were announced... Hack Street's Back! Here we are, collecting our prizes of an Apple TV 4K (64GB) and the much sought after GCHQ puzzle book:
Although there were moments where we were getting a little stressed, the whole experience was incredibly rewarding.
In the day-to-day as a developer, your time is spent (quite rightly) planning your work, writing unit tests, managing CI / CD pipelines, all in the name of quality and stability. Having 25 hours to hack something together (that with a bit of luck will work when you show the judges) is good for the soul. Also, getting outside our usual tech stack and trying out things like Raspberry Pi, node.js and various server-less AWS services was really exciting, and a great eye-opener.
If you're reading this and thinking about entering a team for Hack Manchester 2018, then I'd strongly recommend it. Though be warned, we'll be back defending our title...