Dinesh/ Blog

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 first
  1. Updated ·python

    Dev 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 read
  2. Updated ·python

    Git & 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 read
  3. Updated ·python

    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.

    24 min read
  4. Updated ·python

    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.

    24 min read
  5. Updated ·python

    Python Variables & Types — Mental Model of Memory

    Trace Python references, identity, mutation, copying, hashability and defaults with executable object-model examples.

    22 min read
  6. Updated ·python

    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.

    26 min read
  7. Updated ·python

    Functions — arguments, scope, closures

    Understand five parameter kinds, name binding, closure state, decorators and bounded retry and memoization contracts.

    24 min read
  8. Updated ·python

    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.

    25 min read
  9. Updated ·python

    Classes & Objects — the OOP Mental Model

    Trace Python construction, bound methods, attributes, protocols, equality and hash contracts through executable object examples.

    25 min read
  10. Updated ·python

    Inheritance, Composition & Polymorphism

    Compare inheritance and composition; trace method resolution and cooperative super calls, and distinguish ABC, protocol and runtime duck-typing contracts.

    26 min read
  11. Updated ·python

    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.

    27 min read
  12. Updated ·python

    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.

    25 min read
  13. Updated ·python

    Testing with pytest — TDD Workflow

    Use pytest assertions, parametrization, fixture lifetimes, mocks and coverage to test explicit contracts and guide refactoring.

    24 min read
  14. Updated ·python

    Type Hints, mypy, dataclasses & pydantic

    Distinguish static annotations, shallow frozen dataclasses and runtime validation; apply typed interfaces and explicit input contracts.

    25 min read
  15. Updated ·python

    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.

    24 min read