the log
Field
notes.

Aug 19, 2026 · 6 min read
What a Vector Database Actually Does (That a Normal Database Can't)
ORDER BY embedding <-> query_vector looks like it should just work. It doesn't — not because of syntax, but because a B-tree has no concept of 'closest' across hundreds of dimensions at once.

Aug 14, 2026 · 6 min read
The Chunk-Boundary Problem Nobody Warns You About
A clean 60-word chunking function that does exactly what it's told — and still manages to split 'penalty' from what caused it. The fix isn't smarter splitting, it's letting neighboring chunks share a little of each other on purpose.

Aug 13, 2026 · 6 min read
TF-IDF, BM25, and Embeddings Are More Related Than You Think
The usual story is a straight upgrade path — keyword search, then TF-IDF, then BM25, then embeddings. That's wrong in a specific way: it's a family tree that forks, and three of these four methods are close cousins while the fourth isn't in the family at all.

Aug 12, 2026 · 5 min read
Why Your RAG System Needs to Say "I Don't Know"
top_k doesn't know the difference between the best of five great matches and the least-terrible of five terrible ones. A retrieval function that always returns something isn't more helpful — it's just failing silently instead of failing loudly.

Aug 9, 2026 · 5 min read
Cosine Similarity, Explained With Your Hands
A vector ten times larger than another, pointing in the exact same direction, scores as a worse match under plain distance — the fix isn't a better distance formula, it's asking a different question: angle, not gap.

Aug 9, 2026 · 6 min read
What Is an Embedding, Actually?
Two sentences that share exactly one word — 'the' — and mean almost the same thing. Why word-matching fails at this, and what it actually means to represent meaning as a point in space instead.

Aug 6, 2026 · 6 min read
staleTime vs invalidateQueries: Who Wins?
A 60-second staleTime clock with 45 seconds left on it versus an invalidateQueries call fired 30 seconds ago — it sounds like a race between two timers, and that instinct is exactly backwards.

Aug 4, 2026 · 7 min read
Next.js Has Four Different Caches. Here's What Each One Actually Does
TanStack Query's cache, the Data Cache, the Router Cache, and the database itself — four separate systems that don't know about each other, plus a decision table for figuring out which one is actually serving stale data.

Aug 3, 2026 · 7 min read
One QueryClient or Two? The Server/Browser Singleton Pattern Explained
Two QueryClient implementations sitting in the same project, both correct in isolation — until you trace why the server needs a fresh one every time while the browser needs the exact same one forever.

Aug 2, 2026 · 7 min read
prefetchQuery, dehydrate, HydrationBoundary: A Visual Walkthrough
Why a server-rendered TanStack Query page still flashes a loading spinner, and how prefetchQuery, dehydrate, and HydrationBoundary work together to eliminate it — one function at a time.

Aug 1, 2026 · 4 min read
Does the src Folder Actually Matter in Next.js?
You clicked through a setup prompt without reading it. Here's what you actually chose, and whether it matters.

Jul 31, 2026 · 6 min read
Why Does My Server Component Need an Absolute URL?
Why fetch('/api/posts') works in a Client Component but throws in a Server Component — and why the failure can hide silently inside prefetchQuery instead of erroring loudly.

Jul 30, 2026 · 7 min read
Server Components vs Client Components: The Mental Model Nobody Explains Properly
The real rule behind Next.js's Server/Client boundary: it propagates through import statements, not JSX nesting — which is why a root layout can wrap the whole app in a provider without going fully client-side.

Jul 29, 2026 · 7 min read
TanStack Query in Plain English: What Actually Happens When You Call useQuery
A plain-English walkthrough of what useQuery actually does under the hood — the cache, queryKey, staleTime, and invalidateQueries, all as one consistent rule.

Jul 29, 2026 · 7 min read
Why I Stopped Using useEffect for Data Fetching
Five real problems with useEffect-based data fetching — no caching, duplicate requests, race conditions — and how TanStack Query solves each one.