#fundamentals
22 posts
Foundational posts — the explanations I wish I had when I was learning these topics myself.
Caching from First Principles: Policies, LRU, and Cache Tiers
Learn cache reads and writes, invalidation, read-through loading, eviction, and an LRU implementation with operation traces.
backenddistributed-systemsfundamentalssystem-designEstimate Capacity, Find Bottlenecks, and Set Useful SLOs
Use powers of ten to size storage, caches, and servers, then reason about throughput, latency, availability, and service targets.
backenddistributed-systemsfundamentalssystem-designStorage from First Principles: Logs, Indexes, and Transactions
Connect key-value logs, documents, relational tables, indexes, SQL, normalization, and transactions through worked examples.
backenddistributed-systemsfundamentalssystem-designFrom Code to Service: Requests, APIs, and Web Servers
Follow requests from clients to web servers, clarify requirements, and understand APIs, protocols, concurrency, and application tiers.
backenddistributed-systemsfundamentalssystem-designSystem Design Estimates: A Powers-of-Ten Cheat Sheet
A junior-friendly system design interview cheat sheet: powers of ten, time conversions, QPS, storage, bandwidth, cache load, and collision math.
backenddistributed-systemsfundamentalssystem-designRoute and Deliver Requests: Load Balancers, DNS, and CDNs
Understand proxies, health checks, redundant load balancers, DNS routing, anycast, and CDN caching through a photo app.
backenddistributed-systemsfundamentalssystem-designReplication and Consistency: Leaders, Quorums, and CAP
Trace replication lag, multi-leader conflicts, quorum reads and writes, failure tolerance, and CAP with concrete examples.
backenddistributed-systemsfundamentalssystem-designSharding and System Design: Placement, Movement, and Trade-offs
Work through shard keys, modulo routing, logical buckets, consistent hashing, migrations, and three complete design reviews.
backenddistributed-systemsfundamentalssystem-designUnique IDs: Counters, Base62, Hashes, and Key Pools
Work through ID generation with Base62 code, capacity math, collision handling, coordinated ranges, and pre-generated key pools.
backenddistributed-systemsfundamentalssystem-designNeural 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.
machine-learningllmsneural-networksfundamentalsA 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.
machine-learningllmsfundamentalsIntro 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.
machine-learningllmsfundamentalsThe 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.
securitygolangjavascriptfundamentalsVectors 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.
mathematicsmachine-learningfundamentalsDerivatives 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.
mathematicsmachine-learningfundamentalsProbability 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.
mathematicsmachine-learningfundamentalsA 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.
mathematicsmachine-learningfundamentalsBackpropagation: 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.
mathematicsmachine-learningfundamentalsEmbeddings 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.
mathematicsmachine-learningfundamentalsThe 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.
mathematicsmachine-learningfundamentalsThe 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.
mathematicsmachine-learningfundamentalsDatabase 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.
databasesqlfundamentals