Type-safe Python design: patterns a Scala developer uses to stop runtime surprises
Stop runtime surprises with 24 type-safety patterns from Scala. Native Python stdlib only: NewType, Result, Protocol, phantom types, monads. No pip installs.
Software Engineering, Data Engineering, Functional Programming, Scala, GNU/Linux, Data, AI/ML, and other things
Stop runtime surprises with 24 type-safety patterns from Scala. Native Python stdlib only: NewType, Result, Protocol, phantom types, monads. No pip installs.
A code review operating system for serious codebases: A practical JVM and Scala focused code review system: severity rubric, CI-friendly PR workflow, SOLID + FP patterns, checklists, Mermaid diagrams, and comment templates.
Deep-dive into llm4s, a production-grade Scala framework for building LLM applications. From type-safe error handling to provider abstraction and context management, it covers agent orchestration and shipping reliable LLM systems in Scala.
Deep-dive guide to effect polymorphism in Scala using F[_] and type classes. Write generic code that works with Cats-Effect or ZIO, then swap runtimes later. Learn EffectSystem patterns, Kleisli composition, and examples from flowforge.
After five major contributions across error handling, type safety, and safety utilities, here are the production patterns that work and the ones that do not. A practical summary of trade-offs, guardrails, and what we kept in llm4s.
Stop swallowing errors in try-catch blocks. Build safety utilities that preserve context, enable composition, and make errors type-safe. Real refactor from llm4s eliminated 47 try-catch blocks, fixed a streaming bug, and simplified code.
Stop typos from reaching production. Replace string constants with enums, add type classes for effect polymorphism, and let the compiler catch bugs. Real refactor from llm4s prevented message role typos and added type class infra.
Stop letting invalid errors exist. Build smart constructors that validate at creation time, eliminate boolean flags with traits, and simplify code through better abstractions. Real refactor from llm4s removed 263 lines and added structure.
Stop runtime exceptions from crashing LLM pipelines. Build type-safe error hierarchies with Scala Either, ADTs, and smart constructors. Real refactor from llm4s turned generic exceptions into 12+ structured error types and debugging.