Blog

Notes on data structures & algorithms, system design, and things I learn along the way.

Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→
September 19, 2026Minimum Spanning Trees: Kruskal, Prim, and the Cut Property5 min read

Connect every node for the least total weight. Two greedy algorithms that both work, the one theorem that explains why, and how to choose between them.

#DSA
September 18, 2026Fenwick Trees: Prefix Sums That Can Change4 min read

A prefix sum array answers range queries in O(1) but costs O(n) to update. A Fenwick tree makes both O(log n) using nothing but the lowest set bit of an index.

#DSA
September 18, 2026Message Queues vs Event Logs: Why Kafka Isn't a Queue5 min read

A queue deletes a message when it's handled; a log keeps it and tracks who has read how far. That one difference decides replay, fan-out, ordering, and how you debug a bad deploy.

#System Design
September 17, 2026The Circuit Breaker: Failing Fast on Purpose5 min read

When a dependency is down, the worst thing you can do is keep waiting for it. Three states, the thresholds that matter, and how a breaker stops one slow service from taking down everything upstream.

#System Design
September 17, 2026RAG Retrieval: Chunking, Embeddings, and Why It Misses5 min read

Most RAG failures are retrieval failures, not generation failures. How chunking and embeddings decide what the model ever sees, the similarity-is-not-relevance trap, and what actually fixes it.

#AI Engineering
September 16, 2026Context Windows: Budgeting Tokens Like Memory5 min read

The window is a budget you refill from scratch every turn. Where the tokens actually go in an agent, why prompt caching is a prefix match, and the difference between clearing context and compacting it.

#AI Engineering
September 16, 2026Retries, Backoff, and Jitter: How to Retry Without Causing an Outage5 min read

A naive retry loop is a denial-of-service attack you wrote yourself. Exponential backoff, why jitter matters more than the backoff, idempotency, and retry budgets.

#System Design
September 15, 2026Sharding and Replication: Splitting a Database That Outgrew One Box5 min read

Replication copies the same data; sharding splits different data. What each one actually buys you, how routing and failover behave, and the problems sharding creates that you have to live with.

#System Design
September 15, 2026Tool Calling: How a Model Picks a Function5 min read

A tool is a name, a description, and a JSON Schema — and the description is prompt text that gets read every turn. Schema design, validation, error messages that repair, and why fewer tools work better.

#AI Engineering
September 14, 2026A* Pathfinding: Dijkstra With a Sense of Direction4 min read

One extra term in the priority function turns an exhaustive search into a guided one. What admissible and consistent heuristics mean, why they preserve optimality, and where A* degrades.

#DSA

148 posts · page 10 of 15