Learn to program
Four independent courses, each starting at the foundations: lessons that explain what is happening underneath, and exercises to practise. 282 lessons and 1130 exercises in all.
- Shell Scripting (bash)
From your very first command to robust, portable bash scripts. You learn what the shell really does with the line you type (how it splits, expands and quotes it, how it forks and execs programs, how file descriptors and pipes connect them) and use that to work with files, text and processes. Every lesson has a real bash shell in a throwaway Debian container with a workspace at /work, so you can explore, break things and try again. No network and no root inside the box.
17 modules · 66 lessons
- Python
Python from absolute zero to confident, idiomatic code. You start with what a program is and how the Python interpreter turns your source into bytecode and runs it, learn the object model early (names are labels bound to objects), and build up through text, control flow, functions, data structures, files and errors, modules, testing, object-oriented design, generators and decorators, type hints, and a look under the hood at dictionaries, memory and concurrency. The track ends with practical projects: a command-line tool and data processing with CSV and JSON. Every lesson explains what actually happens, shows runnable code, and checks your understanding with exercises run in a sandbox.
15 modules · 73 lessons
- C
C is the language underneath almost everything: operating systems, language runtimes, databases, embedded devices. Learning it means learning how a computer actually runs your code: how source becomes machine instructions, how numbers are laid out as bits, what a pointer is, where memory comes from and who gives it back. This track starts from zero (what a program is) and builds up through types, control flow, functions and the call stack, arrays, pointers, the heap, structs, files, multi-file builds, debugging with gdb and valgrind, data structures, bit manipulation and POSIX systems programming, ending with practical projects.
16 modules · 78 lessons
- Rust
Rust from absolute zero to advanced: what a compiler does, values and types and how they sit in memory, then the ideas that make Rust different (ownership, borrowing, lifetimes) taught slowly with diagrams and real compiler errors. After that: structs, enums and pattern matching, error handling, collections, generics and traits, closures and iterators, modules and testing, smart pointers, threads, a look at unsafe code and FFI, and two practical projects. Exercises are compiled with rustc and checked in a sandbox; reading the compiler's messages is part of the craft, so some exercises start out broken on purpose.
16 modules · 65 lessons
Run the exercises
This is the read-only edition: you can read every lesson, try the quizzes, and see hints and reference solutions. To write code and have it checked automatically in a safe sandbox, run learnprog on your own computer.
Download learnprog (Python 3.11+ and rootless podman or docker; no Python packages needed). Unpack it, then:
cd learnprog
bin/learnprog sandbox build # build the exercise sandbox once
bin/learnprog # terminal interface
bin/learnprog web # browser interface