All Posts

Article

42 posts · Page 4 of 5

How to Model Data Transformation Pipelines

How to Model Data Transformation Pipelines

Ad-hoc transformation code grows into spaghetti because there is no shared vocabulary for what a stage is, what it produces, or how failures propagate. Functional types give you that vocabulary — typed stage boundaries, composable error handling, and batch pipelines that separate failures from successes without stopping the whole run.

Currying and Partial Application in Practice

Currying and Partial Application in Practice

Currying sounds like academic theory. Partial application is something Java developers already do every day — they just don't name it. This post names it, distinguishes the two concepts, and shows five situations where partial application makes real production code cleaner.

Designing More Expressive APIs with Functional Types

Designing More Expressive APIs with Functional Types

A method signature is a contract. Most Java APIs break that contract silently — returning null, throwing undeclared exceptions, or hiding multiple outcomes behind a boolean. Functional types turn vague promises into honest, self-documenting interfaces.

Pattern Matching and Domain Modeling

Pattern Matching and Domain Modeling

Sealed types make your domain states explicit and exhaustive. Pattern matching forces every caller to handle them all. Together they turn a class of runtime surprises into compile-time errors — and make the business model readable in the type signatures.

Lazy Evaluation: When It Helps and When It Complicates Things

Lazy Evaluation: When It Helps and When It Complicates Things

Lazy evaluation defers a computation until its result is actually needed. That single idea eliminates wasted work, enables safe default values, and defers heavy initialization — but it also introduces traps around side effects, debugging, and error timing that you need to know before reaching for it.

Higher-Order Functions Explained with Real Examples

Higher-Order Functions Explained with Real Examples

Higher-order functions are not just map and filter. They are the mechanism behind every composable pattern in functional programming — Strategy, Decorator, Policy, pipeline — explained through real backend Java code.

How to Write More Predictable Code with Functional Programming

How to Write More Predictable Code with Functional Programming

Predictable code is code you can understand without reading everything around it. Functional programming gives you three concrete tools to get there: pure functions, honest signatures, and immutable values.

What Functional Programming Means for a Backend Engineer

What Functional Programming Means for a Backend Engineer

Functional programming is not about category theory, monads, or switching languages. For a backend engineer, it is a practical set of constraints that eliminate an entire class of bugs, make failures visible, and produce code that is easier to test and reason about.

JDK-First Functional Programming: How Far Can You Go Without Dependencies?

JDK-First Functional Programming: How Far Can You Go Without Dependencies?

Java 25's standard library ships with records, sealed interfaces, pattern matching, streams, and Optional. Before reaching for a library, how much functional programming can you express with the JDK alone — and where does it start to hurt?