ClassNotFoundException for Akka logging

A few months ago I stumbled into the problem of Akka logging, specifically ClassNotFoundException when using akka.event.slf4j.Slf4jLoggingFilter, just by following the details of the Logging - SL4J section of Akka documentation. Of course, the error source is obvious in hindsight, but in the moment the fact that this was a multiproject build with several dependency paths made me miss a crucial reason for longer than I want to admit:
Add this to your dependencies (I'm assuming you have a val for akkaVersion to DRY):
"com.typesafe.akka" %% "akka-slf4j"  % akkaVersion

FACEPALM (Picard styled, but more hair)
Written by Ruben Berenguel


Scala eXchange 2017

Almost two months ago (time sure flies) I attended for the second time the conference Scala eXchange, one of the largest Scala conferences in the world, and which happens to be 1 tube stop from the office you can find me from time to time in London. Also happens to be an excellent conference, and I’m repeating next year (yes, I already got my tickets).
For those who don’t know, Scala eXchange is a 2-day (plus an unconference day) conference in central London, bringing most of the library developers you love to talk about cool stuff.

Scala time!

Keynote: The Maths Behind Types with Bartosz Milewski

We started with the big category theory guy. In case you don’t know, Bartosz is the author of the widely loved series of videos on Category Theory for Programmers. Haven’t watched them yet (I don’t have fond memories of Category Theory when I was studying abstract algebra), and from what I heard from people who have, I had the luxury of seeing a short intro to almost half of the series in just a conference session.
I got away with a bit better understanding of the relationship of the vague notions I remember from CT (universal properties/objects, final objects, etc) with type theory. All in all, very interesting and a good start.

Beware! There's a functor behind you!

Coffe break!

I caught up with the Scala Madrid gang, since they had a stand to promote the meetup. Got a free copy of Dave Gurnell and Noel Welsh Advanced Scala with Cats at the Underscore booth and drank a lot of coffee. I suspect I also stumbled on Jon Pretty and caught up on what he was going to present, but might have actually happened a few coffees later.

Free Monad or Tagless Final? How not to commit to a monad too early by Adam Warski

This was the first time I saw Adam presenting, and was well worth it. My knowledge of tagless final encoding is... shallow, to say the least (and not like my knowledge of free is excellent, but is better) and I left this talk feeling like I learnt a lot. The best way to leave a talk, I think. I also found later that Pere has a comparison of them, also adding the Eff monad to the mix.
Be sure to check his company’s (SoftwareMill) blog for a wealth of interesting posts. As well as subscribe to ScalaTimes, which they curate weekly.
♬ So Tagless can't you see, I want to break Free ♬

Farewell Any => Unit, Welcome Akka Typed! with Heiko Seeberger

I had read stuff by Heiko (for instance, a post on using akka-testkit), and had started having a look at the new typed APIs, but seeing it live-coded by the person who wrote a big part of it is priceless. Now, I need to rewrite my unfinished, unpublished ad server in akka-typed!
I had already seen Daniela’s talk (was on the same slot) A pragmatic introduction to Category Theory at Scala World earlier in the year (and, IIRC with longer time so it was almost a workshop, enjoy the video) so I skipped it. But can recommend, was excellent.
To Akka or not to Akka... Actually, there's no question

Lunch break

Had lunch with a Scala friend (hi there Carlos!) while explaining which talks I attended and exchanging impressions on the ones he attended. Also discussing freelancing/contracting, situation in Spain… Standard stuff.

Keynote: Architectural patterns in building modular domain models with Debasish Ghosh

It may have been my usual after-lunch sleepiness, but I didn’t enjoy this talk, even if it seemed interesting overall. Might need to rewatch the video to get a second impression.

Shapeless is dead! Long live shapeless with Miles Sabin

This was a bit too deep into the internals of shapeless, but Miles is a great speaker so it was quite fun, even if I didn’t get a lot of mileage out of it (yet).
Turning the problem around?

Introduction to Freestyle and Freestyle RPC with Raul Rajá

After getting a better grasp on the free vs tagless dichotomy earlier in the day, I got to enjoy Raul’s presentation on the library he has written with the other folks at 47 Degrees (they are also the organisers of LambdaWorld and LXScala and maybe others). The gist of this library, don’t bother with free or tagless: use freestyle and you can switch from one to the other as you see fit with ease.
He walked around as I was shooting...

Lightning sessions: Optic algebras

This is the only talk I remember, by Jesus Lopez. It was very interesting, but would love to see a full talk on it. I got into the wrong room for the second lightning, and chose wrongly for the third, so won’t even mention.

Keynote: The Magic behind Spark with Holden Karau

I’ve had the pleasure of hearing Holden speak something like 6 times already, and she always delivers fun talks. I mostly knew this one, since it was a Scalafication of the keynote she gave on PyData Barcelona 2017 (which focused on the Python side of things, you’ll also see me introducing her first time in the morning, by surprise, before coffee…). You won’t see garden gnomes the same after this talk.
Take the red pill

Freestyle, Free and Tagless: Separation of concerns on steroids with Michał Płachta

This one was mind blowing, enjoyed a lot Michał ’s style. After the warmup on free/tagless/freestyle the day before, I finally got the gist of why we bother with all these programs-as-data-kind-of-functional-encodings. Ticked for several rewatches. You can find the slides here.
But, which is the Good, the Bad, the Ugly, Michał?

Building scalable, back pressured services with Akka, with Christopher Batey

This was an interesting, technical talk about services, TCP and backpressure. A bit too close to metal for what I do currently, but good to be aware of. Also, Christopher gave an excellent presentation, first time I’ve seen him, will repeat.

Impromptu: Using dependent types to build a better API for async call graphs with Jon Pretty

I had seen a previous version of this talk at the London Scala User Group meetup, and understood nothing. This time though I got it (not sure if Jon did anything magical with the talk or it was me knowing more), and it has gotten me thinking about similar, graph-related problems and the approach taken (use the types, Luke!) Also, Heiko raised an issue in the repository (since, the code fits in a slide!) and I wrote the small PR to address it. Now I want to do something more useful for the library than that though!
Standing room for Jon!

A reactive database of facts with Peter Brachwitz

I wasn’t overly interested in any of the talks in this slot, so went with this, somehow “database of facts” in my head sounded like Prolog, which made it interesting. It was not (for me), it was more like how to access Datomic with Scala/Akka and doing it properly. Not specially useful for me, but probably is for someone else.


I sincerely don’t remember which talk I attended in this block. I’m pretty sure it was not Peter Hilton’s How to name things, since I saw that one last year (was great). It might have been Refinement types in practice with Peter Mortier, but don’t remember anything except vaguely mentioning refined types to a coworker for an API we have. Okay, I just checked the video and definitely it was Peter’s. You can find the slides here.

Keynote: Composing programs by Rúnar Bjarnason

Coauthor of The Red Book of Scala (beware, affiliate link), and an excellent explainer. This was an outstanding close to a very categorical conference. Even though I’m a mathematician, my working knowledge of category theory has improved 100x after learning Scala and seeing how my colleagues here approach problems in a very categorical, functional, typed way of seeing the world.


Last year we had a PR hackathon, where together with Carlos we contributed a WIP for regexes to scala-native. This year we had more of a workshop/live coding event, where we could choose among subjects. I don’t remember all of them. Raul was there for Freestyle (missed on this one). There was one about writing stuff for Minecraft in Scala...
Well, I attended what I think were the coolest: how to actually use Akka Typed, with Heiko and a tour of typelevel libraries and how type classes help in the implementation with Travis Brown. They were oh-so-interesting.

Next year, again and more.
Written by Ruben Berenguel


2017: Year in Review

I’m trying to make these posts a tradition (even if a few days late). I thought 2016 had been a really weird and fun year, but 2017 has beaten it easily. And I only hope 2018 will be even better in every way. For the record, when I say we, it means Laia and me unless explicitly changed.

Beware, some of the links are affiliate links. I only recommend what I have and like though, get at your own risk :)


Everything work related has gone up. More work, better work, more interesting work. Good, isn’t it?

As far as my consulting job in London, the most relevant parts would be:

  • Lead a rewrite and refactor of the adserver (Golang) to improve speed and reliability.
  • Migrated a batch job from Apache Pig to Apache Spark to be able to cope with larger amounts of data from third parties (now we process 2x the data with 1/10th of the cost).
  • Planned an upgrade of our Kafka cluster from Kafka 0.8.2 to Kafka 0.10.1, which we could not execute as well as planned because the cluster went down. Helped save that day together with the director of engineering when that happened.
  • Was part of the hiring team, we’ve had one successful hire this year (passed probation, is an excellent team member and loves weird tech). Hopefully we enlarge our team much more in the coming year.
  • Put a real time service in Akka in production, serving and evaluating models generated by a Spark batch job.
We also moved offices, now we have a free barista “on premises”. Free, good quality coffee is the best that can be done to improve my productivity.

In April I got new business cards (designed by Laia, you can get your own design if you want, contact her):

I kept on helping a company with its SEO efforts, and as usual patience works. Search traffic has improved 30% year-to-year, so I’m pretty happy with it. Let’s see what the new year brings.

I became technical advisor of a local startup (an old friend, PhD in maths is a founder and works there as data scientist/engineer/whatever), trying to bring data insights to small and medium retailers. I help them with technology decisions where I have more hand-to-hand experience, or know where the industry is moving.


Traveling up and down as usual (2-3 weeks in London, then l’Arboç, then maybe somewhere else…) sprinkled with some conferences and holidays.

Regarding life, the universe and everything, what I’ve done and where I’ve been
  • In February we visited Hay-on-Wye again, for my birthday
  • In March I convinced Holden Karau (was easy: she loves talking about Spark :D) to be one of our great keynote speakers at PyData Barcelona 2017
  • In late March we visited Edinburgh and Glasgow
  • In early May I attended PyData London to be able to prepare better for ours. Met some great people there.
  • A bit later in May I visited Lisbon for LX Scala, thanks Jorge and the rest for the great work
  • And at the end of May, we held PyData Barcelona 2017, where I was one of the organisers. We had more than 300 attendees, enjoying a lot of interesting talks. Thanks to all attendees and the rest of the organising committee... We made a hell of a great conference
  • Mid-June, I gave my first meetup presentation, Snakes and Ladders (about typing in Python as compared with Scala) in the PyBCN meetup
  • In late June, we visited Cheddar and Wells
  • In September I visited Penrith for the awesome (thanks Jon) Scala World 2017. Looking forward to the 2019 edition.
  • In early October we visited San Sebastian for the Python San Sebastian 2017 conference. We ate terribly well there (we can recommend Bodegón Alejandro as one of the best places to eat anywhere in the world now)
  • Mid-October we visited Bletchley Park. Nice.
  • In late October we (Ernest Fontich and myself) submitted our paper Normal forms and Sternberg conjugation theorems for infinite dimensional coupled map lattice. Now we need to wait.
  • In November we visited Brussels (Ghent and Brugge too), and took an unofficial tour of the European Council with a friend who works there.
  • In December I attended for the second time Scala Exchange, and the extra community day (excellent tutorials by Heiko Seeberger and Travis Brown). Was even better than last year (maybe because I knew more people?) and I already got my tickets for next year.
  • In December we attended a wine and cheese pairing (with Francesc, our man in Brussels, and Laia) at Parés Baltà. They follow biodynamic principles (no herbicides, as natural as they can get, etc) and offer added sulfite free wines, too. They are excellent: neither Laia nor I drink, and we bought 4 bottles of their wines and cavas.
Last year I decided to start contributing to open source software this year, and I managed to become a contributor to the following projects:

I wanted to contribute to the Go compiler code base, but didn’t find an interesting issue. Maybe this year.


This year I didn’t push courses/learning as strongly as last year... Or at least this is what I thought before writing this post.

  • In August I took Apache Kafka Series - Learn Apache Kafka for Beginners, with the rest of the courses in the series waiting for me having more time available.
  • In September I tried to learn knitting and lace, but it does not seem to suit me.
  • In September I enrolled in a weekly Taichi and Qi Gong course by Mei Quan Tai Chi. Will repeat for the next term
  • In December I started learning about Cardistry


I have read slightly less than last year (36 books vs 44 last year), and the main victim has been fiction. Haven’t read much, and the best... has been the re-read of Zelazny’s Chronicles of Amber. Still excellent. I have enlarged my collection of Zelazny books, now I have more than 30.

As far as non-fiction goes, I have specially enjoyed:
  • Essentialism: given how many things I do at once, this book felt quite refreshing
  • Rich dad, poor dad: Nothing too fancy, just common sense. Invest on having assets (money-generating items) instead of liabilities (money-sucking items, like the house you live in)
  • 10% Entrepreneur: Links very well with the above. Being a 10% entrepreneur is a natural way to invest in your assets.
  • The Checklist Manifesto: Checklists are a way to automate your life. I have read several books around this concept (“creating and tweaking systems”, as a concept) and it resonates with me. If I can automate (even if I’m the machine), it’s a neat win.
  • The Subtle Art of Not Giving a F*ck: Recommended read. For no particular reason. I’ve heard that the audiobook version is great, too.


This year I have listened mostly to Sonata Arctica. We attended their concert in Glasgow (March) and it was awesome, they are really good live. This was a build up for KISS at the O2 in London (May) which was totally terrific. And followed by Bat Out of Hell (opening day!) in London. It was great, and probably the closest I’ll ever be to listening Meat Loaf live. Lately I’ve been listening to a very short playlist I have by Loquillo, and also Anachronist.

We have also attended a performance by Penn and Teller (excellent), and IIRC we have also watched just one screening: The Last Jedi (meh, but Laia liked it).


This year I have gotten hold of a lot of gadgets. I mention only the terribly useful or interesting
  • From last year, iPhone 7 “small”. Not happy with it. Battery life sucks big time, I got a external Mophie battery for it.
  • Mid-year: Apple Watch Series 2. Pretty cool, and more useful than I expected.
  • Late this year: AirPods. THEY ARE AWESOME
  • Laptop foldable cooling support. While taking the deep learning course my Air got very hot, and I needed some way to get it as cool as possible.
  • Nutribullet. My morning driver is banana, Kit Kat chunky, milk, golden flax seed, guarana.
  • Icebreaker merino underwear. I sweat a bit, and get easily chaffed on the side of my legs (where it contacts my underwear). Not any more: not only is wool better at sweat-handling, but the fabric also feels better on the skin. And not, does not feel hot in the summer.
  • Double Edge Shaving. I hated shaving (and actually just kept my beard trimmed so it was never a real beard or a clean shave...) and this razor (not this one specifically, safety razors are pretty much all the same) has changed that. Now I shave regularly and enjoy it a lot (together with this soap and this after shave balm)
  • Chilly bottles. They work really well to keep drinks cold or hot. I’ll be getting their food container soon.
  • Plenty of lightning cables. You can never have enough of these. I also got this great multi-device charger, ideal for traveling.
  • Compact wallet. I’ve been shown the ads so many times I finally moved from my Tyvek wallets to one from Bellroy. It is very good.
  • Book darts. Small bookmarks that don’t get lost, look great and can double as line markers. Also, they don’t add bulk to a book, so you can have many in the same book without damaging it at all. They are great, I’m getting a second tin in my next Amazon order of stuff.
  • Two frames from an artist I saw showcased in our previous office (they had exhibits downstairs). Blue Plaque Doors and Hatchard’s, by Luke Adam Hawker.
On the fun side, I also have a spiral didgeridoo, a proper Scottish bagpipes, a Lego Mindstorms I have not played with yet :( and an Arduboy. Oh, and a Raspberry Pi Zero Wireless.

Written by Ruben Berenguel