Blog
Production error deep-dives — root cause, reproduction, and the fix that holds.
Wait and Notify in Java: The Rules That Stop the Hangs
wait() and notify() hang or corrupt data when the guard, the lock or the wakeup is wrong. Lost signals, stolen wakeups and notify vs notifyAll, run on JDK 21.
Sleep vs Wait in Java: Which One Releases the Lock?
On JDK 21, with the virtual-thread scheduler pinned to one carrier thread, four virtual threads that each do Thread.sleep(300) finish in 331 ms. Put the same sleep inside a synchronized block and the total is 1,219 ms. Swap the sleep for wait(300) inside the block
Java Memory Model Explained: Happens-Before in Practice
Why one thread can't see another thread's write. The Java Memory Model, reordering, and every happens-before rule explained with code you can actually test.
Java Condition Variables: await/signal vs wait/notify
A Java condition variable gives one lock several wait sets. How await() and signal() work, why one Condition hangs a buffer, and a bounded buffer done right.
How to Implement Comparable and Comparator in Java 21
Sort a warehouse stock list by SKU, name, price and expiry date with Comparable and Comparator on Java 21, then prove the order with 28 runnable checks.
Java Thread States Explained: What RUNNABLE Really Hides
Java thread states, each one demonstrated: what puts a thread in BLOCKED vs WAITING, why RUNNABLE can mean idle in a socket read, and how to read it in jstack.
StackWalker in Java: Walk the Call Stack Without the Cost
StackWalker Java (9+) walks the call stack lazily, so you pay for the frames you read. How it works, its three options, and how it compares to getStackTrace.
Java Stream Stack Trace: Find Your Lambda in the Noise
A failing Java stream gives a stack trace full of ReferencePipeline and Spliterator frames. How to find your lambda in it and write streams that fail clearly.
ZGC Explained: Colored Pointers, Load Barriers, Stalls
How ZGC keeps pauses near zero on big heaps: colored pointers, load barriers, concurrent relocation, allocation stalls, and what generational ZGC changed.
How to Use Optional in Java Without the Common Pitfalls
Replace nested null checks with Optional in a support-ticket service, then see which orElse, get and field habits bite. Java 21 code you can run today.