Lessons
50 lessons in programming · advanced · page 1 of 3
Learning paths in programming
Browse all paths- Programmingadvanced
Kubernetes: Orchestration as a Set of Control Loops
Kubernetes looks like a pile of object types until you notice it is one idea repeated. Store a description of the desired state, and run loops that compare it to reality and act on the difference. Because those loops read the current state rather than react to events, missed and duplicated messages are harmless and an interrupted controller simply resumes. This path builds the loop, shows every object as a controller joined by label matching, covers the two resource numbers that drive most cost and latency bugs, and ends with the failures the design itself creates.
4 lessons · certificate - Programmingadvanced
Containers From First Principles
There is no container object in the Linux kernel and no container system call. A container is an ordinary process with several isolation features switched on, all of which predate the technology by years. So the thing that actually changed practice was not the kernel: it was an image format that is immutable, content-addressed and shippable, built on the same idea as Git's object store. This path covers the primitives, the format and its consequences, where data and traffic have to go, and the honest answer on how much the isolation is worth.
4 lessons · certificate - Programmingadvanced
Git Internals: The Model Under the Commands
Git's command line has a deserved reputation, and the data model underneath is small and regular. It is a content-addressed store of four object types, plus a set of files holding hashes. This path derives the object hash by hand, shows that a branch is a forty-character file, explains what a three-way merge actually computes and why rebase creates new commits rather than moving them, and ends with recovery. Every command turns out to add objects or move a pointer.
4 lessons · certificate - Programmingadvanced
Go: Goroutines, Channels, and What Was Left Out
A thread costs enough that programs are architected around not having many. A goroutine costs little enough that the constraint disappears, and the designs that become available are the point. This path builds the scheduler that makes them cheap, the channels that let them coordinate without shared memory, and the leak that is the characteristic Go bug because nothing stops a goroutine but its own return. It ends on the omissions: no exceptions, no inheritance, no formatting choices, and what each one trades.
4 lessons · certificate - Programmingadvanced
Rust: Ownership, Borrowing, and What They Buy
Every language decides who frees memory and when, and Rust decides it at compile time from one rule: each value has exactly one owner. This path builds that rule, then the borrowing discipline that lets values be lent without transferring them. The payoff arrives in the third lesson, where data races turn out to be compile errors for free, because a race is aliasing plus mutation and the checker already forbids that. It ends on the escape hatches and where the guarantee genuinely stops.
4 lessons · certificate - Programmingadvanced
Deploying Open-Source LLMs Privately
Self-hosting is usually justified on privacy grounds, and the argument is weaker than assumed: it changes who owns the controls, not whether controls are needed. This cursus examines the decision honestly, the reasons that hold up better than privacy, and the middle options the either-or framing hides. Then the serving stack: why generation is memory-bandwidth-bound, how continuous batching and KV cache management decide throughput, and sizing hardware. Then operating it, including the safety layer you inherited and must now rebuild.
3 lessons · certificate
Individual lessons
- Programmingadvanced
The Failure Modes the Design Creates
Reconciliation buys robustness and charges for it in a specific currency: nothing is ever definitely finished, commands succeed without meaning anything worked, and manual fixes are silently undone. This lesson covers the failures that come from the model rather than from bugs, how to debug them, and when the whole thing is the wrong tool.
8 steps·~12 min - Programmingadvanced
Scheduling and Resources: Requests Are Not Limits
Two numbers govern where a pod lands and how it behaves under pressure, and they do completely different jobs. Requests are used for placement and are a promise; limits are enforced at run time and are a ceiling. This lesson separates them, covers the asymmetry between CPU and memory enforcement, and explains what actually happens when a node runs out.
8 steps·~12 min - Programmingadvanced
Pods, Services, and the Label That Joins Them
The object types look like an arbitrary vocabulary until you notice they are layers of controllers, each reconciling the one below. This lesson works up from the pod, explains why a Service can point at something whose address changes constantly, and shows that the whole system is joined by one mechanism: a label match.
8 steps·~12 min - Programmingadvanced
Reconciliation: Declare the End State, Not the Steps
Kubernetes is often taught as a pile of object types. Underneath it is one idea repeated: store a description of the desired state, and run loops that continuously compare it to reality and act on the difference. This lesson builds that loop, explains why it is level-triggered rather than event-driven, and shows what the design buys and costs.
8 steps·~12 min - Programmingadvanced
The Runtime Stack, and What Isolation Is Worth
One command hides four layers of software and a set of standards that made them interchangeable. This lesson takes the stack apart, then asks the question the whole path has been building toward: given a shared kernel, how much is container isolation actually worth, and what has to be added before it is a security boundary.
8 steps·~12 min - Programmingadvanced
Networking and Storage: Connecting an Isolated Thing
Isolation is the point, and a container that can reach nothing and keep nothing is useless. This lesson covers how a network namespace is wired to the outside, why published ports and container-to-container traffic work completely differently, and where data has to live given that the writable layer disappears.
8 steps·~12 min - Programmingadvanced
Images: A Filesystem You Can Address by Hash
The kernel gives isolation for files already on the machine. The image format is what turned a directory tree into something you can build once, name by digest and run anywhere. This lesson covers layers and the union filesystem that stacks them, why the build cache behaves as it does, and the content addressing that makes it all work.
8 steps·~12 min - Programmingadvanced
Undo: Reset, Revert, Restore, and Getting Work Back
Git's undo commands are notoriously confusing because they are usually memorised as recipes. Read against the object model they separate cleanly: each acts on a different one of the three places content lives. This lesson maps them, covers recovery from the accidents that feel unrecoverable, and states what genuinely cannot be undone.
8 steps·~12 min - Programmingadvanced
Merge and Rebase: Two Answers to Divergence
Every operation so far moved a pointer. Merging is the first that has to decide something: two branches changed the same project and one result must come out. This lesson covers the three-way merge and the merge base it depends on, what a conflict actually is, and why rebase produces different commits rather than moving them.
8 steps·~12 min - Programmingadvanced
Refs: A Branch Is a File Containing a Hash
Hashes are unusable by hand, so Git names them. A branch is not a copy of anything, not a directory, and not a container for commits: it is a forty-character file. Once that is clear, checkout, reset, detached HEAD and the reflog stop being separate concepts and become one operation on one kind of file.
8 steps·~12 min - Programmingadvanced
The Design Philosophy: What Go Left Out
Go is unusual for what it refuses to include. Errors are values, not exceptions. Interfaces are satisfied without declaring it. Formatting is not a choice. This lesson works through the omissions, the reasoning behind each, and the real costs, because every one of them trades expressiveness for something else.
8 steps·~12 min - Programmingadvanced
Goroutine Leaks: Who Stops This Thing
Starting a goroutine is one keyword; stopping one is a design decision nothing forces you to make. A goroutine blocked forever is never collected and holds everything it references, which is the most common Go-specific bug. This lesson covers how leaks happen, the cancellation mechanism that prevents them, and how to detect the ones already there.
8 steps·~12 min - Programmingadvanced
Channels: Share Memory by Communicating
Cheap concurrency without a coordination primitive is a bug generator. Go's answer is a typed conduit that carries values between goroutines, from a 1978 idea: rather than protecting shared state with locks, pass ownership through a channel so there is no sharing to protect. This lesson builds channels, select, and where the model does not fit.
8 steps·~12 min - Programmingadvanced
Unsafe, and Where the Guarantee Actually Ends
The borrow checker rejects some correct programs, so Rust provides ways out: runtime-checked cells, reference counting, and unsafe blocks. This lesson covers what each escape hatch turns off, what it does not, and the encapsulation discipline that keeps a small unsafe core from voiding the guarantee for everything above it.
8 steps·~12 min - Programmingadvanced
Fearless Concurrency: The Same Rule, Applied Across Threads
Rust did not add a concurrency safety mechanism. A data race requires aliasing plus mutation, which the borrow checker already forbids, so data races became compile errors as a side effect. This lesson shows how two marker traits extend that guarantee across threads, and what it still does not prevent.
8 steps·~12 min - Programmingadvanced
Borrowing: Aliasing XOR Mutation
Moving a value to read it is unusable, so ownership needs a way to lend. The lending rule is one line, and it is the reason Rust can guarantee no dangling references: you may have many readers or one writer, never both. This lesson builds that rule and the lifetimes that enforce it across function boundaries.
8 steps·~12 min - Programmingadvanced
Operating It: Security, Upgrades, and Knowing When to Stop
Self-hosting is a permanent operational responsibility rather than a project. This lesson covers the security surface a local model creates, model upgrades and why they are harder than they look, capacity and cost control, what to monitor, and the honest signals that the deployment should be retired.
8 steps·~12 min - Programmingadvanced
The Serving Stack: Throughput, Memory, and Hardware Sizing
A model that runs is not a model that serves. This lesson covers what an inference server does that a naive loop cannot, continuous batching and why it dominates throughput, the memory arithmetic that decides which hardware you need, quantization for serving, and how to size a deployment from a traffic estimate.
8 steps·~12 min - Programmingadvanced
The Case for Self-Hosting, Examined Honestly
Self-hosting is usually justified on privacy grounds, and the argument is often weaker than assumed. This lesson examines what actually stays private, which regulatory requirements genuinely demand it, the reasons that hold up better than privacy, and the honest total cost against an API.
8 steps·~12 min - Programmingadvanced
CPython: the GIL and free-threading
Why CPython has a Global Interpreter Lock, what it does and does not protect, and how the three concurrency models differ. Then how PEP 703 free-threading removes the GIL using per-object locks and biased, deferred, and immortal reference counting, plus the tradeoffs that keep it opt-in.
9 steps·~14 min - Programmingadvanced
CPython: reference counting and the cyclic GC
How CPython reclaims memory: immediate reference counting for the common case, plus a generational cyclic garbage collector that catches the reference cycles counting cannot. Covers what changes a refcount, generations and thresholds, the gc module, __del__ and weakref, and why a process's memory does not always shrink.
9 steps·~14 min - Programmingadvanced
CPython: bytecode and the interpreter loop
What actually runs when you run Python: the compiler turns source into a code object of bytecode, and a single C evaluation loop executes it on a stack machine, one frame per call. Covers code objects, the dis module, the value stack, frames, and the adaptive specializing interpreter.
9 steps·~14 min - Programmingadvanced
CPython: the object and data model
How Python values really work under the hood: every value is a heap object with a type and a reference count, names are references not boxes, and behavior comes from the data model's dunder methods. Covers identity versus equality, attribute lookup order, descriptors, and __slots__.
9 steps·~14 min - Programmingadvanced
Dynamic analysis and debuggers
Reverse engineering by running the binary. Why dynamic analysis sees what static cannot, how debuggers and breakpoints actually work (INT3 vs hardware vs page-fault), tracing (strace, ltrace, dtrace, eBPF), dynamic binary instrumentation with Frida and PIN, the common anti-debug tricks, sandboxing with Unicorn and Qiling, and the static-dynamic loop that does the real work.
8 steps·~12 min

