Blog
Production error deep-dives — root cause, reproduction, and the fix that holds.
Java OutOfMemoryError: Java Heap Space - Causes and Fixes
java.lang.OutOfMemoryError: Java heap space and GC overhead limit exceeded, explained: reproduce both, read the GC log, find the leak, and fix it properly.
How to Convert Date, Instant, LocalDateTime in Java 21
Convert java.util.Date, Timestamp, Calendar and epoch millis to Instant and LocalDateTime in Java 21, with zone-safe code and checks on a parcel tracker.
How to Remove Duplicates From a List in Java and Keep Order
How to remove duplicates from a list in Java and keep order: LinkedHashSet, distinct(), removeIf and by-key dedupe, on a parcel-scan feed with 21 checks.
How to Implement the Chain of Responsibility Pattern in Java
Build an order desk in Java 21 with the chain of responsibility pattern: validators reject, approvers escalate, and a trail shows who decided. Gradle, tested.
Flink Heartbeat of TaskManager Timed Out: Causes and Fixes
Fix the Flink 'Heartbeat of TaskManager with id ... timed out' error. Real causes — GC pauses, OOMKilled pods, network saturation — and the exact config fixes.
How to Use var in Java Without Hurting Readability
Learn how to use var in Java 10+ on a parcel tracker: where it helps, the diamond and ternary traps, 12 compiler errors forced on purpose, and 11 checks.
How to Implement the Builder Pattern in Java (Java 21)
Build an immutable room booking in Java 21 with a nested builder, validation in build(), toBuilder() copies and a step builder, all compiled and run.
How to Use ConcurrentHashMap in Java: A Stock Service
Build a thread-safe stock service in Java 21 with ConcurrentHashMap: merge, compute, computeIfAbsent, and the get-then-put trap that lost 300,000 updates.
How to Read and Write Files in Java with NIO.2 (Java 21)
Build a parcel scan log in Java 21 with NIO.2: append, stream, atomically replace and archive files, plus 20 checks and the errors I hit on purpose.
How to Filter and Transform a List with Java Streams
Turn a for loop into a Java streams pipeline that filters and transforms a list. Build a gradebook in Java 21, trip every classic mistake, and check it all.