Book Review: Functional Programming in Scala

Wed, Dec 03 2014

I can’t remember who but someone stated that if a technical book does not make your head spin, then there is no point in spending your time reading it. For me, “Functional Programming in Scala” certainly did this.

The book is published by Manning and its final version was released in August 2014. At the Vienna Scala User Group we formed a study group and started to work through this book together back in February. We were able to obtain a relatively finished version through the Manning Early Access Program (MEAP). Since then we have been meeting regularly to discuss its content and are now on the final chapter.

On the first page the authors, Paul Chiusano and Rúnar Bjarnason, state:

We begin this book with a radical premise—that we will restrict ourselves to constructing programs using only pure functions with no side effects such as reading from files or mutating memory. This idea, of functional programming, leads to a very different way of writing programs than you may be used to.

[ Continue reading… ]


Tue, Sep 23 2014

This article is based on the talk I gave at the ViennaDB meetup on Sep 22nd, 2014.

Memcached was traditionally used for all our web projects at While it worked without a hitch, I found it too simple for certain use cases. Which is why as a tech lead on the relaunch team, I decided to use Redis in our new stack instead.

It has been described as “Memcached on steroids” and, while that’s certainly true, it’s only part of the story. Redis offers functionality far beyond what would be expected from a typical key-value cache. For instance, it’s also a message broker right out of the box.

Redis is used by big services like Twitter, Pinterest, Tumblr, GitHub, and Stack Overflow.

[ Continue reading… ]

The Twitter Stack

Fri, Aug 29 2014

On Aug 27th I gave a talk at Vienna Scala User Group about this topic.

In the Scala community most of the attention is given to Typesafe’s own stack, namely Akka and the Play Framework. While those are certainly important projects, I will introduce some of Twitter’s open source projects that are equally interesting–maybe even more so.

As a quick reminder: Twitter started to switch from Ruby to Scala around 2008/2009 at a time when Scala was not even five years old and had no significant adopters. In my opinion Twitter played a huge part in getting Scala to where it is today. They showed that the language is powerful enough to handle one of the world’s biggest systems.

That’s also one of the reasons why I find Twitter’s stack so interesting. It’s proven to handle an extreme load and I’m not aware of any Akka or Play production system that is nearly as big.

Since Twitter open sourced important parts of their stack, other companies that face scalability issues started to use it such as Foursquare, SoundCloud, Tumblr, and others.

[ Continue reading… ]


Sun, Feb 09 2014

In my quest to get a feel for all somewhat relevant programming languages I inevitably came across Dart. Contrary to Prolog, the language I recently covered, it was not initially developed over 40 years ago but its first stable version only saw the light of day a few months ago.

Dart is, together with Go, one of two languages developed by Google. It’s own tagline describes Dart as “a new platform for scalable web app engineering”, and a leaked internal email states its goal as to “ultimately replace JavaScript as the lingua franca of web development”.

It’s very important to note that the Dart effort was founded and is still headed by Lars Bak and Kasper Lund. Before working on Dart, they were demonstrating their abilities by creating V8, the ridiculously fast JavaScript VM that played a major part in lifting the popularity of the language to its current heights. V8 is also what powers node.js under the hood.

But the team felt that they hit a ceiling with V8 and decided to overcome this by creating a new language: Dart. The whole language was designed with the goal of being able to create a highly performant VM to power it. This effort was clearly a success because the Dart VM is even in its current (not especially optimized) state already twice as fast as V8. Supposedly they claimed during the announcement of the Dart 1.0 release at the Devoxx conference, that they think they can reach the performance of the JVM.

Since the Dart VM does not ship with any browser yet, a Dart to JavaScript compiler is provided with the Dart SDK. Furthermore, Dart can also be used on the server-side.

Last Saturday the GDG Vienna organized the first Dart Flight School at sektor5. These events are sponsored by Google and are set out to take place in different countries around the world to bring Dart to the masses. In Vienna Nik Graf from Blossom and Herbert Poul introduced Dart in two talks and then the 40 to 50 attendees were encouraged to discover the language by building a small project of their choice.

[ Continue reading… ]


Sun, Dec 01 2013

For some reason I always put Prolog in the same category of programming languages as COBOL, PL/I, or ALGOL: Ancient and not used by anyone out of their own free will unless there’s a significant paycheck involved. Well, I was wrong.

Recently I bought the book Seven Languages in Seven Weeks, mostly because I was curious about Clojure and Erlang. It also covered some of my favorites, Scala and Ruby, and it’s never bad to revisit some basics. It took me completely by surprise that the chapter about Prolog was not only fascinating but also something that could be of great use in future projects.

In this article I’ll try to explain why I think that this language is something every programmer should be aware of.

[ Continue reading… ]