London Scala eXchange 2017 — the show is going on
I am always looking forward to December however beyond winter holiday season there is another important event. The annual Scala eXchange at London, which is one of the best Scala gathering in the community.
I have visited ScalaX fifth time in a row since I moved to London in 2013, mostly with my critical thinking friend, Kristof Jozsa. This year he couldn’t join since his urgent project delivery at Thailand, however I was accompanied by another friend — Mani Sarkar — who is also a well known figure from LJC.
I clearly remember the first keynote from 2013. It was a Haskell presentation about lenses and as a novice Scala developer I got lost after 5 minutes… Since then loads of things have changed and I believe that ScalaX has been improved a lot year by year.
Last year I provided an in depth review about all the talks I attended which is still available at my other blogpost.
This year I won’t even try to reach the same level of thoroughness as last year. Instead, I am going to show my favourite talks and provide an overall summary about the conference.
If you followed ScalaX in the last couple of years you can easily recognise the trend, the main stream, the topic which dominates the conference. Since 2013, there was Spray and Akka hype followed by the first Monad and Monoid explanations with ScalaZ which was eye opening at that time. Then Akka Http and Akka Streams were dominating the scene. Last year more advanced topics are appeared like Eff Monad, Dependent Typing and Cats.
You can argue with me but I believe that this year was about Category Theory, Free Monad and Tagless-Final.
Category Theory
The keynote in 2017 was delivered by Bartosz Milewski who is known among the others of his blogposts and youtube videos about category theory for programmers.
It was good to see Bartosz on the stage at London giving his keynote about Category Theory. He provided the necessary mathematical foundations for the subsequent more pragmatic Category Theory presentation from Daniela Sfregola. Her talk bridged the theory and the practice by providing understandable examples from our daily programming routine to have better understanding about Monoid, Functor, Applicative and Monad.
To frame the whole conference, at the end Rúnar Bjarnason — who is the co-author of Functional Programming in Scala, which became the new bible in functional programming after Odersky’s famous green book — was talking about a bit more Category Theory and Composing Programs.
As an additional fact it turned out that there were just a handful of guys present at the audience (~500 devs) who successfully managed to finish his red book. Either the bar is high or the devs are shy… :)
One of my favourite thoughts was presented by Runar at the end of his speech.
Write meaningful code.
Free Monad and Tagless-Final
The other big group of talks was about Free and Tagless-Final. The first talk in the topic I was attending was presented by Adam Warski. His talk, “Free Monad or Tagless Final? How Not to Commit to a Monad Too Early” was a nice summary in the topic. He showed an imaginary application what he refactored to show the differences between the original solution and the Free/Tagless-Final.
At the end of the speech he provided a really nice summary for giving some hints when each and every approaches can be considered.
If you are interested in this topic then it is definitely a good starting point. The code can be found here.
It was obvious from Adam’s speech that Free Monad approach with Cats requires some boilerplate code to be written especially when you try to combine algebras.
It becomes ugly really quickly with InjectK, EitherK and manually hand-rolled natural transformations.
The next talk I was attending was from Raul Raja Martinez who’s “Introduction to Freestyle & Freestyle RPC” talk was a good answer for the previously described Free Monad related boilerplate code and mess. He presented about Freestyle, including Freestyle RPC, which is a new module to build purely functional microservices.
Freestyle has loads of support for writing programs with Free Monad, Tagless and much more. It eliminates the burden of manually written boilerplate code and summons the compiler to help developers focusing on more important things.
I kind of like the approach and I have already started to look into it in more depth but the fact that there are loads of annotations everywhere it feels like I am dealing with a Spring application on steroids although Spring handles annotations at runtime meanwhile Freestyle provides compile time support which at the end makes a huge difference.
After this introduction about Freestyle to I went for
Michał Płachta’s “Freestyle, Free & Tagless: Separation of Concerns on Steroids” talk where he provided an awesome live coding session about the topic focusing on how Freestyle can support writing more cleaner/nicer, functional/side effect free code.
I am absolutely convinced that Free Monad with Freestyle support is a viable production approach however I am still thinking how it would fit to a DDD hexagonal, Ports and Adapters approach. My other concern is that the whole production application itself effectively becomes a set algebras, programs and interpreters. It requires a bit of mind shift and feels like more smoke than fire. It is too early to judge, I still have to dig deeper to have better understanding.
I kind of started to like Free Monad and Tagless-Final but as it is now I still prefer Eff Monad which hides all this complexity around algebras, programs and interpreters but still gives huge flexibility.
Summary
I really enjoyed this conference. Loads of things to learn and try. I believe that the community and the quality of the presentations improved a lot. More and more learning material is available and more and more advanced stuff becomes natural and well known.
Special thanks to underscore.io who relentlessly publishing free books to maintain this upward trend.
There is also an important thing to mention about available videos and skillscasts. Skillsmatter raised the bar very high with publishing all the talks almost instantly. I wish other conference organisers would do the same!
The schedule and skillscats are available via Skillsmatter website.
All in all it was the best conference I have attended this year. I am looking forward to seeing where Scala will grow in the future and as long as there is vibrant scala community I predict bright future despite the gloom comments.