8 hours later + Turku <3 Frontend Hackathon

Turku❤ Frontend is a community of (mostly frontend) developers in Turku region that was started in December 2015. Between September and May, we organize meetups at local companies’ offices with talks and beers and during the summer break we just finished our first hackathon.

DSC_0030_2Bringing local developers together for a sunny summer day in August was the perfect start for my holiday. We decided to have this year’s theme as location as it’s the hot topic right now with the blooming success of Pokemon Go and IoT. We set the timer to 8 hours and started hacking – some with teams and others alone.

It fascinates me how amazing things people build in such a short time. A “regular” length hackathon of 48 hours is a race against the clock and the human limitations of staying awake and productive. With only 8 hours on the clock, one needs to cut every corner and simplify over and over again to be able to build the prototype for the demo session.

Today we saw a web application to benchmark different neighborhoods based on the statistics such as median income, average age and unemployment rate; a location-based King of the Castle inspired by Pokemon Go; a map to display Instagram videos near your location; location-based messaging system where you can leave pings and messages to others; and my solution, Lähipubiapp (Finnish for near pub app), which displays directions to the closest pub for the moments when you get thirsty.


The most important was that everyone seemed to enjoy themselves. We had new people in the community attending our events for the first time as well as first-time hackathon participants learning and experimenting.

For the members of the community reading this: the fall is coming. We’re currently working on closing the deal with first events in September and October and you can expect to learn about frontend testing, VR/AR interfaces and mobile frontend development. Exciting times!

Phenomenon of the decade

How could one ever design something like the phenomenon that is known as Pokemon Go? It was launched in Australia, New Zealand and US a week ago and started immediately breaking the roof. More daily active users than Tinder and Twitter, longer usage times than Facebook and Instagram and other social medias. #1 grossing app in US immediately after the launch and Pokemon Company’s stock price sky rocketed.


But what is Pokemon Go all about and how is it different from hundreds and hundreds of games launched all the time? There are couple of major factors that I couldn’t have believed until I witnessed it all with my own eyes.

It’s not just gamers – it’s everybody

There are a lot of games with a strong and large gaming community. But gamers are quite a small piece of the population and even the biggest communities don’t really make a dent in the universe. Maybe the launch and hype of Angry Birds caused longer bathroom breaks at work but it was still rather contained.

I’ve talked this week with multiple people who don’t care about Pokemon or haven’t really ever played games and they are going absolutely nuts about Pokemon Go. It has touched such an amazing huge crowd and brought gaming to coffee table discussions. Much like Tamagotchi did in the 90s.

I love it. Finally my almost 20 years of experience in Pokemon is a popular main stream discussion topic

People coming together

One of the very differentiating factor of Pokemon Go is the way it brings people together. The gaming community is filled with stories of marriages started in World of Warcraft and friendships started in online games and forums. I have met many incredible people through games like Halo 2 and some of them have become life-long friends. But it’s been a minority of a minority.

Pokemon Go is doing this on a massive scale. It’s a real life massive multiplayer game with such a strong physical location emphasis that it forces people to get out of the door and interact with the world. Just today alone, I’ve witnessed couples strolling around together catching Pokemon, random people talking to each other and making new friends (and foes, there are teams! I’m obviously part of Team Instinct, led by the Battery Jesus Zapdos).


My favorite meme so far.

It has also been a huge inspiration for memes. Imgur and Reddit – and through them – other social media is filled with Go memes.

Pokemon Go itself doesn’t have any chat options right now, so communities are starting elsewhere. People are posting to Facebook, Telegram and Whatsapp about locations of rare Pokemons, taunt each other’s teams and plan going to catch Pokemon together.


New opportunities and healthier life

Vox wrote about the economical problems that products like Pokemon Go (and Vox itself…) cause. What they write about is about a bigger picture caused by digitalization and globalization but the reality is that local companies have been really fast at picking up the benefits of Pokemon Go. Putting out a lure (to attract Pokemon and hence trainers) and special prices can increase your sales in the first days of hype significantly.


Foodora’s social media marketing took Pokemon Go immediately in

I thought this was a fun gimmick until I actually faced it myself. While catching my first Hypno in a local park, I ended up chatting with a ice cream stall guy who told me they are putting lures there to get players to buy ice cream. We are not a big city but it’s still already affecting businesses and operations in a way we haven’t seen before.


Another difference Pokemon Go is making is getting people up from the sofas and out there. To capture Pokemon and hatch eggs, you need to walk. A lot. My friends are already telling their stories of how they ended up walking for 5 or 10 miles just for Pokemon. Today, I took a bus downtown, walked around for few hours catching new Pokemon and after getting a bus back, I found out there was a Squirtle near by. I ended up walking around for 1,5 hours more just trying to find him. I didn’t but I got a good extra walk before hitting the bed.

Captivating nature of Pokemon Go can also help people overcome different difficulties. Elizabeth Barnes wrote about his autistic son who found new excitement in his life through Pokemon Go. “The boy who fantasized about his whole summer being in front of his computer was voluntarily outside walking around.”, Barnes writes.

Overnight success that took 20 years

Pokemon Go is one of those things that came out of nowhere and became an instant hit. But like all good overnight successes, it took couple of decades to come to live. And those two decades were filled with two stories going side by side.

One of these stories is obviously of Nintendo’s and Pokemon’s. Pokemon is celebrating its 20th anniversary and it has built amazing following and fan base that I’m a proud member of. I play video games, I play trading card game, I watch the anime and now I’m hooked with Pokemon Go. Throughout the years they’ve been able to keep people interested and build up a community that many are jealous of.

Another story is of John Hanke’s. Roger Hamilton shared John’s story in AR games and Google and eventually Niantic Labs (creators of Pokemon Go) that also took 20 years.

Will it last?

The start has been phenomenal. Kicking Twitter’s and Tinder’s butt isn’t an easy task and Pokemon Go is suffering a lot of bugs, glitches and server issues even thought it’s not even officially launched in Europe (Germany got it today so there’s hope for a soonish launch elsewhere too). How long can they keep people engaged if they aren’t able to fix the issues? I believe big amount of people will forget the game in a few weeks anyway and having these kind of issues will definitely make it even harder.

The biggest hype will most likely die soon. I hope it doesn’t die too fast as I love meeting new people and chatting with strangers who are out there finding new Pokemon and new adventures. And I’m super happy it’s finally ok to be a Pokemon fan publicly. And having so many new people introduced to Pokemon games hopefully grows the VG and TCG communities as well – those are where I’m most at home.



One year after Silicon Valley

Last month or so has been an emotional roller coaster thanks to Facebook’s On this day app. 2 years ago, my November and December were filled with previously unseen excitement about life. I was just about to step in to the plane and fly to San Francisco to start a whole new life. One year ago I was leaving Chartio in San Francisco and preparing to coming back home.

If you would have asked me (or if you actually did) last Christmas what I learned in San Francisco, I would’ve answered something along the lines “I learned a lot of Python, Django, Javascript and being a software engineer”. Today, it’s a whole new ball game. Although I did learn a lot about being a software engineer and building good SaaS products, I learned and gained so much more that is visible only now a year later.

First of all, I made a lot of friends amongst the Finnish engineers, designers and entrepreneurs. I had the pleasure of living for a year with a brilliant young guy and shorter periods of time with other brilliant engineers. I met so many aspiring Finnish young entrepreneurs who either lived and worked there or visited the Valley during the year. These friendships connected me to such a network of opportunities that my opportunity horizon blew up. Thanks to those friendships, my 2015 has been way different than it would’ve been if I never left Finland. Regardless of how much I learned as a developer.

Secondly, I gained a lot of self-confidence and self-esteem and learned a lot about selling. I didn’t learn it directly from the sales people in Chartio but from the general buzz and atmosphere of how the entire ecosystem there works. In meetups and a Rails Girls workshop I met people who were just like me or you but who knew how to be more. They didn’t hide from the world under the blanket but took advantage of opportunities and situations. I read Keith Ferrazzi’s Never Eat Alone and Dale Carnegie’s How to Win Friends and Influence People and both of them made a really big difference in my life.

I also learned to small talk, a skill foreign to me and many other Finns. And it’s a skill that helps in networking, creating meaningful relationships and selling.

Just last week I started a frontend meetup group in Turku. If I would’ve done that few years ago, I probably wouldn’t have attracted much people. I wouldn’t have had the self-confidence to tell people it’s gonna be cool, I wouldn’t have had the skills to sell it to people and companies and I wouldn’t have had the credibility as a guy who can make it happen. Now we gathered a community of over 100 people in 48 hours to kick off a new meetup group.

This year was a limbo state for me, trying to figure out what to do. I took three months to just hang out and see friends, then spent four months working for Smartly.io, another month of freelancing followed by a new position and a slight career change to community management position I currently have. Next year though? It’s gonna be an amazing one.

Why I love hackathons

I’m a huge fan of hackathons. Last weekend, I had the privilege to organize one for the first time after attending a few. Even though being super tired on Sunday evening after a long weekend of very little sleep on a couch, I was so happy being able to organize a successful event.


You get to write bad code

Hackathons have such limited time to come up with an idea, learning the tools and implementing the idea that there’s no way you can write perfect code with all the corner cases thought through and all different user actions taken into consideration. Once you realize that, it’s really liberating feeling. You can mock some parts of the app or only make it work on a subset of possible inputs. You can also not worry about the maintainability of the codebase – often you’ll never touch the project anyway or if it’s really good, you are probably better off rewriting it from the scratch anyway.

You get to experiment

In addition to writing bad code, you get to take a sidestep from your daily life. I usually try to select a new technology, framework or language to hack with during a hackathon. During our company hackathon at Chartio I created an online clone of Jeopardy TV show using Node.js since I used Python for my daily work.

The code base is absolutely horrible, it doesn’t always work and it lacks a few key features from the show but for the two days and the demo, I absolutely loved working on it and getting my friends playing it.

You get to meet amazing people

Meeting new people, teaming up with them and learning from them is a killer in hackathons. Let’s say you’re a backend developer and you team up with a UX designer and a mobile app developer. If you do things the right way, you’ll end up learning a lot about UX design and mobile development in the process. You might meet your future co-founders or find new people to your existing team. Working with someone intensively for 48 or 72 hours reveals character in people so you’ll have a way better idea about who someone is.

It’s often tempting to participate in a hackathon with an existing team but keep in mind the positive opportunities that arise from going in blind and finding the team at the event.

You always fit in

Hackathons are great because they are accessible to developers and designers of all skill levels. You can easily adjust the difficulty of your project to match your skills (it’s always better to do a project that is slightly over your current level). Both a junior and a senior developer can attend the same hackathon and they both feel bit lost for a moment in the beginning but learn something cool by the end.

You get to showcase what you did

Public speaking is the biggest phobia in the US. Research says that even one in four people are afraid of speaking to a crowd. I feel hackathons are a great place to practice. You’ll be talking about something you’re passionate about (I hope at least, you just spent a weekend working on it) to a group of peers in the same situation than you. You have most likely even talked with most of the people (depending on the size of the hackathon) during the weekend so you’re not even talking to a group of strangers.

You only learn pitching by doing it so it’s better to start as soon as possible. Good sales pitch is not a thing for only startup entrepreneurs. Everyone benefits from being able to sell their ideas, products or skills in life. The more you do it, the better you will become and at one point you’ll realize that you’re comfortable pitching anything to anyone – and you get people to buy your story.

Write bad code, experiment, meet people, learn and showcase. That’s why I love hackathons.

What’s with all these sorts, PHP?

A few days back I was ranting to my friends about PHP arrays. I’m not as much of a PHP hater as many but there’s still some things that really bug me. Everything to do with arrays is one of them. Let’s have a look. I use the phrase normal array to mean a non-associative array (like Python’s list or Java’s array).

Associative ordered arrays

As the documentation states, “An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more.”

I think it’s doing way too much and is way too confusing. You can kinda use it as dozen of different things but not really. If you just define $arr = array(1,2,3), it acts like a normal array (what you would call as a list in python). But only as long as you don’t delete anything. unset($arr[1]) removes the second value (2 in this case) and it stops working as a normal array.

$arr = array(1,2,3);
var_dump($arr, json_encode($arr));
var_dump($arr, json_encode($arr));

The first one encodes into json array [1,2,3] and the latter one into JSON object {"0": 1, "2": 3}. So instead of numeral, continuous indices, it converts into associative-only array with two string keys. At least for me it has caused so much confusion when dynamically manipulating these arrays.

But what about sorting?

The PHP standard library is well known for having inconsistent naming and parameter order for functions that do same kind of things. For sorting, there are dozen functions, named consistently but really bad. There’s of course sort. Instead of giving a flag or parameter to sort to reverse the order, you have rsort. Then if you want to keep the key=>value pairs intact, there’s asort (which has caused me most confusions ever since I accidentally used that one instead of sort) and arsort. Then you can sort with keys ksort and reverse krsort. For natural sorting there’s natsort and case insensitive natcasesort. And when all this is not enough, you can use custom defined comparing function with usort, uasort and uksort. And the inconsistently named array_multisort for multidimensional arrays.

Some of the effects you can achieve by using flags with different sorts and for some things, you must use flags since there are no aliases for everything.

I have to admit, I’ve burnt myself too many times with sorting issues on PHP by using the wrong function. Especially when I was just beginning PHP years ago, I just googled and stackoverflowed for answers and would end up with different answers. So I used asort in one place and usort elsewhere and didn’t really know the difference.

Too many sorts

I just think there are too many ways to do one thing. It’s confusing for beginners, it is redundant for skilled developers and the naming scheme is – even if consistent – pretty horrible. I am the kind of developer who values ease of writing code over everything else. I don’t really care about efficiency (until it’s absolutely necessary) nor even the benefits of strong static typing. I just want to write some code and enjoy the process.

Beauty of the Pipe

The Unix Pipeline is a powerful and beautiful piece of software that is sometimes difficult to grasp for a command line beginner. We are used to use graphical interface apps that mostly only interact with each other by writing and reading files if at all. The concept of standard out (stdout) and standard in (stdin) are something that takes some time to learn and understand when one is learning programming and/or data tools in command line.

The examples expect some level of understanding on the basics of terminal, such as parameters and flags. Some of the commands can take file as a parameter and as such, don’t require cat but for the sake of education, I will not go through that route.

Let’s start with basics. cat is a command that outputs the contents of the file into standard out. So running

$ cat file.txt

will print the entire contents. If we want to get 10 first lines, we pipe the results of cat into head command. The pipe, |, will feed the standard output of one command as standard in for another.

$ cat file.txt | head -n 10

Print out top 10 words by word count in file file.txt with the frequencies is one exercise that is usually thrown at students in basic courses. Let’s build a pipe for this exercise one step at a time. I have a Lorem Ipsum text file that can be used here, you can find it in my GitHub.

1) Let’s start with the simplest, outputting the file to stdout

$ cat file.txt

2) Next, we need to tokenize the output to contain one word per line. For that purpose, tr is useful command. It will replace all spaces with line breaks.

$ cat file.txt | tr ' ' '\n'

3) Next, we need to do little cleaning up. We want to remove all punctuation, commas, periods, exclamation points etc. Let’s introduce sed, the stream editor. We will use simple regex to help us out here.

$ cat file.txt | tr ' ' '\n' | sed 's/[.-\!?,]//g'

4) Next, we want to lowercase everything, so that ‘Lorem’ and ‘lorem’ count for the same word.

$ cat file.txt | tr ' ' '\n' | sed 's/[.-\!?,]//g' | tr '[:upper:]' '[:lower:]'

5) There is a command uniq which combined with -c flag gives us the count of words. However, for that to work, we need to sort the lines first since it only works on sequential lines.

$ cat file.txt | tr ' ' '\n' | sed 's/[.-\!?,]//g' | tr '[:upper:]' '[:lower:]' | sort

6) Then, let’s apply uniq -c

$ cat file.txt | tr ' ' '\n' | sed 's/[.-\!?,]//g' | tr '[:upper:]' '[:lower:]' | sort | uniq -c

7) To get the ten most used words, we need to sort again, this time in reverse order

$ cat file.txt | tr ' ' '\n' | sed 's/[.-\!?,]//g' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -r

8) And finally, use head to get first ten lines

$ cat file.txt | tr ' ' '\n' | sed 's/[.-\!?,]//g' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | head -n 10

Just looking at the final command pipe can seem really intimidating but it is important to remember, that the beauty of the pipe is the fact that you can build it one step at the time and always see what is going on between every step.

With the great variety of command line tools for data manipulation, it is possible to do complex things like scraping data from HTML table in Wikipedia into a JSON file that only contains wanted columns:

curl -s 'http://en.wikipedia.org/wiki/List_of_countries_and_territories_by_border/area_ratio' | scrape -be 'table.wikitable > tr:not(:first-child)' | xml2json | jq -c '.html.body.tr[] | {country: .td[1][], border: .td[2][], surface: .td[3][], ratio: .td[4][]}' | head

Above example is from the great blog post 7 command-line tools for data science by Jeroen Janssens.


Case study: DataMonkey as educational platform

Screen Shot 2014-08-08 at 9.26.31 PM

A coworker of mine shared a link to DataMonkey, a platform/website to learn basics of data manipulation: Excel spreadsheets and SQL, the language used for database queries in relational databases like MySQL, PostgreSQL and SQLite. During my studies and personal exploration for the best practices in educational systems, I have encountered many that have been quite horrible (like TRAKLA2 which is used for teaching algorithms and data structures) and many that have a bit better approach (like Codecademy and  and ViLLE system for teaching programming).

For me as both as a student and an educator, there are two key factors for making a platform good for educational purposes:

Intuitive User Experience

First one is that the user experience must be so intuitive, easy to follow and pleasant to use that the learner doesn’t have to waste single second thinking about how the system works. Because once you have to focus your attention to things like that, you start losing your motivation and less of your focus goes towards learning the actual subject. The ultimate way to test this, is to see if somebody who understands the subject and can solve problems on say, paper for example, can get through the exercise without problems. From what I have seen, that is also the most difficult part, as UX design often is.

How to help out when learner makes a mistake or doesn’t know what to do

Second, instant and good quality feedback is the bare bone of any education, especially those that don’t involve human interaction with a mentor or teacher. If you keep hitting your head towards the wall because you don’t know what you did wrong, your learning results drop, your motivation drops and you start to generate negative emotions towards the subject. Sometimes it’s just lack of feedback or insufficient feedback but also sometimes the lack of instructions to work with the system.

In programming related platforms, it is quite trivial to separate three things: syntax error, variable error and logical errors. For example, in SQL, syntax error is writing SELCT instead of SELECT, variable error is trying to access a column or table that doesn’t exist, like saying SELECT age, gender, hometown FROM people when the table actually has columns age, gender, city. Especially for SQL, these are quite easy to parse out. And the last one is easy to just test against wanted output.

Case DataMonkey

So, how does DataMonkey rank compared to these requirements? Currently for the SQL, there are two separate paths, with the idea of  taking first the Guess SQL path and then the Write SQL yourself path.

Screen Shot 2014-08-08 at 9.37.23 PM

Guess the SQL exercise

For the Guess SQL, there are three exercises that give you no idea on how to construct SQL. There are some blocks that are already in place and others that you need to click to construct the wanted query. But you can click them in any order and just try to pick out anything that sounds like the plain English query. I can see the intention behind that idea but I fail to see how it helps in any way.

First of all, randomly just selecting tokens from the upper row takes the focus out of the actual thing and doesn’t really aid to construct any larger concepts of SQL or how it works. There is no feedback on selecting the wrong one. The idea of starting slow and not providing any information on SQL has its idea but in my idea, trying to teach something without telling anything about it just doesn’t work. And phrasing things like “Using SQL is as simple as choosing between Option A and Option B—it’s just either this or that! So what do you think is so complicated about it?” isn’t really helping.

The next part is what really bothers me. I understand the project is quite new and there are hopefully a big list of things to improve but currently, I couldn’t really suggest it to any of my freshmen students. In the more serious SQL part where you actually write the SQL yourself, the information given is not sufficient.

Referring things done with programming as magic is something that us engineers and developers joke about but when someone is facing things for the first time, saying that something is magic leaves the wrong impression. It is okay to say something along the lines “Okay, at this point, just believe me to write it like this, we will get back to what is happening later.”

The first actual SELECT statement is not described in any way. It says says to type this in and see that oh, we got everything back. As long as you keep repeating everything the instructions say to the point, you are good to go. But once you make a mistake, things go south. As the following screenshot shows, the student gets no information on WHAT went wrong. Learning from mistakes is the most efficient way of learning but when you have to start guessing, we are on the wrong path.

Screen Shot 2014-08-08 at 9.18.54 PM

As I mentioned earlier, syntax, variable and logical errors should be separated with different and more accurate feedback messages. In the above screenshot, there was no column named hometown but it doesn’t even indicate to that direction. Also, sometimes it requires semicolons to terminate commands and sometimes not which can cause really confusing situations.

I really like the idea that DataMonkey is trying to do but the execution is just too way off.  Technical cool stuff is irrelevant as long as the important things are off: intuitive user experience and instant feedback. If I would not know anything about SQL and made a mistake somewhere along the line, no matter how subtle, I would be in trouble. I couldn’t even google with the error message since the only one I am getting is platform specific with this platform.

If you happen to be one of the guys working on DataMonkey, please don’t take this too personally, I just got an idea for the blog post when I got the opportunity to look an educational platform with fresh eyes.