iolinked
iolinked · python, from the metal up4 volumes · 63 chapters · every line runs

Not a tutorial.
A superpower.

There are a thousand Python tutorials online. This is not one of them. In a year or two, AI will write most of the code — line by line, faster than you can type it. That's fine. It changes nothing about why this matters. Syntax was never the point.

The point is what lives underneath it: how bytes move through memory, why one choice is fast and another is slow, what actually happens the instant a line runs. Learn that, and you stop guessing. You start to see the machine from the ground up — and you learn to think in systems: to break a hard problem into clean pieces and reason your way to the answer instead of praying and re-running.

That habit of mind is the real skill, and it outlasts every language and every tool. When you're the one orchestrating agents and systems that write the code for you, the engineer who understands how it all works at the metal is the one still holding the wheel. Python is only the medium. The superpower is understanding the machine deeply enough to think like the 1% who build it.

4
volumes
63
chapters
100%
shown running
0
hand-waving
01

The four volumes

one climb — from a single transistor to thinking like the 1%
Volume 1
The machine
What Python really is — bits, bytes, memory, references, and the loop under every line.
15 chaptersstart here →
Volume 2
The working programmer
Files as syscalls, UTF-8, the import machinery, the GIL, async, IPC — every boundary from first principles.
16 chaptersstep in →
Volume 3
Algorithms & complexity
Make it fast and think like the 1% — Big-O, divide & conquer, DP, graphs, every algorithm from scratch.
17 chaptersopen →
Volume 4
Data structures
The must-know containers, built from the bytes up — what each one costs in time and in memory.
15 chaptersopen →
02

Volume 1 · the machine

15 chapters · from the metal up
python — volume 1 · the machinech 00 – 14
>>>
ch 00From the metal upA box of switches — bits, bytes, RAM and the CPU from first principles. ch 01Running PythonTalk to Python live, run a script, and see what CPython compiles before line 1. ch 02Everything is an objectThe six core value types — ask any value what it is and what it weighs. ch 03Names & memoryA variable is a name stuck to an object: aliasing, mutability, reference counts. ch 04Operators & expressionsOperators and precedence: // vs %, == vs is, short-circuits and bit ops. ch 05Decide & repeatTwo new powers — if/elif/else, for & while, range, enumerate, zip, break/else. ch 06A row of slotsA list's real shape in RAM, and the cost of append, index, insert and slice. ch 07Hash tablesHow a dict finds any key in one jump: hash(), buckets, collisions, load factor. ch 08The decision mapPick the right container in five questions — a one-page Big-O cheat sheet. ch 09Machines with namesFunctions: arguments, return vs None, the call stack and LEGB name lookup. ch 10Conveyors & generatorsmap / filter / reduce and comprehensions, then lazy generators. ch 11Memory, masteredMeasure an object's memory then cut it: array, __slots__, weakref, lru_cache. ch 12Data with behaviourBuild your own types: self, attribute lookup, inheritance, dunders and @property. ch 13When it breaksExceptions are objects: read tracebacks, try/except/else/finally, raise your own. ch 14The page you keep openThe Volume 1 wrap-up — every type and idiom on one page, eight myths killed.
03

Volume 2 · the working programmer

16 chapters · bytes across every boundary
python — volume 2 · the working programmerch 15 – 30
>>>
ch 15Files are syscalls — the file descriptorA file isn't bytes — it's a number, the file descriptor, and every read is a syscall. ch 16Durability — flush, fsync, and the page cachewrite() lies — chase the bytes through the page cache to the moment 'saved' comes true. ch 17Bytes vs text — Unicode and UTF-8 at the byte levelWhere text becomes bytes — code points, UTF-8, and the wall Python 3 built between them. ch 18Serialization — flattening the object graphFlatten a live object into bytes and rebuild it — pickle, JSON, and the object graph. ch 19Modules & import — find, compile, exec, cacheWhen code outgrows one file — import in four honest verbs: find, compile, exec, cache. ch 20Inside import — sys.path, finders, loaders, and .pycPry open import — sys.path, finders, loaders, and the .pyc cache that skips recompiling. ch 21Packages & program structureAim the import machine at a whole directory — packages, __init__, and program shape. ch 22Environments & dependencies — venv, pip, reproducibilityRun thousands of files you didn't write — venv, pip, and a lockfile that pins it all. ch 23The type system — runtime types vs static hintstype(age) says int, but the hint was a lie — runtime types vs checks settled before line 1. ch 24Testing — what green actually provesA green bar proves something real — just not what you think it does. ch 25Debugging — the traceback is the unwound stackRead a traceback as the call stack unwinding — every red line a frame on the way down. ch 26Threads & the GIL — derived from refcountingWhy one lock guards the whole interpreter — the GIL, derived straight from refcounting. ch 27Async/await — an event loop over suspended framesOne thread, thousands of waits — async/await as an event loop over suspended frames. ch 28Multiprocessing & IPC — real parallelism across the boundaryBreak the one-interpreter law — many processes, real parallelism, and the cost of IPC. ch 29Performance & profiling — measure before you cutYour hunch about the slow line is reliably wrong — profile first, then cut what matters. ch 30The capstone — ship a real appTake everything you've built and ship it — the capstone that becomes a real running app.
04

Volume 3 · algorithms

17 chapters · think in growth, hunt the exponent
python — volume 3 · algorithmsch 31 – 47
>>>
ch 31What "fast" really meansWhy the stopwatch lies — and what "fast" has to mean instead. ch 32The growth zoo — Big-O, and its cousinsBig-O and its cousins — the grammar of how work grows with n. ch 33Space, and the memory hierarchy — why equal Big-O runs 100× apartSame Big-O, 100x apart — space, cache lines, and the memory hierarchy. ch 34Amortized analysis — the honest averageAmortized cost — the honest average when one step occasionally pays big. ch 35Brute force, then spot the wasteSolve it the dumb way first, then hunt the wasted work inside. ch 36Divide & conquer — the power of halvingDivide & conquer — split clean in half and pay only O(log n). ch 37Hashing — buying O(1) with spaceHash tables — spend memory to abolish searching and buy O(1). ch 38Two pointers & the sliding windowTwo pointers and the sliding window — collapse a nested loop for free. ch 39Greedy — when the local choice wins globallyGreedy — take the best local move, and when that actually wins. ch 40Dynamic programming — remember to winDynamic programming — cache subproblems so you never solve one twice. ch 41Recursion & backtracking — searching a tree of choicesRecursion and backtracking — walk a whole tree of choices, prune the dead. ch 42Sorting, properly — and a beautiful impossibilityHow sorts really work — and why O(n log n) can't be beaten. ch 43Searching & selection — binary search is bigger than you thinkBinary search and quickselect — order turns search into near-magic. ch 44Graphs — the universal modelGraphs — dots and lines that model roads, links, and everything else. ch 45Strings & number theory — the crypto and quant layerString search and number theory — the machinery under crypto and quant. ch 46Randomization & the probabilistic mindRandomness as a tool — trade certainty for speed and win on average. ch 47How to think like the 1%The reflexes underneath every algorithm — how the best minds actually think.
05

Volume 4 · data structures

15 chapters · the right arrangement of bytes for the job
python — volume 4 · data structuresch 48 – 62
>>>
ch 48What a data structure really isA structure is two things welded together — a memory layout and the operations it makes cheap. ch 49The array — the block everything is built onOne contiguous block where index-times-size lands on any element in a single hop. ch 50The linked list — data joined by pointersNodes scattered across the heap, joined by pointers — cheap to splice, slow to find. ch 51The stack — last in, first outLast in, first out — push and pop, the container behind undo and the call stack. ch 52The queue — first in, first outFirst in, first out — how the OS shares the CPU and a search sweeps a maze level by level. ch 53The deque — fast at both endsPush and pop at both ends in O(1) — a stack and a queue fused into one. ch 54The hash map — a value by its key, instantlyA value straight from its key in one hop — hashing spends memory to abolish the search. ch 55The matrix — a grid in a straight line of memoryRows and columns faked on a machine that only has a straight line of memory. ch 56The binary tree — hierarchy, two children at a timeNodes with two children — the shape of anything that contains things that contain things. ch 57The binary search tree — order that stays searchableOne ordering rule turns a tree into a search engine — insert and find in O(log n). ch 58The heap — a tree that lives in an arrayA tree so rigid it folds flat into an array — the min or max always one hop away. ch 59The trie — a tree indexed by lettersA word stored not in a node but in the path to it — prefix lookups letter by letter. ch 60The graph — the structure that models everythingNodes and edges, no fixed skeleton — the structure that models roads, friends, and the web. ch 61Union-Find — are these two connected?Are these two connected? — near-constant answers by merging sets, not re-walking the graph. ch 62The decision map — pick the right structure on sightPick the right container on sight — match the operation you need cheap to the structure that gives it.
Bonus · algorithms around us

The 40 algorithms secretly running your life

Maps routing, the shuffle that actually feels random, the math that keeps a password secret, PageRank, autocomplete — each with the real problem, the clever idea, and a program you can step through line by line.

Explore →

Stuck on an idea? Good — that's where the learning is.

Every page is built for the moment something doesn't click. Nothing is asserted without being shown running, one line at a time; every simplification is labelled and later made exact, so the foundation never cracks under you. Start anywhere, and step until it's obvious.