How to say ‘thanks’ in a very geeky way

Karol Wieczorek
Tooploox
Published in
6 min readAug 22, 2017

Recently we participated in an internal hackaton at Tooploox. The event began by choosing the 5 most interesting projects and splitting into teams responsible for each one of them. We (Jeremi, Sebastian and Karol) are iOS developers on a daily basis. Only one project (A VR game described by Asia on our previous post) didn’t contain some mobile app, so we could join any team we wanted. We thought about trying something new, something what we don’t know well, or don’t know at all. So when we heard that our colleague, Bartek needed some backend and tvOS developers we didn’t hesitate and decided to help him. Finally, our team consisted of Bartek — our originator and designer, Magda — our woman of special tasks and Swift apprentice, Sebastian — tvOS developer for the first time and Jeremi and Karol — iOS devs who wanted to try their hand at writing backend.

What is Thanksy?

Thanksy is a small app, which helps people from Tooploox to say thank you to others. In our company, we thank for many things, starting with very little ones, like making delicious salads for breakfast to much bigger ones, like preparing a conference. Our app has to meet some additional requirements:

  • It should be as simple as possible — we don’t want to think how to thank someone, we just want to do it
  • Showing appreciation should be fast and convenient — we want to have very easy access to the place where we can thank someone
  • Everyone should be able to join the thank you note — there are many cases when more than one person wants to thank someone for something, so it should be easy for others to join to thanks
  • Thanks should be shown in some nice and eye-catching way — the more people see our thanks, the better

With that requirements in mind, we started planning our app. First of all, we needed to choose technologies we would use.

Thank you for everything, everywhere

We kicked off by looking for a tool that would allow us to give thanks in a simple and fast way. Fortunately, everyone at Tooploox uses Slack, so we decided to create Slack command for that. The command is really simple and it looks like this: \thx @bartosz.bak for great designs. Really simple, isn’t it?

This solution has one more big advantage — other people can respond to Slack message using buttons attached to it, so everyone can express his/her appreciation.

Under the hood

As I mentioned before, we didn’t have any backend engineer, but we had two guys who wanted to learn something about it. Since Jeremi was the only guy with any experience in building backend software, he was the one to choose technologies. So, we started developing our first real backend using Flask — one of the most popular web frameworks for Python. As a host for our backend we used Heroku. Technical details of our application weren’t probably very interesting for an experienced backend developer — it was just PostgreSQL database with a few endpoints for communication with Slack API and tvOS app. What **was** interesting is the knowledge we gained about how such applications work and what the differences between developing frontend (mobile, tv or web) and backend apps are.

First of all, the approach to development is completely different. When you develop a mobile app, you have a strongly typed language (Swift, Java, Kotlin or Objective-C) and a compiler which catches most of your simple mistakes. You don’t need to care that much about names, because if you make some typo, the compiler detects this and stops you from running a code. In Python many concepts are based on conventions used by the whole community, rather than some strict rules forced by a framework and compiler. Initially it was very challenging for us to get used to it.

But it does have some advantages. The biggest one, in our opinion, are the tools available for Python backend development. Do you want to decode/encode JSON data? No problem, we have jsonify library. Or maybe you want to save some data in SQL database? Just use SQLAlchemy, define models and save the data in two lines of code. Flask frameworks are great. But not only that. There are also some other tools used in backend development which helped us a lot. Our favourite is ngrok, a tool which allowed us to test communication with Slack locally, without the need of continuously send our code to Heroku server.

Besides this, we found out that problems backend developers came across are very different than ours. For example, in our front-end world we rarely take care about data. Very often, we just show them on a screen and then they are gone. On the backend side, taking care of data is essential. You need to prepare your database carefully to be able to get your data in efficient way. Then, you need to take care of safety and consistency of this data. Another problem is running the code in a remote environment. When you develop an iOS app, you have your device on your desk (or even simulator in your laptop), you hit “Run” button and voilà, you can test your app. But if you develop a backend application, you need to deploy it to the server, take care about your remote databases etc. At first, it was a a bit of a problem for us to get used to it.

Let’s see who thanks you

One of big questions for this project was what technology to use for making TV application. The initial idea was to just create a web application and use Raspberry Pi or any other device capable of opening such app. The only problem was that we wanted to have a way to control the app with a remote. It’s of course possible to do that on Raspberry Pi, but it’s a bit harder to restrict the remote only to web browser. That’s why we decided to go with 4th generation Apple TV — it supports 3rd party apps (which can be written in our beloved Swift!) and has a remote which allows to control the app. None of us had any experience writing apps for tvOS so we were eager to try writing something new in Swift. ‘Unfortunately’ it turned out writing tvOS apps is almost the same as writing apps for iOS. We were both sad and happy, as it wasn’t a big challenge, but allowed us to move fast and use almost all the experience from iOS development. We even made some experiment and switched the project
from tvOS to iOS and all the code compiled and app worked fine (besides UI which wasn’t suited for iOS devices). Of course there are some differences between both platforms. tvOS is controlled with a remote instead of touch screen, so there is a difference in interacting with controls and the view on the screen. The main part of it is the focus engine which manages how focused views (focused view is the view which can be interacted with at a given time) change.

The app itself contains the main screens:

  • screen with a list of previous ‘thanks’ which also displays new thanks modally
  • screen which displays statistics — who got most thanks, how many people thanked in total, etc.

Try something new!

To be honest, we hadn’t had so much fun from programming for a long time. Hackaton is a good time to make your ideas come true, mingle with people, who you usually don’t work with, but it’s also a great way to try something new, learn new things and find out about problems your colleagues from other teams face.

We would also like to encourage you to check our dribbble shot, you can also find there better quality images and video as an attachment.

Originally published at Tooploox.

--

--