All Posts

Best Practices

Page 1 of 1

Do You Need a Functional Library or Just Better Habits?

Do You Need a Functional Library or Just Better Habits?

Adding a functional library to a Java codebase rarely solves the underlying problem on its own. Sometimes the library is the right answer. Sometimes the problem is discipline, naming, and design — and a library just gives bad habits a fancier vocabulary.

How to Introduce Functional Programming into a Legacy Codebase

How to Introduce Functional Programming into a Legacy Codebase

Legacy systems do not need a rewrite to benefit from functional programming. The right approach is incremental: find the seams, wrap the dangerous parts, and grow functional islands outward. A practical guide for Java teams working with existing production code.

When "Making It Functional" Actually Makes the Code Worse

When "Making It Functional" Actually Makes the Code Worse

Functional idioms improve code when applied to the problems they solve. Applied to problems they do not solve, they add ceremony, obscure intent, and hurt performance. This post catalogs the specific cases where the functional version is the worse version — and why.

Refactoring Object-Oriented Code Toward a Functional Style

Refactoring Object-Oriented Code Toward a Functional Style

A practical, step-by-step guide to moving Java code from a mutable, exception-driven OO style toward immutable, composable functional pipelines — without rewriting everything at once.

Testing in Functional Programming: Why It Is Often Simpler

Testing in Functional Programming: Why It Is Often Simpler

Pure functions, immutable data, and typed errors remove most of the friction in unit testing. This post explains why FP code is inherently easier to test, and shows concrete examples using Java and dmx-fun types.

Common Anti-Patterns When Writing Functional Code in Java

Common Anti-Patterns When Writing Functional Code in Java

Functional style in Java is easy to get subtly wrong. This post walks through the most common mistakes — from returning null inside a mapper to leaking shared mutable state into a stream — and shows how to fix each one.

Functional Composition Patterns

Functional Composition Patterns

Explore powerful composition patterns to build complex functionality from simple, reusable functions