5 Common Code Smells in Java and How to Fix Them
Five anti-patterns I see in production code review: why they matter for maintainability and reliability, and the minimal-cost refactors that close them without breaking calling code.
Systems Engineering
Notes and how-tos on distributed systems, billing platforms, reliability, and the Java/backend craft behind them. Written to help other engineers.

26 articles
Five anti-patterns I see in production code review: why they matter for maintainability and reliability, and the minimal-cost refactors that close them without breaking calling code.
A practical reference of 25 Git commands for everyday version control and collaboration, with the scenario where each one earns its place.
How the Karatsuba algorithm multiplies large numbers faster than long multiplication, trading one multiplication for a few additions to bring the cost from quadratic down to about n^1.585.
What Java's volatile keyword actually guarantees (visibility of writes across threads) and what it does not (atomicity and mutual exclusion), and why compound operations still need synchronization.
How Java 17 turns the old switch statement into a switch expression, with arrow labels, yield, and exhaustiveness checks that make branching cleaner and safer.
A Java concurrency note on when to reach for Thread versus ThreadLocal, how per-thread isolation avoids shared-state bugs like the classic SimpleDateFormat race, and how the two work together for thread-safe code.
Explore by tag