1. Customizing Circe's auto generic derivation

    While modeling the domain I often use sealed trait hierarchies, value classes, and case classes. They are essential for idiomatic Scala code. However, the encoding and decoding them to JSON can be problematic. Even though Circe provides boilerplate-free generic derivation, the JSON encoded using the default configuration may be confusing. In this post, I describe how to make it more friendly.

    circe, configuration, json, scala, shapeless, typelevel

  2. Parallel futures and exceptions

    Asynchronous applications are much harder to debug. You do not get the whole stack trace so easily. So it is important to react to all the exceptions that might unexpectedly occur. I found a case when following a simple pattern to run futures in parallel leads to loss of exceptions. In this post I describe a solution for that.

    applicative, exception, future, scala

  3. How to make a docker machine from an old laptop

    On OS X you can not run Docker natively. Instead, you must use a virtual machine. It is common to run out of memory if you run multiple virtualized docker containers, IDEs, Chrome tabs and so. Although it is possible to use cloud instance as docker machine the high latency is an issue. An alternative for that is to run Docker Machine on a spare laptop in a local network. In this post I briefly describe how I did it.

    docker, generic, laptop, machine, osx, ubuntu

  4. How to run play using docker compose

    Config for docker compose which runs play application in development mode with auto-reload feature enabled and allows linking dependent services.

    activator, compose, docker, play

  5. Getting started with emacs for scala programming

    This month I switched to emacs for scala programming. I was tired of the IntelliJ IDEA slowness and the fact that it consumes lots of CPU and memory. It works great for java, but with scala it’s unpleasant. Then I discovered spacemacs and ensime. I felt a relief. I find it much more ergonomic and faster IDE for scala. However, the beginnings are hard. I wrote this post to help you with the firsts steps in emacs.

    emacs, ensime, evil, osx, scala, spacemacs, vim

  6. For-comprehensions with Combined Monads

    The code should be easy to read. One of the programming principles to make the code more readable is to avoid nested operations. The so-called pyramid of doom does not only refers to callback hell in javascript but ofter appear in scala as well. Here, I describe how to make the for-comprehensions more elegant when using combined monads in scala.

    either, for-comprehension, future, http4s, monad transformers, option, scala, scalaz

  7. Apps that increase productivity

    This month I started working remotely. It turns out that it is harder to stay focused and productive that way. However, I managed to gather and integrate apps that help me to increase productivity and avoid distractions. In this post, I describe what I am using and why.

    f.lux, ifttt, pomello, pomodoro, productivity, stayfocusd, todo

  8. 32 things to do before deploying to production

    Following the recent trend of “10 Things You Need To…” articles I decided to write my own list of things that you need to do. Nah. I have just built the list based on my experience and mistakes that I do not want to repeat. This is my checklist for future production deployments.

    checklist, deployment, devops, monitoring, production