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 26, 2026Quickselect: The kth Smallest Element in Linear Time4 min read

Quicksort recurses into both halves. Quickselect recurses into one — and that single change drops the expected cost from O(n log n) to O(n). How it works, why it's linear, and when a heap is the better call.

#DSA
September 26, 2026Skip Lists: A Balanced Tree Built Out of Coin Flips5 min read

A sorted linked list with express lanes stacked on top. Search, insert and delete in O(log n) expected time, with no rotations and no rebalancing — just a random height for each new node. Why Redis sorted sets use one.

#DSA
September 25, 2026Cursor vs Offset Pagination: Why Page 2 Shows You Page 1 Again4 min read

OFFSET is a position in a result set that keeps changing, and it gets slower the deeper you go. A cursor is a value in the data. When each one is the right answer.

#System Design
September 25, 2026Dates, Timezones, and Why Temporal Exists5 min read

An instant and a wall-clock reading are different things, and Date conflates them. What DST actually does to your data, and how Temporal's types stop the bugs at the point of modelling.

#JavaScript
September 25, 2026Dual Writes and the Outbox Pattern4 min read

Save the row, then publish the event. Two writes, no shared transaction, and a window where one succeeds and the other doesn't. Why no ordering fixes it, and what does.

#System Design
September 25, 2026Evals: How You Know the Change Helped6 min read

Prompt engineering without measurement is guessing with extra steps. How to build an eval set from real traffic, pick a grader that isn't lying to you, and avoid tuning your way to a number that means nothing.

#AI Engineering
September 25, 2026Prompt Injection: The Vulnerability You Can't Prompt Your Way Out Of5 min read

Everything an agent reads is input, and a model has no structural way to separate instructions from data. Why mitigations in the prompt are not a boundary, and where the real one goes.

#AI Engineering
September 25, 2026Catastrophic Backtracking: How a Regex Takes Down a Server4 min read

A twenty-character input, a regex that looks fine, and a CPU pinned for minutes. Why backtracking engines go exponential, how to spot the pattern, and what to do instead.

#JavaScript
September 25, 2026What an Embedding Actually Is4 min read

A list of numbers where distance means similarity. What cosine similarity measures, why the same word can have two vectors, and the queries embeddings are quietly bad at.

#AI Engineering
September 24, 2026AbortController: Cancellation That Actually Cleans Up4 min read

Promises have no cancel button. AbortController is the standard signal that does — for fetch, event listeners, streams, timers, and your own async functions.

#JavaScript

148 posts · page 8 of 15