Cats library, which helps to write purely functional code, is a quite young project in Scala. It brings many structures and functional constructs for you to use. The library itself is designed in a modular way, so we can use only things that we really need. In this post I’ll try to look at the Free Monad concept and implement basic functionality of LOGO programming language. Read more

We can all agree that it’s useful to be able to express a number. Or a character. It could be argued that most code is built upon some set of primitives. And naturally simple types work well in a limited number of use cases: algorithms, tutorials, small/focused applications etc.

The moment the domain outgrows the natural usage of a given primitive it becomes troublesome to keep in mind what the meaning behind a particular Int is. We all know this, it’s been the driving force behind OOP since day one.

Recently I’ve been working on an application based on play framework 2.4.x and slick 3.0. Unsurprisingly, as the app grew the need to track and control domain specific data became more and more pressing. Read more

I believe that the work on keeping quality high should start from the very beginning of the project. When it comes to actual implementation, setting up build configuration is the very first thing one makes. The choice of tools has a huge impact on the process and results.

Additionally, the build itself is a program as well (and an important one!), so there is no excuse in avoiding good practices like readability, DRY, SOLID, etc.

That is why in this post I want to write down some good ideas about SBT usage that I’ve learned in both commercial and my own small projects, that help me write better code, keep build maintainable and improve projects in general. Read more

Hello! In this post I’ll describe the process of creating a macro transforming a function. We’ll go through a short introduction to macros and learn how to use them to our advantage. Read more

During our last internal Backend Guild meeting we discussed the topic of Apache Spark. This post is to fill the details we missed and to organize the knowledge so it might be useful for people willing to start with Spark. Read more

Hi. In this post we will be exploring some unexpected gotchas we found while working with Scala. Hopefully it will help you to better understand Scala and fix some naughty bugs :) Read more



This blog post was created to see how Scala.js is holding on and have some fun with programming. I decided to do a simple mini-game using Scala.js and Three.js libraries.

I will explore Scala.js from practical perspective. You’ll see the perks of using typed languages in frontend. We are also going to take a look under the hood and see some generated JS code. Finally I’m going to present some advantages and disadvantages of Scala.js and try to answer the question: Is Scala.js production ready ? Read more

Small retrospection

In my previous blog post we talked about shapeless and how it could be applied to enhance how you work with Futures. Even though we were focused on Futures, our goal wasn’t to provide the best and ultimate util to deal with them, but to demonstrate how shapeless can help us build functions that are more flexible than almost everything we are used to work with.

So in last post we have created a kind of varargs function that is able to adjust its return type to the arguments passed in. Today we’ll take it much farther by adding scalaz, ApplicativeBuilder and Monads into the soup. Read more

Futures today

Today, when reactive programming is so popular concept and you can see ‘We’re reactive!’ claim on so many pages that have anything to do with scala (and not only), Futures are something you have to deal all the time. Read more

The Problem

In my previous post we have written a simple app with Scala.js. In the end we managed to do everything we wanted to, but as we added more and more code a problem appeared – state management, the real app killer. Although our app didn’t do anything advanced, state handling and UI updates forced us to write a lot of additional code.

That post has shown that Scala.js allows us to write browser apps, but it also demonstrated that these apps can be vulnerable to other ills of frontend programming. To fix this issue we need to simplify our codebase. One way to do that is by adding a binding between the UI and what data our app holds. This way if the data changes in one place it will be automatically propagated to the other. We will implement this using Reactive Extensions. Read more