Article series · 15 lessons
Software engineering
Build reliable programs with Python, then put the ideas to work in small projects.
Follow the sequence below, or pick up where you left off. Nothing is locked.
What you’ll work toward & your progress
What you’ll work toward
- Virtual environments isolate Python packages, not the OS or native libraries
- Git snapshots, the index and working tree are distinct
- Pipelines connect stdout to stdin but stderr remains separate unless redirected
- Match installed version, documentation and a minimal reproduction
Completion is stored on this device only. Nothing is locked; start where it makes sense.
Before the first lesson
These are the starting lesson’s prerequisites, not requirements for every advanced topic below.
How to practise this subject
Use a disposable local project. Explain aliasing and exceptions, add an edge-case test, then make the smallest change that satisfies the contract without hiding a failure.
Lessons in order
- 01
Dev Environment — Linux/WSL, Terminal, VS Code
Set up and diagnose a development environment with explicit WSL, virtual-environment, editor, package and platform boundaries.
- 02
Git & GitHub — Commits, Branches, PRs
Understand Git objects, the index and references; practice branches, private history edits, recovery and a bounded pull-request workflow.
- 03
The Command Line — bash, pipes, grep, jq
Build Bash pipelines with explicit input formats, exit-status handling, quoting, safe filename processing and bounded log-analysis examples.
- 04
Reading Docs & Effective Googling — the Meta-Skill
Find and evaluate versioned documentation, source code and search results; distinguish public contracts from implementation details and test uncertain assumptions.
- 05
Python Variables & Types — Mental Model of Memory
Trace Python references, identity, mutation, copying, hashability and defaults with executable object-model examples.
- 06
Control Flow — if/else, loops, comprehensions
The three shapes of Python control flow every dev needs to reach for on reflex — branches, loops, comprehensions — with the rules for when each one is right and when it silently becomes unreadable.
- 07
Functions — arguments, scope, closures
Understand five parameter kinds, name binding, closure state, decorators and bounded retry and memoization contracts.
- 08
Data Structures — list, tuple, dict, set (when to use what)
The one-page decision matrix that separates senior Python devs from the rest: given a data shape and a query pattern, know within 5 seconds which built-in structure to reach for — and its Big-O cost.
- 09
Classes & Objects — the OOP Mental Model
Trace Python construction, bound methods, attributes, protocols, equality and hash contracts through executable object examples.
- 10
Inheritance, Composition & Polymorphism
Compare inheritance and composition; trace method resolution and cooperative super calls, and distinguish ABC, protocol and runtime duck-typing contracts.
- 11
Errors, Exceptions & Debugging with pdb
Read tracebacks, handle and chain exceptions deliberately, and inspect a reproducible failure with pdb while preserving cleanup and error contracts.
- 12
Modules, Packages, Virtualenvs, pip & uv
How Python code is organised, versioned, and shipped — from a single script to an installable package, with reproducible envs on every machine.
- 13
Testing with pytest — TDD Workflow
Use pytest assertions, parametrization, fixture lifetimes, mocks and coverage to test explicit contracts and guide refactoring.
- 14
Type Hints, mypy, dataclasses & pydantic
Distinguish static annotations, shallow frozen dataclasses and runtime validation; apply typed interfaces and explicit input contracts.
- 15
Big-O Notation — Reasoning About Scale
Derive asymptotic bounds and worst-case, average and amortized costs, then distinguish those models from measured runtime and memory behavior.