Skip to main content

Posts

Showing posts with the label fail fast vs fail safe

AI Isn't Replacing Software Engineers. It's Pricing Their Judgment.

A few months ago, in the same week, I read two headlines that had no business existing at the same time. One was about a company bragging that its engineers had basically stopped writing code — AI was doing it for them. The other was about a different company quietly rehiring the senior engineers it had laid off a year earlier, because the AI-built version of their product kept shipping bugs a human would have caught in code review. I run mock interviews for engineers trying to land their next role, and I teach backend development on this channel, so I hear both sides of this panic constantly — from people worried AI is about to make their job irrelevant, and from hiring managers quietly telling me the opposite. I wanted to stop going off vibes and actually dig into what was happening with real numbers. What I found didn't fit neatly into either the "AI is taking our jobs" camp or the "AI is overhyped nonsense" camp. It's stranger than both, and honestly...

Java ConcurrentHashMap vs CopyOnWriteArrayList: CAS, Contention, Retries & Iterators Explained

Introduction Most modern Java applications are  multi-threaded  — whether you are building: Web applications Microservices Background workers Scheduled jobs When multiple threads access  shared data , things can easily go wrong. This article explains — in  simple, beginner-friendly language  — how Java solves concurrency problems using: ConcurrentHashMap CopyOnWriteArrayList CAS (Compare-And-Swap) Low vs High contention Retries Iterator behavior Java version changes (Java 7 vs Java 8+) This guide is useful for: Java backend developers Interview preparation Anyone confused by Java concurrency Why Thread Safety Matters in Java A  race condition  happens when: Multiple threads read and write shared data Execution order becomes unpredictable Data becomes inconsistent Example problems: Lost updates Incorrect counters Random production bugs This is why  thread safety is critical  in Java. Why HashMap and ArrayList Are Not Thread-Safe Collections li...