iolinked
iolinked · python, from the metal up

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. Python is only the medium. The superpower is understanding the machine deeply enough to think like the 1% who build it.

01

Browse the course

four volumes · 63 chapters · every line runs
Volume I · 15 chapters

The machine

What Python really is — bits, bytes, memory, references, and every line traced down to the metal.

Start here
Volume II · 16 chapters

The working programmer

Files as syscalls, UTF-8, the import machinery, the GIL, async — the craft of real programs.

Open
Volume III · 17 chapters

Algorithms & complexity

Make it fast and think like the 1% — Big-O, divide & conquer, and the classic algorithms.

Open
Volume IV · 15 chapters

Data structures

The must-know containers, built from the bytes up — what each one costs and when it wins.

Open
02

Volume I · The machine

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

Volume II · The working programmer

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

Volume III · Algorithms & complexity

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

Volume IV · Data structures

15 chapters · data structures
python — volume IV · data structures
>>>
ch 48What a data structure really isA structure is two things welded together — a memory layout and the operations it makes cheap.live ch 49The array — the block everything is built onOne contiguous block where index-times-size lands on any element in a single hop.live ch 50The linked list — data joined by pointersNodes scattered across the heap, joined by pointers — cheap to splice, slow to find.live ch 51The stack — last in, first outLast in, first out — push and pop, the container behind undo and the call stack.live 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.live ch 53The deque — fast at both endsPush and pop at both ends in O(1) — a stack and a queue fused into one.live 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.live 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.live ch 56The binary tree — hierarchy, two children at a timeNodes with two children — the shape of anything that contains things that contain things.live 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).live 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.live 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.live ch 60The graph — the structure that models everythingNodes and edges, no fixed skeleton — the structure that models roads, friends, and the web.live ch 61Union-Find — are these two connected?Are these two connected? — near-constant answers by merging sets, not re-walking the graph.live 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.live