# Writing

> Deep dives into how things work and notes from building them.

Source: https://www.harxit.com/writing

- [Why Database Indexes Are Fast Until They Aren't](https://www.harxit.com/blog/why-database-indexes-are-fast-until-they-arent) (May 25, 2026) — You add an index and the query becomes instant. A week later, writes are slower, disk usage is up, and the planner ignores it anyway.
- [How Does WhatsApp Encryption Work?](https://www.harxit.com/blog/how-whatsapp-encryption-works) (April 19, 2026) — Paint mixing, rotating keys, prekeys, and the places encryption stops protecting you.
- [GPU Encoding Is Not What You Think It Is](https://www.harxit.com/blog/gpu-encoding-nvenc-vs-cpu-codecs) (April 8, 2026) — NVENC, x264, H.265, and why your GPU has a secret chip that encodes video without touching a single CUDA core.
- [How HLS Video Streaming Works](https://www.harxit.com/blog/how-hls-video-streaming-works) (April 8, 2026) — Segments, playlists, and adaptive bitrate. How one video becomes hundreds of files before you press play.
- [How to Store Big Files in the Browser](https://www.harxit.com/blog/how-to-store-big-files-in-the-browser) (April 7, 2026) — Learn how the Origin Private File System stores large browser files, supports random access, and enables SQLite and worker-based storage.
- [How UPI Actually Moves Your Money](https://www.harxit.com/blog/how-upi-actually-moves-your-money) (April 6, 2026) — You tap a button and money teleports. Here's what actually happens in those 3 seconds.
- [Minimal Docker](https://www.harxit.com/experiments/minimal-docker) (April 6, 2026) — A tiny container runtime built in Go to understand namespaces, chroot, proc mounts, and basic cgroup v2 limits.
- [Autocomplete Is Just a Tree (Until It Isn't)](https://www.harxit.com/blog/autocomplete-is-just-a-tree-until-it-isnt) (April 5, 2026) — You type a few letters, suggestions appear. Behind that is a trie, then ranking, then a mess of heuristics.
- [Why 'Undo' Is One of the Hardest Features in Software](https://www.harxit.com/blog/why-undo-is-one-of-the-hardest-features-in-software) (April 4, 2026) — Why reliable undo and redo require command inversion, grouping, state dependencies, branching history, and special handling for collaboration.
- [Myers Gives You a Shortest Path, Not the Best One](https://www.harxit.com/blog/myers-gives-you-a-shortest-path-not-the-best-one) (April 3, 2026) — There are many valid diffs for the same change. Myers just picks the first one it finds.
- [How Google Docs Syncs Multiple People Editing The Same Document?](https://www.harxit.com/blog/how-google-docs-syncs-multiple-people-editing-the-same-document) (April 2, 2026) — Real-time collaborative editing looks impossible until you stop syncing state and start syncing intent.
- [Building Diff Is Way Harder Than It Looks](https://www.harxit.com/blog/building-diff-is-way-harder-than-it-looks) (March 31, 2026) — I thought diff was a simple loop. It's actually a shortest-path problem.
- [How Image Compression Actually Works](https://www.harxit.com/blog/how-image-compression-actually-works) (March 30, 2026) — Learn how JPEG and PNG compression turn raw pixels into smaller files using transforms, prediction, LZ77, and Huffman coding.
- [Hello World](https://www.harxit.com/blog/hello-world) (March 29, 2026) — Why I built this personal software blog and what I plan to write about: engineering, products, experiments, tools, and practical lessons.
- [Simple React Query](https://www.harxit.com/experiments/simple-react-query) (May 1, 2025) — A minimal implementation of React Query from scratch. Caching, tag-based invalidation, and automatic revalidation in ~200 lines.
- [Minimal React Router](https://www.harxit.com/experiments/minimal-react-router) (April 1, 2025) — A zero-dependency client-side router built with React Context and the History API. ~100 lines of code.
- [A Minimal Implementation of Global Store in React](https://www.harxit.com/experiments/react-state-management) (March 1, 2025) — A minimal global state management library inspired by Zustand, built to understand how state management works under the hood.
- [Minimal Virtual DOM](https://www.harxit.com/experiments/minimal-virtual-dom) (February 1, 2025) — A ~100 line virtual DOM implementation. Virtual nodes, rendering, and diffing from scratch in plain JavaScript.
- [LLM Token Visualizer](https://www.harxit.com/experiments/llm-token-visualizer) (January 1, 2025) — An interactive tool for understanding how language models break text into tokens. Visualize tokenization, inspect token metadata, and learn why it matters.
