Scala and the JVM · Part 10
Scala's Cake Pattern, One Dependency at a Time
I rebuilt Scala's Cake Pattern as a small checkout application, then traced its component traits, self-type requirements and test wiring from a Java and Spring perspective.
Field Notes
Notes on event-driven Java, Spring Boot, Kafka, and secure systems for regulated banking.
Scala and the JVM · Part 10
I rebuilt Scala's Cake Pattern as a small checkout application, then traced its component traits, self-type requirements and test wiring from a Java and Spring perspective.
Scala and the JVM · Part 9
A familiar Java interface idea becomes a Scala trait: define a policy repository, implement find, and inherit an exists method that calls the concrete lookup.
Start with one input, one target, and one adjustable weight. Calculate a derivative by hand, apply a gradient-descent update, and verify every number in PyTorch.
LLMs, the whole thing · Part 11
Chapter 5 connects next-token loss to real parameter updates, then separates training from decoding. My notes on batches, perplexity, validation, sampling, checkpoints, and pretrained GPT-2 weights.
Scala and the JVM · Part 8
I knew how to run sbt, but not how its build model worked. I built a small Scala 2.13 project and traced settings, tasks, scopes, Zinc, dependencies, Coursier and local publication back to the Maven concepts I already knew.
Scala and the JVM · Part 7
From one generator and an if guard to two lists and six combinations: I trace Scala for-comprehensions back to map, withFilter and flatMap, with runnable policy examples.
Scala and the JVM · Part 6
Three familiar operations, three different results. I explore Scala List with fictional insurance policies, compare it with Java streams, and reconnect find with Option.
Scala and the JVM · Part 5
Find a policy, find its email, and build a label. Understanding Scala 2 for-comprehensions by translating them into familiar flatMap and map calls, with all three optional outcomes made explicit.
I built a daily French-news webtoon with the Codex SDK, then moved its reader to ChatGPT Sites. Here is the actual architecture: local generation, a Worker API, D1 and R2 storage, and uploads that survive retries.
Scala and the JVM · Part 4
Transform a value inside Option, then choose a fallback where it belongs. A walkthrough for Java developers of Scala 2 map, lambdas and getOrElse, derived from match and verified in a runnable lab.