Blog
Things I've figured out, half-figured out, and written up before I could talk myself out of it.
-
Neural Networks, Transformers, and How LLMs Learn
The machinery the deep dive skipped: how a neural network and the Transformer work, what loss really means, and how reinforcement learning trains a model.
-
A Deep Dive into How LLMs Are Built
How a model like ChatGPT is built stage by stage — pretraining, fine-tuning, reinforcement learning — and why it hallucinates and needs tokens to think.
-
Stop Re-Explaining Yourself to Your AI Coding Tools
Make Claude, Codex, and Gemini efficient: externalize knowledge into files, turn repetition into commands, skills, and hooks, and stop starting from scratch.
-
Intro to Large Language Models
A plain-English tour of how LLMs work: what they physically are, how they're trained, the OS-like ecosystem around them, and their security issues.
-
Postgres Concurrency Internals: Connections, Locks, and MVCC
A practical guide to how Postgres handles many concurrent clients — process-per-connection, pooling, lock manager, MVCC tuples, deadlocks, and pg_locks.
-
Database Replication: Strategies, Topologies, and What to Use When
A practical guide to PostgreSQL replication — physical vs logical, sync vs async, single-leader / multi-leader / leaderless, and replica-read rules.
-
Postgres Partitioning: Strategies, Real Advantages, and Pitfalls
A practical guide to PostgreSQL partitioning — RANGE, LIST, HASH, pruning, local indexes, real advantages, and the pitfalls that bite in production.
-
Sharding Postgres: When One Database Stops Being Enough
Sharding PostgreSQL at scale — shard keys, routing, distributed transactions, online rebalancing, and the 15 complexities every team eventually hits.
-
The Crypto Module: Hashing, Encryption, and What to Use When
A practical guide to cryptography primitives available in every language — hashing, salting, HMAC, AES encryption, and secure random. Know what to use when.
-
Vectors and Matrices: The Language Neural Networks Speak
A ground-up introduction to vectors, matrices, dot products, and matrix multiplication — the operations every neural network is built from.
-
Derivatives and Gradients: Teaching Machines to Improve
Derivatives, the chain rule, partial derivatives, the gradient, and gradient descent — the calculus that drives every step of neural network learning.
-
Probability and the Gaussian: How Neural Networks Express Uncertainty
Probability distributions, the Gaussian, softmax, and cross-entropy loss — the tools neural networks use to express uncertainty and produce predictions.
-
A Neural Network from Scratch: Perceptrons, Layers, and Forward Pass
Build a neural network layer by layer — the perceptron, activation functions (ReLU, sigmoid, tanh), and a complete worked forward pass.
-
Backpropagation: How Neural Networks Learn from Mistakes
A complete walkthrough of backpropagation — the chain rule applied to computation graphs. Includes a worked numerical example through a 2-layer network.
-
Embeddings and Similarity: Turning Words into Vectors
How neural networks represent words as dense vectors, why dot products measure similarity, and how cosine similarity finds related concepts.
-
The Attention Mechanism: How Transformers Focus
A detailed walkthrough of scaled dot-product attention — Query, Key, and Value matrices, the softmax operation, and a complete numerical example.
-
The Transformer and GPT: Putting It All Together
Multi-head attention, positional encoding, layer normalisation, and the feed-forward sublayer. A complete step-by-step forward pass through GPT.
-
People, Character, and the Foundation of Learning
Who to build with, why long-term games compound everything, and how to build the reading habit that underpins Naval Ravikant's entire framework.
-
Leverage, Scale, and What the Internet Changed
Specific knowledge is the what. Leverage is the how. The four types, why code and media are permissionless, and what the internet permanently changed.
-
Specific Knowledge Is Your Moat
The skills that make you irreplaceable cannot be taught in classrooms. Naval on specific knowledge, skill stacking, and why build plus sell beats either alone.
-
The Luck You Can Engineer
Naval Ravikant identifies four types of luck — most of the ones that matter for wealth are ones you can systematically engineer.
-
Wealth, Money, and Status: Getting the Definitions Right
Wealth, money, and status are three different things most people conflate. Naval Ravikant explains why the distinction changes everything.
-
B-Trees and B+ Trees: From Binary Trees to Database Indexes
If you know binary search trees, you are halfway to understanding how databases find your data. B-trees are BSTs that got wide on purpose — here is why.
-
PostgreSQL Indexing: Internals, Types, and Trade-offs
A practical guide to PostgreSQL indexes: B-tree, GIN, GiST, BRIN, hash — when to use each, composite key ordering, and CONCURRENTLY pitfalls.
-
Go Profiling: From pprof to Flame Graphs
A practical guide to CPU, heap, goroutine, and trace profiling in Go — when to use each tool, how to wire it into a service, and how to read the output.
-
PostgreSQL EXPLAIN: Reading and Understanding Query Plans
How to read PostgreSQL EXPLAIN output: scan types, join algorithms, and the cost model — turn opaque query plans into actionable insights.
-
How Databases Actually Store and Find Your Data
A bottom-up look at how databases physically store data — pages, heaps, B-trees, clustered indexes, and row IDs.
-
ACID, Read Phenomena, and Isolation Levels: What to Use When
A practical guide to database transactions — ACID, five concurrency anomalies, isolation levels, MVCC vs locks, and choosing the right level.
-
Database Normalization: 1NF through 5NF Explained
A practical guide to database normalization — 1NF through 5NF, when to denormalize, and the pitfalls teams hit. With concrete data examples.