Subject / Published lessons
python
Explore the ideas, work through an example, and save a lesson to return to.
Filters · 1 active
15 articles
Recently updated firstDev Environment — Linux/WSL, Terminal, VS Code
Set up and diagnose a development environment with explicit WSL, virtual-environment, editor, package and platform boundaries.
22 min readGit & GitHub — Commits, Branches, PRs
Understand Git objects, the index and references; practice branches, private history edits, recovery and a bounded pull-request workflow.
26 min readThe 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.
24 min readReading 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.
24 min readPython Variables & Types — Mental Model of Memory
Trace Python references, identity, mutation, copying, hashability and defaults with executable object-model examples.
22 min readControl 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.
26 min readFunctions — arguments, scope, closures
Understand five parameter kinds, name binding, closure state, decorators and bounded retry and memoization contracts.
24 min readData 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.
25 min readClasses & Objects — the OOP Mental Model
Trace Python construction, bound methods, attributes, protocols, equality and hash contracts through executable object examples.
25 min readInheritance, Composition & Polymorphism
Compare inheritance and composition; trace method resolution and cooperative super calls, and distinguish ABC, protocol and runtime duck-typing contracts.
26 min readErrors, Exceptions & Debugging with pdb
Read tracebacks, handle and chain exceptions deliberately, and inspect a reproducible failure with pdb while preserving cleanup and error contracts.
27 min readModules, 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.
25 min readTesting with pytest — TDD Workflow
Use pytest assertions, parametrization, fixture lifetimes, mocks and coverage to test explicit contracts and guide refactoring.
24 min readType Hints, mypy, dataclasses & pydantic
Distinguish static annotations, shallow frozen dataclasses and runtime validation; apply typed interfaces and explicit input contracts.
25 min readBig-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.
24 min read