All Posts

Best Practices

4 articles in this category

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