TL;DR - This will start a series of blog posts where I will be writing about my journey into the world of functional programming. I will try to focus on a practical approach without getting to deep into the theory behind it and share my experiences to help others understanding what FP is and how it probably can help you write better code.

Here at vaamo each developer has a bi-weekly 1on1 with our CTO @benjamin where we discuss things to work on to improve ourselves, the team or how we work. During these 1on1s we quickly discovered that I want to work on becoming a better programmer and improve my leadership skills. I might write another blog post about what those things mean for me in detail, but that’s a different story.

To get things started we decided to concentrate on me becoming a better programmer in the beginning and see if some aspects of that have correlations to the leadership topic. As a concrete action I want to improve my Scala skills since it is currently our main programming language at work. In order to dive deeper into the language we decided to focus on the functional programming aspect of Scala.

Why functional programming?

So far my programming life was dominated by writing object oriented code, especially in Java. The world of functional programming will open up a totally different style and way of writing code for me. One good thing about Scala is that it combines both worlds of functional and object oriented programming. This enables you to slowly introduce functional concepts into your object oriented programs without having to fully adopt or dismiss one or the other. After working professionally with Scala for 3 month now I can say that I already started to adopt a slightly more functional coding style but there is still a long way to go.

I really want to understand what FP is and what the benefits of FP are. I want to learn and show others how FP can help to write cleaner, highly composable, better testable and more concise code. While I will focus on Scala the concepts of functional programming should be transferable to any other functional language.

When I first started to get into Scala in 2012 I participated in the first Functional Programming Principles in Scala course on Coursera by Martin Odersky and really liked it. Althought for my taste it focused a little bit to much on the mathematical theory behind FP. As I don’t have a strong mathematical background, I will try to avoid the mathematical theory behind functional programming where possible and focus on the doing. This might not be possible all the time but let’s see how that works out.

How to start the journey?

There are quite a few books out there on functional programming, but I decided to start with Functional Programming in Scala. The book contains a lot of concrete examples and exercises that will help to follow a more practical approach. Additionally the Rhein-Main Scala Enthusiasts also started a functional programming study group around that book where they will work together on the exercises and discuss the solutions. Unfortunately I wasn’t able to join the first meetup but I’m really looking forward to the next one.

The best way to learn something new is to actually do something with it and get hands on experience. I will try to use more and more functional programming in my daily work. This will help me to learn in practise where FP actually fits very well and where it can help us at vaamo to make our app even more awesome.

I will regulary blog about my progress and share my experiences to help others understanding what FP is and how it can help you to write better code.