Cats Core
·
Part 8
Cats Core: ValidatedNec and the Real Difference Between Applicative and Monad
I wrote a tiny Todo validator with cats' ValidatedNec and it made one rule click: you can only accumulate errors when the steps don't depend on each other. That's the whole difference between an Applicative and a Monad.
18 Oct 2026
·
5 min read
·87 views
Scala and the JVM
·
Part 19
Escaping Boolean hell and making Illegal States Unrepresentable in Scala 2.13
A sealed trait removes impossible states from a model, but five details decide whether it holds: constructors, exhaustivity warnings, wildcards, Scala 2 inference and secrets in toString. I compiled each one on Scala 2.13.18.
17 Oct 2026
·
8 min read
·88 views
Learning enumeratum
·
Part 3
Learning enumeratum, part 3: enums in and out of JSON with circe
CirceEnum and IntCirceEnum give every enum a JSON codec that follows entryName or value. Decoding is strict by default, and here's how the failures look and how to relax them on purpose.
16 Oct 2026
·
5 min read
·59 views
Learning enumeratum
·
Part 2
Learning enumeratum, part 2: custom names, fields and value enums
Overriding entryName for legacy strings, naming mixins, enum entries that carry data, and IntEnum/StringEnum, where duplicate codes fail to compile.
15 Oct 2026
·
5 min read
·63 views
Learning enumeratum
·
Part 1
Learning enumeratum, part 1: why not just use scala.Enumeration?
Three ways to model an enum in Scala 2.13 (Enumeration, sealed traits, and enumeratum), with runnable code, and why my team settled on enumeratum.
15 Oct 2026
·
4 min read
·79 views
Cats Core
·
Part 7
Cats Core, Interlude: Reading fa, f and F[_]
In Part 4 I wrote map[A, B](fa: Quote[A])(f: A => B) and moved on, but the letters kept slowing me down. A short break from new type classes: two rules that decode most Cats signatures, and the one name that breaks them.
13 Oct 2026
·
6 min read
·51 views
Cats Core
·
Part 6
Cats Core, Part 6: NonEmptyChain or NonEmptyList for Validation Errors
What the Nec in ValidatedNec guarantees, why errors.toList failed to compile in my Play controller, and when NonEmptyList is the better container.
10 Oct 2026
·
6 min read
·64 views
Cats Core
·
Part 5
Cats Core, Part 5: Combining Optional Amounts with Apply and Applicative
A price and a delivery cost are both optional, and nested map gives me Some(Some(15)). Apply combines independent values into one result, and Applicative adds the starting value a whole cart needs.
10 Oct 2026
·
6 min read
·72 views
Scala and the JVM
·
Part 18
Spring Boot to Scala and Play on a live site, without losing an email
I replaced this site's Spring Boot backend with Scala 2.13, Play 3, Anorm and Twirl in one pull request. The rewrite was the easy part: this is how I fixed the contracts, kept the outbox wire format, and rehearsed the rollback on a restored production backup.
9 Oct 2026
·
6 min read
·102 views
Cats Core
·
Part 4
Cats Core, Part 4: Teaching Cats to Map Our Own Types
List and Option already know how to map. I give my own Quote a Functor instance, reuse the same discount function, and trace why identity and composition matter.
8 Oct 2026
·
6 min read
·70 views