Notes

Study notes from my classes and side projects, enhanced with AI and code to make them more visual and engaging. Feel free to poke around.

2021-02-28

Distributed Systems

Fencing Tokens and Monotonic IDs: Making Distributed Locks Actually Safe

How fencing tokens prevent stale writes from expired leases, why the lock server alone cannot guarantee safety, how monotonically increasing tokens make the storage layer the final arbiter, and the connection to linearizability.

2021-02-27

Distributed Systems

Distributed Locks and Why They Are Hard

How lease-based distributed locks work, why process pauses and clock skew make them dangerous, the Redis SETNX pattern, the Redlock algorithm and its controversy, and when to use distributed locks vs when to avoid them entirely.

2021-02-26

Distributed Systems

Pessimistic vs Optimistic Locking: Controlling Concurrent Access

How pessimistic locking (SELECT FOR UPDATE) and optimistic locking (version columns, CAS-style updates) prevent race conditions in concurrent systems, when each strategy wins, and the trade-offs in throughput, latency, and deadlock risk.

2021-02-25

Distributed Systems

Vector Clocks and Conflict Resolution: Tracking Causality in Distributed Systems

How vector clocks, version vectors, and CRDTs track causality and resolve conflicts in distributed systems where there is no global clock.

2021-02-24

Distributed Systems

Distributed Transactions: Coordinating Writes Across Services

How distributed systems coordinate multi-node writes using two-phase commit, three-phase commit, and the Saga pattern with compensating transactions.

2021-02-23

Distributed Systems

Consistency Models: From Strong to Eventual

Understanding the spectrum of consistency models in distributed systems, from linearizability and sequential consistency to causal and eventual consistency, and the trade-offs each model makes.

2021-02-22

Distributed Systems

Sharding and Partitioning: Splitting Data Across Nodes

How distributed systems split data across multiple nodes using hash-based and range-based partitioning, consistent hashing, and rebalancing strategies.

2021-02-21

Distributed Systems

Replication: Keeping Copies of Data Across Nodes

How distributed systems replicate data using leader-follower, multi-leader, and leaderless architectures, and how quorum reads and writes ensure correctness.

2021-02-20

Distributed Systems

Consensus Algorithms: Getting Distributed Nodes to Agree

How Paxos and Raft solve the consensus problem in distributed systems, enabling multiple nodes to agree on a single value even when some nodes fail.

2021-02-19

Distributed Systems

CAP Theorem: The Fundamental Trade-Off in Distributed Systems

Understanding the CAP theorem and why every distributed system must choose between consistency, availability, and partition tolerance when network failures occur.

2026-03-28

Complexity vs. Volume: Why GPUs Rule AI Math

Understanding the fundamental split between CPU and GPU architecture, explained through the lens of performance philosophy.

2025-10-25

Theory of Computation

Information Theory Basics: Entropy, Compression, and Shannon's Theorem

Shannon entropy, the source coding theorem, compression limits, Huffman coding, and why you can never compress truly random data.

2025-10-24

Theory of Computation

Randomized Algorithms and Probabilistic Analysis

Las Vegas vs Monte Carlo algorithms, expected running time, randomized quicksort, skip list analysis, and why adding randomness can make algorithms simpler and faster.

2025-10-23

Theory of Computation

Amortized Analysis: The True Cost of Operations

Understanding amortized analysis through the aggregate method, accounting method, and potential method, with dynamic array and splay tree examples showing why worst-case per-operation analysis can be misleading.

2025-10-22

Theory of Computation

Turing Machines and Computability

The universal Turing machine, the Church-Turing thesis, the Halting Problem, undecidability, and why some problems can never be solved by any computer.

2025-10-21

Theory of Computation

Context-Free Grammars and Parsing

Context-free grammars, pushdown automata, why programming languages are context-free, the Chomsky hierarchy, and how parsers turn source code into syntax trees.

2025-10-20

Theory of Computation

Finite Automata and Regular Languages

DFAs, NFAs, regular expressions under the hood, the equivalence between them, and the Pumping Lemma for proving what finite automata cannot do.

2025-10-19

Computational Linguistics

Ethics and Bias in Language Models: What Training Data Teaches Machines About Us

How training data bias, toxicity, and hallucination emerge in language models, what debiasing techniques exist, and why responsible deployment requires more than better algorithms.

2025-10-19

Theory of Computation

NP-Hard and Approximation Algorithms

When exact solutions are impossible at scale, approximation algorithms provide provable guarantees. Covering NP-hardness, the traveling salesman problem, knapsack, and greedy/DP approximation strategies.

2025-10-18

Computational Linguistics

Evaluation Metrics for NLP: Why Measuring Language Quality Is Hard

From BLEU and ROUGE to METEOR and perplexity, exploring the automatic metrics that score NLP systems, their blind spots, and why human evaluation remains the gold standard.

2025-10-18

Theory of Computation

NP-Complete Problems: The Hardest Problems in NP

Understanding NP-completeness, polynomial-time reductions, the Cook-Levin theorem, SAT, 3-SAT, and why proving any single NP-complete problem is in P would solve them all.

2025-10-17

Computational Linguistics

Text Generation and Decoding Strategies: How ChatGPT Picks the Next Token

From greedy decoding to top-k, top-p nucleus sampling, and temperature scaling, exploring the algorithms that turn a probability distribution over tokens into coherent, creative text.

2025-10-17

Theory of Computation

P vs NP: The Million-Dollar Question in Computer Science

Understanding the P vs NP problem, decision problems, polynomial-time verification, and why resolving this question would reshape cryptography, optimization, and all of engineering.

2025-10-16

Computational Linguistics

Machine Translation: From Encoder-Decoder to Why Google Translate Got Good Overnight

How sequence-to-sequence models, attention, beam search, and the BLEU score transformed machine translation from a rule-based curiosity into a system that handles 100+ languages.

2025-10-16

Theory of Computation

Recurrence Relations and the Master Theorem

How to solve recurrence relations using the Master Theorem, recursion tree method, and substitution method, with a detailed walkthrough of T(n) = 2T(n/2) + n.

2025-10-15

Computational Linguistics

Attention and Self-Attention Through the Linguistics Lens

How the attention mechanism lets transformers learn which words relate to which, why positional encoding replaces word order, and what self-attention looks like from a linguist's perspective.

2025-10-15

Database Internals

The Physical I/O Path: How Bytes Hit the Disk

fsync semantics, O_DIRECT vs buffered I/O, the OS page cache, SSD vs HDD access patterns, torn write protection, and the fsync-gate incident that shook PostgreSQL.

2025-10-15

Theory of Computation

Big-O, Big-Theta, Big-Omega: Formal Asymptotic Analysis

Formal definitions of Big-O, Big-Theta, and Big-Omega notation with limit-based proofs, common growth rates, and why Big-O dominates interviews while Big-Theta is more precise.

2025-10-14

Computational Linguistics

Semantic Similarity and Sentence Embeddings: From Cosine Distance to RAG Pipelines

How BERT embeddings and sentence transformers measure meaning similarity between texts, enabling semantic search, duplicate detection, and retrieval-augmented generation.

2025-10-13

Computational Linguistics

Parsing and Syntax Trees: Where Compilers and NLP Share Roots

From constituency parsing to dependency parsing and the CYK algorithm, exploring how machines discover the grammatical structure of sentences using the same ideas that power programming language compilers.

2025-10-12

Computational Linguistics

Sequence Labeling: POS Tagging, NER, and the Viterbi Algorithm

How Hidden Markov Models and BIO tagging turn the problem of labeling every word in a sentence into a tractable dynamic programming problem, powering part-of-speech tagging and named entity recognition.

2025-10-11

Computational Linguistics

Word Embeddings: How King Minus Man Plus Woman Equals Queen

From one-hot vectors to Word2Vec and GloVe, exploring how the distributional hypothesis lets us learn dense vector representations where arithmetic on words captures meaning.

2025-10-10

Computational Linguistics

TF-IDF and Bag of Words: Why Keyword Search Still Works

How term frequency and inverse document frequency turn documents into weighted vectors, powering search engines and text classification long before deep learning arrived.

2025-10-09

Computational Linguistics

N-Grams and Language Models: Predicting the Next Word with Counting

From unigrams to trigrams, exploring how the Markov assumption turns word prediction into a counting problem, and why smoothing techniques like Kneser-Ney keep probabilities from collapsing to zero.

2025-10-08

Computational Linguistics

Tokenization and Text Normalization: Why GPT Does Not See Words

From whitespace splitting to Byte Pair Encoding and SentencePiece, exploring how machines break text into processable units and why subword tokenization changed NLP forever.

2025-10-05

Database Internals

Transaction Isolation and MVCC: How Postgres Reads Without Locking

How transaction isolation levels prevent anomalies, how Postgres uses Multi-Version Concurrency Control to let readers and writers coexist, and why write skew still sneaks through snapshot isolation.

2025-10-04

Database Internals

Query Execution and Optimization: How Databases Turn SQL into Fast Plans

How the query optimizer transforms SQL into execution plans, how cost-based optimization picks the cheapest path, and why nested loop, hash join, and merge join exist for different workloads.

2025-10-03

Database Internals

LSM Trees and Write-Optimized Storage: Why Cassandra and RocksDB Chose Append-Only

How LSM trees turn random writes into sequential I/O through memtables, SSTables, and compaction, and why write-heavy databases chose them over B-trees.

2025-10-02

Database Internals

TEST2:B-Tree Indexes Deep Dive: Why Your WHERE Clause Is Fast

How B-trees store sorted data on disk, how page splits work, what fill factor controls, and the difference between clustered and non-clustered indexes.

2025-10-02

Database Internals

TEST:B-Tree Indexes Deep Dive: Why Your WHERE Clause Is Fast

How B-trees store sorted data on disk, how page splits work, what fill factor controls, and the difference between clustered and non-clustered indexes.

2025-10-02

Database Internals

B-Tree Indexes Deep Dive: Why Your WHERE Clause Is Fast

How B-trees store sorted data on disk, how page splits work, what fill factor controls, and the difference between clustered and non-clustered indexes.

2025-10-01

Database Internals

SQL vs NoSQL vs NewSQL: Choosing the Right Database Paradigm

Understanding the relational model, document/key-value/graph/column-family stores, ACID vs BASE guarantees, and how to pick the right database for your workload.

2025-09-28

Coding Patterns

Graph Coloring and Bipartite Checking

Understand graph coloring, 2-coloring via BFS/DFS for bipartite checking, possible bipartition problems, and an introduction to the chromatic number.

2025-09-27

Coding Patterns

Binary Search on the Answer

Apply binary search to optimization problems by searching over the answer space: Koko eating bananas, split array largest sum, and capacity to ship packages.

2025-09-26

Coding Patterns

Trie-Based String Problems

Use tries for autocomplete, word search, longest common prefix, and wildcard matching, with efficient prefix lookups and character-by-character traversal.

2025-09-25

Coding Patterns

Top-K and Heap Patterns

Solve Top-K problems efficiently using heaps: Kth largest element, merge K sorted lists, median from data stream, and min-heap vs max-heap selection strategies.

2025-09-24

Artificial Life

Open-Ended Evolution: The Quest for Systems That Never Stop Surprising

Why most simulations plateau, how novelty search and MAP-Elites push past convergence, and the grand challenge of building systems that generate unbounded complexity.

2025-09-24

Coding Patterns

Bit Manipulation Patterns

Master essential bit manipulation techniques including XOR tricks, single number detection, counting bits, power of two checks, and bitmask subset enumeration.

2025-09-23

Artificial Life

Artificial Life vs Artificial Intelligence: Bottom-Up Emergence vs Top-Down Optimization

Why ALife researchers think modern AI is missing something, how embodied intelligence differs from statistical learning, and where the two fields might converge.

2025-09-23

Coding Patterns

Interval Merging and Sweep Line

Master interval problems including merging overlapping intervals, meeting rooms scheduling, insert interval, and the event-based sweep line technique.

2025-09-22

Artificial Life

Artificial Chemistry and Self-Replication: From Von Neumann to the Origin of Life

How computational models of chemistry explore self-reproducing automata, autocatalytic sets, and the fundamental question of how life bootstraps itself.

2025-09-22

Coding Patterns

Union-Find (Disjoint Set Union)

Learn the Union-Find data structure with path compression and union by rank for connected components, dynamic connectivity, and Kruskal's MST algorithm.

2025-09-21

Artificial Life

Agent-Based Modeling: Local Rules, Global Patterns

How autonomous agents with simple local rules produce ant trails, predator-prey cycles, and Schelling's segregation, and how to build and analyze these simulations.

2025-09-21

Coding Patterns

BFS and DFS on Grids

Apply BFS and DFS to 2D grid problems including island counting, flood fill, shortest path in a maze, and 4-directional vs 8-directional traversal.

2025-09-20

Artificial Life

L-Systems: Growing Fractal Plants with Rewriting Rules

How Lindenmayer systems use string rewriting and turtle graphics to model biological branching, fractal geometry, and procedural generation.

2025-09-20

Coding Patterns

Backtracking: Permutations, Combinations, and Pruning

Master the backtracking pattern for generating permutations, combinations, and subsets, with decision tree modeling, pruning strategies, N-Queens, and Sudoku solving.

2025-09-19

Artificial Life

Neuroevolution: When Evolution Builds the Brain

Evolving neural network weights and topologies with NEAT, and why evolutionary strategies sometimes beat gradient descent.

2025-09-19

Coding Patterns

Monotonic Stack and Monotonic Queue

Learn the monotonic stack and monotonic queue patterns for next greater element, daily temperatures, and sliding window maximum problems.

2025-09-18

Artificial Life

Genetic Algorithms: Evolving Solutions Through Selection, Crossover, and Mutation

How Darwinian evolution can be turned into an optimization algorithm, and when genetic algorithms outperform gradient-based methods.

2025-09-18

Coding Patterns

Prefix Sums: Range Queries in Constant Time

Master the prefix sum technique for O(1) range sum queries, subarray sum equals K with hash maps, and extending the pattern to 2D grids.

2025-09-17

Artificial Life

Boids and Flocking: Emergent Swarm Behavior from Three Simple Rules

How Reynolds' separation, alignment, and cohesion rules produce realistic flocking, and how spatial hashing makes it scale.

2025-09-17

Coding Patterns

Fast and Slow Pointers: Floyd's Cycle Detection

Understand the fast and slow pointer technique for cycle detection in linked lists, finding the cycle start node, and solving the happy number problem.

2025-09-16

Artificial Life

Cellular Automata Beyond Conway: Wolfram's Elementary Rules and the Edge of Chaos

From 1D binary rules to Wolfram's four classes of behavior, exploring how the simplest possible automata reveal deep truths about computation and complexity.

2025-09-16

Coding Patterns

Two Pointers: Same Direction and Opposite Direction

Learn the two-pointer technique for sorted arrays and sequences, covering opposite-direction pair sum, same-direction duplicate removal, and container with most water.

2025-09-15

Artificial Life

Conway's Game of Life: Complexity from Simplicity

How four simple rules on a grid produce gliders, oscillators, and Turing-complete computation, launching the field of artificial life.

2025-09-15

Coding Patterns

Sliding Window: Fixed and Variable Width Patterns

Master the sliding window technique for subarray and substring problems, covering fixed-width windows, variable-width expand/shrink, max subarray sum, and longest substring without repeats.

2025-09-10

Guides

A Visual History of Computing: From Looms to LLMs

The story of computing told through interactive timelines, diagrams, and charts. From Babbage's Analytical Engine to modern AI, tracing the key inventions, people, and ideas that built the digital world.

2025-09-08

Guides

Every Possible Math Symbol You Might Encounter

A visual reference of 150+ mathematical symbols organized by subject: arithmetic, algebra, calculus, linear algebra, abstract algebra, probability, statistics, set theory, logic, complexity, ML, finance, physics, chemistry, quantum mechanics, and information theory.

2025-09-07

Guides

The Complete Guide to Reading Charts: Every Visualization Type Explained

An interactive reference covering 20 chart types used across CS, finance, data science, and engineering. For each type: what it shows, how to read it, when to use it, and where you will encounter it.

2025-09-06

Quantitative Finance

Reading Charts in Finance: A Visual Toolkit

A survey of the major chart types used in quantitative finance, covering candlestick, line, area, bar, scatter, radar, and waterfall charts, with guidance on what each shows, when to use it, and common misreadings.

2025-09-06

Quantitative Finance

Reading Charts in Finance: A Visual Toolkit

A survey of the major chart types used in quantitative finance, covering candlestick, line, area, bar, scatter, radar, and waterfall charts, with guidance on what each shows, when to use it, and common misreadings.

2025-08-29

Quantitative Finance

Technical Analysis & Candlestick Patterns: Reading the Market's Body Language

OHLC data, candlestick anatomy, classic patterns like doji and engulfing, support and resistance levels, moving averages, Bollinger Bands, and why technical analysis remains controversial yet widely practiced.

2025-08-25

Cryptography & Trust

Symmetric Encryption: AES, Block Ciphers, and Modes of Operation

Understanding how symmetric encryption works, why AES dominates modern cryptography, how block cipher modes shape security, and why ECB mode is fundamentally broken.

2025-08-24

Quantitative Finance

The Black-Scholes Model: Pricing Options with Partial Differential Equations

Options pricing from first principles: the Black-Scholes PDE derivation (intuition), closed-form solution, the Greeks (delta, gamma, theta, vega), and why volatility is the only unknown.

2025-08-23

Computer Systems

GPU Memory Optimization: Shared Memory, Coalescing, Bank Conflicts, and Occupancy

How to write GPU code that makes efficient use of the memory hierarchy through coalesced global memory access, shared memory tiling, bank conflict avoidance, and occupancy tuning.

2025-08-23

Quantitative Finance

Portfolio Theory: Why Diversification Is Mathematically Provable

Markowitz mean-variance optimization, the efficient frontier, correlation matrices, and the formal proof that diversification reduces risk without sacrificing expected return.

2025-08-22

Computer Systems

Parallel Computing Patterns: Map, Reduce, Scan, and Gather/Scatter

The fundamental parallel algorithmic patterns that form the building blocks of GPU programming, from embarrassingly parallel map operations to the surprisingly tricky parallel prefix sum.

2025-08-22

Quantitative Finance

Time Value of Money: Why a Dollar Today Beats a Dollar Tomorrow

Present value, future value, discounting, continuous compounding, why Euler's number shows up in finance, and NPV for engineering decisions.

2025-08-21

Computer Systems

CUDA Basics: Kernels, Threads, Blocks, and Grids

How the CUDA programming model maps parallel work onto GPU hardware through a hierarchy of threads, blocks, and grids, and how kernels launch thousands of threads to execute in parallel.

2025-08-20

Computer Systems

GPU Architecture: Streaming Multiprocessors, Warps, and the SIMT Model

How GPUs achieve massive parallelism through thousands of lightweight cores organized into streaming multiprocessors, executing warps of threads in lockstep under the SIMT execution model.

2025-08-01

Pure Math

Convex Hulls and Computational Geometry: From Graham Scan to Voronoi Diagrams

Convex hull algorithms, line segment intersection, Voronoi diagrams, and Delaunay triangulation: the geometric toolkit behind GIS, robotics, and computer graphics.

2025-07-29

Pure Math

P, NP, NP-Hard, and NP-Complete: The Complexity Zoo

Understanding the major complexity classes, what makes a problem polynomial or non-polynomial, the P vs NP question, NP-hardness, NP-completeness, and how they all relate.

2025-07-28

Pure Math

Shannon's Source Coding Theorem: The Fundamental Limit of Compression

Understanding Shannon's source coding theorem, entropy as the absolute limit of lossless compression, optimal code lengths, and Huffman coding as the practical realization.

2025-07-27

Pure Math

Arrow's Impossibility Theorem: Why No Perfect Voting System Exists

Understanding Arrow's impossibility theorem, the five fairness axioms for voting systems, why democracy is mathematically hard, and what this means for real-world elections.

2025-07-26

Pure Math

Kolmogorov Complexity: Randomness as Incompressibility

Understanding Kolmogorov complexity, the shortest program that produces a string, Berry's paradox, randomness defined as incompressibility, and connections to Gödel and Turing.

2025-07-25

Pure Math

The Four Color Theorem: The First Computer-Assisted Proof

Understanding the four color theorem, why it was controversial as the first major computer-assisted proof, the techniques of reducibility and discharging, and what it means for the nature of proof.

2025-07-25

Quantum Computing

Qubits and Superposition: Why 'Both 0 and 1 at Once' Is Wrong

Classical bits vs qubits, the Bloch sphere, Dirac notation, and what superposition actually means: the real foundation of quantum computing.

2025-07-24

Computer Systems

Supercomputer Design: TOP500 Rankings, Interconnect Topologies, and Scientific Workloads

How the world's fastest supercomputers are designed, from interconnect topologies like fat trees and dragonfly networks to cooling systems and the scientific workloads that drive their architecture.

2025-07-24

Pure Math

Fixed-Point Theorems: Why Your GPS Converges and Nash Equilibria Exist

Understanding Brouwer's fixed-point theorem, Banach's contraction mapping, and Knaster-Tarski, with applications from GPS convergence to game theory equilibria.

2025-07-23

Computer Systems

Parallel File Systems: Lustre, GPFS, and High-Speed I/O for Supercomputers

How parallel file systems like Lustre and GPFS stripe data across hundreds of storage servers to deliver the bandwidth that thousands of compute nodes demand.

2025-07-23

Pure Math

The P vs NP Barrier Proofs: Why the Hardest Problem Stays Hard

Understanding why proving P != NP is so difficult: the three known barriers of relativization, natural proofs, and algebrization that block every known proof technique.

2025-07-22

Computer Systems

MPI and Distributed Computing: Message Passing Across Thousands of Nodes

How the Message Passing Interface enables parallel programs to communicate across distributed-memory clusters using point-to-point and collective operations.

2025-07-22

Pure Math

Proof Techniques Toolkit: The Methods Behind Every Theorem

A comprehensive guide to proof techniques: direct proof, contradiction, contrapositive, weak and strong induction, well-ordering, and constructive vs non-constructive proofs.

2025-07-21

Computer Systems

Job Scheduling and Resource Management: SLURM, PBS, and the Art of Sharing a Supercomputer

How job schedulers like SLURM and PBS allocate compute resources across hundreds of users, balancing fairness, throughput, and utilization on shared HPC clusters.

2025-07-21

Pure Math

The Pigeonhole Principle and Ramsey Theory: Guaranteed Structure in Chaos

Understanding the pigeonhole principle, its surprisingly deep consequences, Ramsey theory's guarantee that complete disorder is impossible, and the party problem.

2025-07-20

Computer Systems

Cluster Architecture: Nodes, Interconnects, and the Anatomy of a Supercomputing Cluster

Understanding how compute clusters are built from nodes, interconnects, and memory architectures, from Beowulf clusters to modern blade servers.

2025-07-20

Pure Math

Euler's Identity: Where Five Constants Meet in One Equation

Understanding Euler's identity e^(i*pi) + 1 = 0, the Taylor series that make it work, complex exponentials, and why five fundamental constants converge in a single equation.

2025-07-19

Design Ux

Accessibility as Design: Building for Every Human

WCAG principles (POUR), screen reader mental models, keyboard navigation, color blindness, and designing for cognitive disabilities: accessibility is not a feature, it is a design philosophy.

2025-07-19

Pure Math

The Irrationality of sqrt(2): The Pythagoreans' Crisis

Understanding the classic proof by contradiction that the square root of 2 is irrational, the historical crisis it caused, and why rational numbers have gaps.

2025-07-18

Design Ux

Forms and Input Design: The Hardest UI Problem

Error prevention, inline validation, progressive disclosure, and accessible form patterns: why forms are deceptively difficult and how to get them right.

2025-07-18

Pure Math

Euclid's Proof of Infinite Primes: The Oldest Beautiful Proof

Understanding Euclid's elegant proof by contradiction that there are infinitely many prime numbers, why you can always find one more prime, and the enduring power of simple reasoning.

2025-07-17

Design Ux

Information Architecture: How Users Find Things

Card sorting, tree testing, navigation patterns, sitemaps, and taxonomy design: the structural backbone of every usable product.

2025-07-17

Pure Math

The Halting Problem: Turing's Proof That Some Questions Are Unanswerable

Understanding Turing's 1936 proof by contradiction that no program can decide whether all programs halt, the self-referential paradox at its core, and its connection to Gödel's incompleteness.

2025-07-16

Design Ux

Usability Heuristics: Nielsen's 10 Rules for Interface Design

A deep dive into Nielsen's 10 usability heuristics, heuristic evaluation methodology, severity ratings, and common violations in real products.

2025-07-16

Design Ux

Typography Fundamentals: Anatomy, Hierarchy, and Why Line-Height Matters

How typeface anatomy, font pairing, visual hierarchy, and variable fonts work, and why developers who understand line-height build better interfaces.

2025-07-16

Pure Math

Cantor's Diagonalization: Why Some Infinities Are Bigger Than Others

Understanding Cantor's diagonal argument, the proof that the real numbers are uncountable, different sizes of infinity, and the Continuum Hypothesis.

2025-07-15

Design Ux

HCI Foundations: The Laws That Govern Every Click

Fitts's law, Hick's law, Miller's 7 plus or minus 2, cognitive load theory, mental models, and affordances: the science behind usable interfaces.

2025-07-15

Design Ux

Color Theory for Screens: RGB, HSL, Contrast, and Dark Mode

How digital color works from the physics of light to contrast ratios, WCAG accessibility, and why dark mode is more than just inverting colors.

2025-07-15

Pure Math

Gödel's Incompleteness Theorems: The Limits of Formal Systems

Understanding Gödel's two incompleteness theorems, self-reference through Gödel numbering, and why no consistent formal system can prove all truths about arithmetic.

2025-06-24

Pure Math

Monoids and Semigroups in Programming: Why MapReduce Works

How the humble monoid, a set with an associative operation and identity, explains why MapReduce parallelizes, why folds compose, and why functional programming patterns work.

2025-06-23

Pure Math

Lattices and Order Theory: The Algebra of Static Analysis

How lattices provide the mathematical foundation for fixed-point computation in program analysis, type systems, and abstract interpretation.

2025-06-22

Pure Math

Polynomials over Finite Fields: Why Your Network Card Does Algebra

How polynomial division over GF(2) powers CRC checksums, and how irreducible polynomials enable BCH codes and error detection in every network packet.

2025-06-21

Pure Math

Modular Arithmetic as Algebra: The Ring Behind RSA

Viewing modular arithmetic through the lens of ring theory, from Euler's totient to the Chinese Remainder Theorem, and why RSA works.

2025-06-20

Pure Math

Finite Fields (Galois Fields): The Algebra Inside AES and Reed-Solomon

How GF(2^n) arithmetic works, why AES uses GF(2^8), and how Reed-Solomon codes protect your data from QR codes to deep-space probes.

2025-06-19

Pure Math

Rings and Fields: Two Operations, Infinite Power

How adding a second operation to a group creates rings and fields, the algebraic structures behind modular arithmetic, polynomial math, and finite field cryptography.

2025-06-18

Pure Math

Group Homomorphisms and Isomorphisms: Structure-Preserving Maps

Understanding maps that preserve algebraic structure, and why 'same shape' enables code reuse, type safety, and database schema transformations.

2025-06-17

Pure Math

Permutation Groups: Rearrangements, Cycles, and Shuffles

How the symmetric group S_n captures every possible rearrangement, and why cycle notation connects to sorting networks, shuffle algorithms, and puzzle solvers.

2025-06-16

Pure Math

Cyclic Groups and Generators: The Engine Behind Diffie-Hellman

How a single element can generate an entire group, and why this property is the algebraic foundation of modern key exchange.

2025-06-15

Pure Math

Groups: The Algebra of Symmetry

Understanding groups, their four axioms, and why this single algebraic structure underpins error detection, cryptography, and algorithm design.

2025-01-15

AI / ML

Neural Networks: From Perceptrons to Backpropagation

Understanding the building blocks of deep learning: perceptrons, activation functions, backpropagation, and gradient descent.

2021-04-09

Algorithms

Topological Sort, Strongly Connected Components, and Tarjan's Algorithm

Advanced graph algorithms for directed graphs: ordering dependencies with topological sort and finding strongly connected components with Tarjan's algorithm.

2021-04-08

Algorithms

Minimum Spanning Trees: Kruskal's, Prim's, and Union-Find

Connecting all vertices at minimum total cost with Kruskal's and Prim's algorithms, powered by the union-find data structure.

2021-04-07

Algorithms

Shortest Path Algorithms: Dijkstra's and Bellman-Ford

Finding the shortest path in weighted graphs with Dijkstra's algorithm for non-negative weights and Bellman-Ford for graphs with negative edges.

2021-04-06

Algorithms

Greedy Algorithms: Activity Selection, Huffman Coding, and Greedy vs DP

When making the locally optimal choice at each step leads to a globally optimal solution, and when it does not.

2021-04-05

Algorithms

Advanced DP Patterns: Knapsack, LCS, Matrix Chain, and Bitmask DP

Four essential dynamic programming patterns that appear everywhere: 0/1 Knapsack, Longest Common Subsequence, Matrix Chain Multiplication, and Bitmask DP.

2021-04-04

Algorithms

Dynamic Programming Fundamentals

Understanding overlapping subproblems, optimal substructure, memoization, and tabulation: the core ideas behind dynamic programming.

2021-04-03

Algorithms

Binary Search and Its Variants

Mastering the classic binary search algorithm and its powerful variants: lower bound, upper bound, and searching rotated arrays.

2021-04-02

Algorithms

Non-Comparison Sorting: Counting Sort, Radix Sort, and Bucket Sort

Breaking the n log n barrier by exploiting structure in the data, with Counting Sort, Radix Sort, and Bucket Sort.

2021-04-01

Algorithms

Comparison-Based Sorting: Merge Sort, Quick Sort, and Heap Sort

A deep dive into the three most important comparison-based sorting algorithms, their mechanics, and when to reach for each one.

2021-03-10

Computer Systems

HTTP/2, TLS, and WebSockets: Modern Application Protocols

How HTTP/2 multiplexes streams over a single connection, how TLS secures communication with encryption and authentication, and how WebSockets enable real-time bidirectional messaging.

2021-03-09

Computer Systems

Networking Fundamentals: TCP/IP, UDP, and DNS

How data travels across networks using the TCP/IP stack, the trade-offs between TCP and UDP, how DNS resolves domain names, and the basics of socket programming.

2021-03-08

Computer Systems

Virtual Memory: Page Tables, TLBs, and Page Faults

How operating systems use virtual memory to give each process its own address space, translate virtual addresses to physical ones, and handle memory that exceeds physical RAM.

2021-03-07

Computer Systems

OS Concepts: Processes, Threads, and Scheduling

How operating systems manage concurrent execution through processes, threads, context switching, and scheduling algorithms that balance fairness, throughput, and responsiveness.

2021-03-06

Computer Systems

Memory Hierarchy: From Registers to Disk

How computers organize memory into layers of increasing size and decreasing speed, and why locality of reference makes this hierarchy effective.

2021-03-05

Computer Systems

CPU Architecture: Pipelines, Caches, and Branch Prediction

How modern processors execute billions of instructions per second using pipelining, cache hierarchies, branch prediction, and instruction-level parallelism.

2021-02-18

System Design

CDNs and Edge Computing

How content delivery networks distribute content to edge servers worldwide, how cache hierarchies reduce origin load, and how edge functions move computation closer to users for lower latency.

2021-02-17

System Design

Rate Limiting and Circuit Breakers

How rate limiting algorithms like token bucket and sliding window protect services from overload, and how circuit breakers prevent cascading failures by failing fast when downstream services are unhealthy.

2021-02-16

System Design

Microservices and API Gateway Patterns

How microservices decompose monoliths into independently deployable services, how API gateways and service meshes manage cross-cutting concerns, and when the Backend for Frontend pattern simplifies client integration.

2021-02-15

System Design

Message Queues and Event-Driven Architecture

How message queues decouple producers from consumers, the differences between pub/sub and point-to-point messaging, and the trade-offs between at-least-once and exactly-once delivery guarantees.

2021-02-14

System Design

Databases: SQL vs NoSQL, Indexing, and Query Optimization

How relational and non-relational databases differ in data modeling and guarantees, how B-tree and hash indexes accelerate lookups, and how query optimizers turn SQL into efficient execution plans.

2021-02-13

System Design

Caching: Strategies, Eviction, and Invalidation

How caches accelerate reads with strategies like LRU and LFU, how write-through and write-back policies keep data consistent, and why cache invalidation is one of the hardest problems in computing.

2021-02-12

System Design

Load Balancers: Distributing Traffic Across Servers

How load balancers distribute incoming requests across multiple servers using strategies like round robin, least connections, and consistent hashing, and why the choice between L4 and L7 matters.

2021-02-07

Advanced Data Structures

Red-Black Trees: Self-Balancing BSTs with Color Invariants

How red-black trees use node coloring and rotations to guarantee O(log n) operations, powering standard library maps and sets across languages.

2021-02-06

Advanced Data Structures

LSM Trees: Write-Optimized Storage with Log-Structured Merge

How LSM Trees turn random writes into sequential I/O, powering the storage engines behind Cassandra, RocksDB, and LevelDB.

2021-02-05

Advanced Data Structures

Bloom Filters: Probabilistic Membership Testing

How Bloom filters use multiple hash functions and a bit array to answer 'is this element in the set?' with extreme space efficiency, at the cost of occasional false positives.

2021-02-04

Advanced Data Structures

Skip Lists: Probabilistic Balancing with Layered Linked Lists

How skip lists use randomized multi-level linked lists to achieve O(log n) search without the complexity of tree rotations.

2021-02-03

Advanced Data Structures

Tries: Prefix Trees for Autocomplete and String Matching

How tries store strings character by character in a tree structure, enabling prefix search, autocomplete, and fast string matching.

2021-02-02

Advanced Data Structures

B+ Trees: Leaf-Linked Trees for Range Queries and Database Indexing

How B+ Trees extend B-Trees by storing all data in linked leaf nodes, enabling fast range scans that power every major database index.

2021-02-01

Advanced Data Structures

B-Trees: Balanced Multi-Way Trees for Disk-Optimized Search

How B-Trees keep data sorted and balanced across multiple children per node, minimizing disk I/O for databases and file systems.

2021-01-25

Matrix Multiplication from Scratch

A dead-simple, step-by-step walkthrough of how matrix multiplication actually works, with every single calculation shown.

2021-01-23

The Dot Product: Multiply, Add, Done

The simplest operation in all of linear algebra, explained like you're five. Two lists of numbers go in, one number comes out.

2021-01-19

CS Fundamentals

BFS and DFS: The Two Ways to Explore a Graph

A deep dive into breadth-first search and depth-first search, their properties, trade-offs, and the problems each one solves best.

2021-01-17

CS Fundamentals

Recursion: Solving Problems by Solving Smaller Problems

How recursive functions work, why they need base cases, and how to think about call stacks, recurrence relations, and memoization.

2021-01-15

CS Fundamentals

Graphs: Representation, BFS, and DFS

How to represent graphs with adjacency lists and matrices, and how breadth-first and depth-first search explore them systematically.

2021-01-13

CS Fundamentals

Heaps and Priority Queues: Always Know the Extreme

How binary heaps maintain the min or max element at the top in O(log n) time, powering priority queues, heap sort, and scheduling systems.

2021-01-11

CS Fundamentals

Trees: Hierarchical Data and Binary Search Trees

Understanding tree structures, binary trees, BSTs, and the three classic traversal orders that unlock recursive thinking.

2021-01-09

CS Fundamentals

Hash Tables: Constant-Time Lookup

How hash functions, collision resolution, and dynamic resizing combine to give hash tables their O(1) average-case performance.

2021-01-07

CS Fundamentals

Queues: First In, First Out

Understanding queues, the FIFO data structure behind task scheduling, breadth-first search, message passing, and buffering systems.

2021-01-05

CS Fundamentals

Stacks: Last In, First Out

Understanding stacks, the LIFO data structure behind call stacks, expression evaluation, undo systems, and backtracking algorithms.

2021-01-03

CS Fundamentals

Linked Lists: Pointers All the Way Down

Singly, doubly, and circular linked lists: how pointer-based data structures trade random access for efficient insertion and deletion.

2021-01-01

CS Fundamentals

Arrays: The Foundation of Everything

Understanding contiguous memory, indexing, and dynamic arrays: the building block behind nearly every data structure.