The Art and Business of Programming
By: Nikica Jokić
Tags: Agile Methodology, Hackathons, Backend Development, Agile Development, DevOps

The Art and Business of Programming

I would suggest most of us love “the art of programming” in and of itself (at least developers working with Very Big Things do). Yet sometimes, bogged down by “the business of programming” — the deadlines, the changing requirements, the sprint planning meetings and all the other necessary evils of software development — we tend to forget that fact. And although every developer here at VBT is a hard working professional, we all need a reminder from time to time that most of all, we love to build stuff.

That is why we organized a team-wide hackathon. The idea was — let’s try to build and ship three simple products in two days. We seized a window of opportunity in-between client projects to boost morale and channel the inherent creative energy of the team, learn new tech, and bottom-line, have fun while building stuff.

The ideas

For any software project to be a success you need a clear set of well-defined requirements and a reasonable scope. It’s not much different when it comes to in-house hackathons, but an important difference is — you’re your own client. This means that the product team itself is responsible for defining the set of features for the product they are trying to build.

That’s why the day before the hackathon was about to start, we held a kickoff meeting. The 3 product teams sat down and outlined the scope for each of the mini-products we were trying to build.

The products were:

1. Parking bot

The first problem we wanted to solve was access to the parking lot in front of the office building. We only have 6 or 7 spots available and 30 people working in the office, so a coordination system of some sort was needed to help with the decision whether to risk using your car for the commute or not.

The idea was — before leaving for work in the morning, you can ask the Slack “Parking bot” if there are any spots available, and how many. It responds with a number of free parking spots and the picture of the parking lot.

2. Office jukebox

The second problem we wanted to solve was a way for everyone to contribute to the office atmosphere by enabling shared access to the office speakers. We wanted for everyone to be able to play a track on the office speakers without having to plug the speakers in.

The product amounts to a simple dashboard where people can share Youtube links and the jukebox adds the track to a shared queue and plays the track for the whole floor. The jukebox runs on a Raspberry Pi and is available from the local network (exposed to the public internet via ngrok). Before adding tracks to the queue, users need to sign in via Github. Once signed in, users can add tracks and can vote on the tracks already in the queue. If a track falls below 0 votes, it is removed from the queue.

3. Cheeser

The last project was more of a hobby project than an office problem, but since it was an interesting problem to solve, the team wanted to tackle it on the hackathon as well.

We wanted to build an app that can monitor and control the basement humidity and temperature for making home made cheese. Or at least, that was the end goal. The first step was to build an app that can track room temperature and humidity across time.

The idea is to measure these parameters across time to determine if a room or a basement is suitable for cheese making at all, and during which period of the year.

The tech

An additional side benefit of the hackathon is the fact we got the chance to explore new and exciting tech.

A lot of exciting stuff is happening within the Elixir community. Phoenix LiveView has recently been released and the Nerves project has been in our sights for quite some time now.

Phoenix LiveView

Phoenix LiveView is an exciting new library which enables rich, real-time user experiences with server-rendered HTML

This basically means that you can build React-like components on the server side, with all the niceties component based UIs bring to the table like component state and lifecycles, DOM diffing etc. More information here.

Nerves project

> Nerves is the open-source platform and infrastructure you need to build, deploy, and securely manage your fleet of IoT devices at speed and scale.

Nerves provides the infrastructure to develop, deploy and update IoT applications using Elixir. For now it supports Raspberry Pi and Beaglebone devices, and it simplifies over-the-air updates by using a central “NervesHub” (similar to App store) where you can push new versions of your app.

Excited by the tech we were about to explore and three products defined we kicked off the 2 day hackathon at Thu, Oct 10th at 9 AM.

The results

All three teams managed to ship at least a part of the planned features.

Parking bot results

The Parking Bot team managed to get the whole pipeline working.

A Nerves-powered Raspberry Pi device that takes pictures of the parking lot and uploads the pictures to blob storage

An Elixir backend that pulls pictures through Google’s Vision AI to process and analyze the content and update the state of the parking lot based on results

A Slack bot that can pull up the state of the parking lot and present it to users on Slack

The only part that is missing is a camera mount that would provide continuous power and network access to the Raspberry Pi device (camera). Granted, it is a very important piece of the puzzle, but a piece that we have a solution to and are working on.

Jukebox results

The Jukebox team managed to build a simple prototype of the initial idea.

A web app where users can paste Youtube links after logging in via Github

A Youtube downloader that pulls the audio stream from Youtube and stores it to temporary storage

A playlist manager that allows upvoting and downvoting of tracks in the playlist (thereby moving tracks up and down in the playlist)

The only important feature that the team was not able to finish was the auto-boot of the app on the Raspberry device and making the app available under a local domain (although the team managed to finish those important features in the meantime).

Cheeser results

The Cheeser team managed to get the sensor device up and running and managed to integrate the sensor device with a backend that ingests temperature and humidity data via a REST API. The team also managed to render the data on a time-series plot, although that part of the product is in dire need of a facelift.

There was talk about integrating an old fridge with the Raspberry device. Although the idea itself was simple — simply plug the fridge into a socket controlled by a solid state relay — there was simply no time to complete that part of the product.

GALLERY

Conclusion

All things considered, this hackathon was a huge win in our book.

It checked all the boxes we planned:

we got to play with new tech,

we worked in highly creative and collaborative way,

everyone had a good time

we have something to show for it!

It was so fun that we plan on doing it again as soon as we can. Moreover, we have plans for including other creative teams in VBT (designers, marketers) and building a prototype of an actual product!