My Blogs#
Welcome to my blog section, where I share in-depth articles, technical insights, and perspectives on various topics in technology, software engineering, AI, and innovation. These are explorations of ideas, technical deep-dives, and experiences from my journey in the tech world.
Oil and water don’t mix. This fundamental law of chemistry has frustrated cooks for millennia. Yet some of the world’s most celebrated sauces exist precisely because skilled cooks learned to break this rule. Welcome to the emulsion laboratory, where we force incompatible liquids into stable, creamy suspensions through the manipulation of lipids and proteins.
Understanding Emulsions: The Physics of the Impossible An emulsion is a suspension of tiny droplets of one liquid distributed throughout another liquid that it normally can’t mix with. In culinary terms, this usually means oil droplets suspended in water (or water-based liquids).
...
Three months into my first software engineering job, I was absolutely certain I knew everything.
Well, not everything. But I’d built a few projects, shipped some features, and felt pretty comfortable. When senior engineers talked about “architectural concerns” or “scalability tradeoffs,” I’d nod knowingly, thinking I got it.
Then the production incident happened.
Friday, 4:47 PM. The API started returning 500 errors. Users were locked out. Revenue was bleeding.
My manager: “Can you look into this? You built this service.”
...
The Roller Coaster Problem The Roller Coaster Problem, introduced by Allen Downey in “The Little Book of Semaphores,” demonstrates multi-phase synchronization and cyclic barriers. It’s a perfect model for batch processing systems where work happens in coordinated phases.
The Scenario A roller coaster ride has:
A car with capacity C passengers Passengers continuously arriving and queuing The car cycles through: board → ride → unboard → repeat The rules:
Car waits until exactly C passengers are ready Passengers can’t board until car is empty Car can’t run until full Passengers must unboard before new passengers board Process repeats indefinitely The Challenge: Three-Phase Coordination Each ride has three synchronized phases:
...
The Search-Insert-Delete Problem The Search-Insert-Delete Problem extends the classic Readers-Writers problem with three different access patterns instead of two. It demonstrates how to coordinate multiple operation types with different compatibility requirements - a common challenge in database systems and data structures.
The Scenario Three types of goroutines access a shared list:
Searchers - Read the list without modifying it Inserters - Add new elements to the list Deleters - Remove elements from the list Compatibility rules:
...
Sauce Series Current: Module 3: Americas Module 2: Europe All Posts Module 4: Africa & Middle East The Americas don’t follow European rules.
...
The Writer Starvation Problem In the readers preference solution, we saw how continuous readers can starve writers. The writers preference solution fixes this by giving writers priority.
Key idea: When a writer is waiting, no new readers are allowed to start, even if other readers are currently reading.
Real-World Need for Writer Priority Some systems need writer priority:
Databases with critical updates (billing, inventory) Real-time systems (sensor updates must not be delayed) Logging systems (log writes can’t be delayed) Configuration systems (updates must propagate quickly) Leader election (state changes need priority) The Solution Go’s sync.RWMutex uses readers preference, so we need to implement writer preference manually using additional synchronization:
...
The foundation of French haute cuisine rests on a single principle: controlled viscosity through starch gelatinization and reduction. Before molecular gastronomy, before emulsions and hydrocolloids, there was flour, fat, and time. Understanding these foundations transforms cooking from following recipes to manipulating physics.
The Physics of Roux: Why Cooking Flour in Fat Matters At its core, a roux is a suspension of starch granules in fat, heated to unlock thickening potential while developing flavor complexity. The transformation happens in three stages, each with distinct properties and uses.
...
From Unbounded to Bounded In the previous article, we explored the unbounded buffer pattern where the queue could grow infinitely. This works until you run out of memory!
The bounded buffer adds a crucial constraint: maximum queue size. This introduces backpressure - when the buffer is full, producers must wait for consumers to catch up.
Why Bounded Buffers Matter Bounded buffers appear everywhere in production systems:
TCP sliding windows (flow control) HTTP/2 stream flow control (prevents overwhelm) Message queue limits (RabbitMQ, Kafka partition limits) Thread pool queues (bounded task queues) Rate limiters (token buckets with finite capacity) Circuit breakers (limit concurrent requests) The key benefit: Bounded buffers provide natural backpressure and prevent resource exhaustion.
...
While Western cuisine builds complexity through time and reduction, much of the world’s flavor architecture begins with pastes-concentrated flavor bombs created through pounding, grinding, and extracting essential oils from fresh and dried ingredients. These pastes aren’t just seasoning; they’re the structural foundation upon which entire cuisines are built.
The Two Methods of Flavor Extraction Before diving into specific pastes, understand the two fundamental approaches to extracting flavor from spices and aromatics:
...
I spent six months writing code that I thought was good.
My process:
Build a feature Test it locally Ship it to production Move on to the next feature What I never did: Get feedback on the quality of my code.
The result: I got very good at writing bad code quickly.
Then my company hired Elena, a senior engineer.
Her first week, she instituted a new rule: “No code gets merged without a code review from someone senior.”
...