Python Type Hints for Beginners: Code That Explains Itself
Lesson 10: make Python explain itself with type hints: annotations, typed collections, unions with None, type aliases, and a type checker that finds bugs before you run anything.
Writing
Long-form writing on development, tooling, and lessons from the workbench plus book reviews when a title sticks.
Topics
Jump to a category or open all categories.
Newest first. Use search or categories above to narrow down.
Lesson 10: make Python explain itself with type hints: annotations, typed collections, unions with None, type aliases, and a type checker that finds bugs before you run anything.
Lesson 8: imports demystified, your own modules and packages, pip and virtual environments, then a working tour of math, random, datetime, Counter, defaultdict, and pathlib, ending in a file organizer project.
Lesson 4: turn scripts into reusable tools with def, arguments and defaults, return values, scope rules, *args and **kwargs, docstrings, and lambdas, with refactoring exercises in a live playground.
Lesson 5: lists, tuples, sets, and dictionaries, how to choose between them, and the comprehensions, enumerate, and zip idioms that make Python feel like Python, with a word-counter project.
Lesson 7: write Python that survives bad input: tracebacks, try/except done right, raising custom exceptions, and safe file reading and writing with the with statement, practiced on messy data.
Lesson 9: the machinery behind every for loop, then generators with yield, lazy generator expressions, infinite sequences, and constant-memory data pipelines, finished with a log analyzer project.
Lesson 6: object-oriented Python without the fear: classes, __init__ and self, dunder methods, inheritance versus composition, and modern dataclasses, with an inventory project in the playground.
An honest comparison of local AI tooling in 2026 — Ollama for laptops, vLLM for high-throughput GPU serving, and Docker Model Runner for container-native models, with a decision framework and VRAM sizing advice.