Commit Reviews

Every commit is reviewed here before the session ends. No moving forward without understanding every line that was changed. This page is a log of that review.

Rule: A session is not complete until the commit is reviewed here and you can explain every changed file from memory.

Review Format

Commit hash: (first 7 characters)

Commit message: Exact message from the session doc

Session: Which session this belongs to

Files changed: List of every file with a one-line explanation

Can you explain it? Yes / No (if No, session repeats)


Review Log

Session 01 — Hello, World & Variables Pending

session-01

Files changed:

  • hello.py — Created: The only file for this session. Plain Python, no imports.
  • docs/sessions/session-01/index.html — Created: This session document.

Commit message: "session-01: print output, create variables, and check their types"

Session 02 — Operators, Strings & Type Conversion Pending

session-02

Files changed:

  • operators.py — Created: Demonstrates arithmetic, string combination, explicit conversion, and comparisons.
  • docs/sessions/session-02/index.html — Created: This session document.

Commit message: "session-02: arithmetic, f-strings, explicit type conversion, and comparisons"

Session 03 — Conditionals Pending

session-03

Files changed:

  • conditionals.py — Created: Demonstrates if/elif/else, and/or/not, and the = vs == distinction.
  • docs/sessions/session-03/index.html — Created: This session document.

Commit message: "session-03: branch program flow with if/elif/else and combined conditions"

Session 04 — Loops Pending

session-04

Files changed:

  • loops.py — Created: Demonstrates for loops, range(), while loops, break, and continue.
  • docs/sessions/session-04/index.html — Created: This session document — Layer 0 gate.

Commit message: "session-04: repeat actions with for/while loops, break, and continue"

Session 05 — Dictionaries Pending

session-05

Files changed:

  • country.py — Created: The only file for this session. Plain Python, no imports.
  • docs/sessions/session-05/index.html — Created: This session document.

Commit message: "session-05: define country as a dict, explore lookup and reference behaviour"

Session 06 — Lists and Iteration Pending

session-06

Files changed:

  • countries.py — Created: Builds a list of dictionaries and demonstrates iteration.
  • docs/sessions/session-06/index.html — Created: This session document.

Commit message: "session-06: store countries in a list, iterate, and separate mutating from non-mutating ops"

Session 07 — List Comprehensions Pending

session-07

Files changed:

  • filters.py — Created: Demonstrates transform, filter, and combined comprehensions.
  • docs/sessions/session-07/index.html — Created: This session document.

Commit message: "session-07: transform and filter countries with list comprehensions"

Session 08 — Functions and Lambda Pending

session-08

Files changed:

  • functions_lab.py — Created: Demonstrates function definitions, defaults, return vs print, and lambda with sorted().
  • docs/sessions/session-08/index.html — Created: This session document.

Commit message: "session-08: define reusable functions and sort with a lambda key"

Session 09 — Unpacking and *args/**kwargs Pending

session-09

Files changed:

  • unpacking_lab.py — Created: Demonstrates unpacking, *rest, *args, **kwargs, and ** spreading.
  • docs/sessions/session-09/index.html — Created: This session document.

Commit message: "session-09: unpack sequences and use *args/**kwargs for flexible functions"

Session 10 — Modules and Imports Pending

session-10

Files changed:

  • country_data.py — Created: The reusable module — data and functions, with a __main__ guard.
  • explorer.py — Created: Imports and uses country_data two different ways.
  • docs/sessions/session-10/index.html — Created: This session document.

Commit message: "session-10: split data into a module, import it two ways, add a __main__ guard"

Session 11 — Errors and Exceptions Pending

session-11

Files changed:

  • errors_lab.py — Created: Demonstrates try/except/else/finally and raising a custom ValueError.
  • docs/sessions/session-11/index.html — Created: This session document — Layer 1 gate.

Commit message: "session-11: handle missing keys with try/except and raise ValueError on invalid input"

Session 12 — What Classes Are and Why Pending

session-12

Files changed:

  • country_class.py — Created: An empty Country class and proof that instances are independent.
  • docs/sessions/session-12/index.html — Created: This session document.

Commit message: "session-12: define an empty Country class and confirm instances are independent"

Session 13 — Class Anatomy — __init__ and Attributes Pending

session-13

Files changed:

  • country_init.py — Created: A real Country class with __init__ and instance attributes.
  • docs/sessions/session-13/index.html — Created: This session document.

Commit message: "session-13: give Country real attributes via __init__"

Session 14 — Instance Methods Pending

session-14

Files changed:

  • country_methods.py — Created: Adds summary() and grow_population() instance methods to Country.
  • docs/sessions/session-14/index.html — Created: This session document.

Commit message: "session-14: add summary and grow_population instance methods"

Session 15 — Passing Data via the Constructor Pending

session-15

Files changed:

  • construction_lab.py — Created: Demonstrates keyword construction, defaults, and the risk of hidden global dependencies.
  • docs/sessions/session-15/index.html — Created: This session document.

Commit message: "session-15: require explicit constructor arguments instead of hidden global state"

Session 16 — Composition — Objects Containing Objects Pending

session-16

Files changed:

  • explorer_composed.py — Created: CountryExplorer composes and delegates to a list of Country instances.
  • docs/sessions/session-16/index.html — Created: This session document.

Commit message: "session-16: compose CountryExplorer from a list of Country instances"

Session 17 — Conditional Logic in Methods Pending

session-17

Files changed:

  • conditional_lab.py — Created: Adds conditional branching, truthy checks, and a ternary display method.
  • docs/sessions/session-17/index.html — Created: This session document.

Commit message: "session-17: handle empty collections and missing values with conditional logic"

Session 18 — Building Lists of Objects Pending

session-18

Files changed:

  • build_list_lab.py — Created: Converts raw dicts into Country instances at scale using a classmethod and comprehension.
  • docs/sessions/session-18/index.html — Created: This session document.

Commit message: "session-18: build Country instances in bulk with a from_dict classmethod"

Session 19 — Object Identity and Equality Pending

session-19

Files changed:

  • identity_lab.py — Created: Demonstrates default identity-based equality, a custom __eq__, and is None.
  • docs/sessions/session-19/index.html — Created: This session document — Layer 2 gate.

Commit message: "session-19: implement value-based __eq__ and distinguish it from identity"

Session 20 — What Is State in a Program? Pending

session-20

Files changed:

  • state_concept.py — Created: Identifies state vs fixed attributes and demonstrates uncontrolled mutation risk.
  • docs/sessions/session-20/index.html — Created: This session document.

Commit message: "session-20: identify state vs fixed attributes and observe uncontrolled mutation risk"

Session 21 — Updating State via Methods Pending

session-21

Files changed:

  • controlled_state.py — Created: Replaces direct attribute assignment with validating set_population, set_capital, and add_country methods.
  • docs/sessions/session-21/index.html — Created: This session document.

Commit message: "session-21: channel all state changes through validating methods"

Session 22 — Handling User Input Pending

session-22

Files changed:

  • input_lab.py — Created: An interactive menu reading validated user input into controlled state methods.
  • docs/sessions/session-22/index.html — Created: This session document.

Commit message: "session-22: read and validate user input, connect it to controlled state methods"

Session 23 — Tracing State Changes Pending

session-23

Files changed:

  • tracing_lab.py — Created: Adds print and logging traces plus an update counter to the controlled set_population method.
  • docs/sessions/session-23/index.html — Created: This session document.

Commit message: "session-23: trace state changes with print, logging, and a call counter"

Session 24 — Validating Input Pending

session-24

Files changed:

  • validators.py — Created: A shared, reusable validation module for name and population input.
  • menu.py — Created: Wires the interactive menu to use the shared validators before touching state.
  • docs/sessions/session-24/index.html — Created: This session document.

Commit message: "session-24: add thorough, reusable input validation for name and population"

Session 25 — Passing State Between Functions Pending

session-25

Files changed:

  • state_passing_lab.py — Created: Demonstrates shared reference passing, mutation vs reassignment, and a MenuState owner class.
  • docs/sessions/session-25/index.html — Created: This session document.

Commit message: "session-25: pass shared state explicitly between functions via one owning object"

Session 26 — Computed Properties Pending

session-26

Files changed:

  • computed_lab.py — Created: Contrasts stored, driftable derived state with correct @property-based computed values.
  • docs/sessions/session-26/index.html — Created: This session document — Layer 3 gate.

Commit message: "session-26: replace stored derived state with @property computed values"

Session 27 — Why Mock Data Matters Pending

session-27

Files changed:

  • mock_countries.py — Created: A mock dataset of 10 countries mirroring the eventual real API shape.
  • explore_offline.py — Created: Builds the full explorer entirely from mock data, no network needed.
  • docs/sessions/session-27/index.html — Created: This session document.

Commit message: "session-27: build a mock dataset and run the explorer entirely offline"

Session 28 — Building a Data Access Layer Pending

session-28

Files changed:

  • repository_lab.py — Created: A CountryRepository wrapping mock data, connected to a CountryExplorer.
  • docs/sessions/session-28/index.html — Created: This session document.

Commit message: "session-28: build a CountryRepository data-access layer around the mock data"

Session 29 — Working with JSON Files Pending

session-29

Files changed:

  • json_lab.py — Created: Writes and reads countries.json, with graceful error handling, feeding CountryRepository.
  • countries.json — Generated: The mock data, now persisted as a real file on disk.
  • docs/sessions/session-29/index.html — Created: This session document.

Commit message: "session-29: read and write JSON files, point the repository at real disk data"

Session 30 — Designing Data Contracts Pending

session-30

Files changed:

  • contracts_lab.py — Created: Converts Country to a dataclass and adds explicit contract validation for raw records.
  • docs/sessions/session-30/index.html — Created: This session document — Layer 4 gate.

Commit message: "session-30: formalize the country data contract with dataclasses and explicit validation"

Session 31 — Why We Test and What to Test Pending

session-31

Files changed:

  • manual_tests.py — Created: Plain assert-based behavior checks for the highest-value logic in the project.
  • docs/sessions/session-31/index.html — Created: This session document.

Commit message: "session-31: write manual assert-based tests for the highest-value logic first"

Session 32 — Setting Up pytest Pending

session-32

Files changed:

  • country.py — Created: The real, importable Country module (no longer duplicated inline in a lab script).
  • tests/test_country.py — Created: A proper pytest test suite for Country, organized in a dedicated tests/ directory.
  • docs/sessions/session-32/index.html — Created: This session document.

Commit message: "session-32: set up pytest with a real tests/ directory"

Session 33 — Testing Functions and Return Values Pending

session-33

Files changed:

  • country.py — Modified: Adds find_by_region and from_dict if not already present.
  • tests/test_return_values.py — Created: Systematic normal/edge/boundary test coverage, including parametrized cases.
  • docs/sessions/session-33/index.html — Created: This session document.

Commit message: "session-33: systematically test return values, including edge and boundary cases"

Session 34 — Testing Classes and State Changes Pending

session-34

Files changed:

  • country.py — Modified: Adds CountryExplorer with add_country and computed properties.
  • tests/test_state_changes.py — Created: Fixture-based, isolated tests for state changes, computed properties, and multi-step sequences.
  • docs/sessions/session-34/index.html — Created: This session document.

Commit message: "session-34: test state changes with fixtures, before/after checks, and multi-step sequences"

Session 35 — Testing the Data Layer with Mocks Pending

session-35

Files changed:

  • country.py — Modified: Ensures CountryRepository and validate_country_record are present as real, importable code.
  • tests/test_repository.py — Created: A complete, isolated test suite for the data-access layer using in-memory fake data.
  • docs/sessions/session-35/index.html — Created: This session document — Layer 5 gate.

Commit message: "session-35: test the repository and validation logic in complete isolation"

Session 36 — Package and Folder Organization Pending

session-36

Files changed:

  • country_explorer/__init__.py — Created: Marks the directory as a package and re-exports the key names.
  • country_explorer/models.py — Created: Country and CountryExplorer, moved from country.py.
  • country_explorer/repository.py — Created: CountryRepository, moved from country.py.
  • country_explorer/validators.py — Created: validate_country_record, moved from country.py.
  • country.py — Deleted: Replaced by the new country_explorer package.
  • tests/*.py — Modified: Import paths updated to the new package structure.
  • docs/sessions/session-36/index.html — Created: This session document.

Commit message: "session-36: reorganize into a country_explorer package with focused submodules"

Session 37 — Reusable Functions and Modules Pending

session-37

Files changed:

  • country_explorer/formatting.py — Created: A shared, documented, reusable population formatting function.
  • country_explorer/models.py — Modified: summary() now uses the extracted, shared function.
  • tests/test_formatting.py — Created: Direct, focused tests for the extracted function.
  • docs/sessions/session-37/index.html — Created: This session document.

Commit message: "session-37: extract and test a reusable format_population function"

Session 38 — Building Utility Modules Pending

session-38

Files changed:

  • country_explorer/search.py — Created: A generic, class-independent search-matching utility.
  • country_explorer/models.py — Modified: CountryExplorer.search() uses the shared utility.
  • country_explorer/repository.py — Modified: CountryRepository.search() uses the same shared utility.
  • tests/test_search.py — Created: Thorough, direct tests for the utility function itself.
  • tests/test_search_integration.py — Created: Confirms both classes correctly use the shared utility.
  • docs/sessions/session-38/index.html — Created: This session document.

Commit message: "session-38: build a shared search utility used by both CountryExplorer and CountryRepository"

Session 39 — The Prop Drilling Problem Pending

session-39

Files changed:

  • prop_drilling_lab.py — Created: Deliberately recreates and documents the prop-drilling problem using composed classes.
  • docs/sessions/session-39/index.html — Created: This session document.

Commit message: "session-39: deliberately experience and document the prop drilling problem"

Session 40 — Architecture Review Pending

session-40

Files changed:

  • ARCHITECTURE.md — Created: A real architecture decision record documenting resolved and unresolved decisions.
  • docs/sessions/session-40/index.html — Created: This session document — Layer 6 gate.

Commit message: "session-40: conduct a full architecture review and document key decisions"

Session 41 — File I/O Deep Dive Pending

session-41

Files changed:

  • file_io_lab.py — Created: Robust file loading with with, modes, encoding handling, and repository construction.
  • load_log.txt — Generated: An append-only log of file load attempts.
  • docs/sessions/session-41/index.html — Created: This session document.

Commit message: "session-41: robust file I/O with proper resource management and encoding handling"

Session 42 — Calling a Real API with requests Pending

session-42

Files changed:

  • real_api_lab.py — Created: Fetches real data from the REST Countries API, adapts its shape, and builds a working repository.
  • docs/sessions/session-42/index.html — Created: This session document.

Commit message: "session-42: fetch real data from the REST Countries API and adapt it to our contract"

Session 43 — Handling Errors and Edge Cases Gracefully Pending

session-43

Files changed:

  • robust_loading_lab.py — Created: A fully robust, defensively-built network loading pipeline with three-state feedback.
  • docs/sessions/session-43/index.html — Created: This session document.

Commit message: "session-43: add timeouts, specific error handling, and loading/success/error feedback"

Session 44 — Capstone Review Pending

session-44

Files changed:

  • capstone_trace.py — Created: A written, end-to-end trace of the complete application architecture.
  • ARCHITECTURE.md — Modified: Final whole-project retrospective added.
  • docs/sessions/session-44/index.html — Created: This session document — the capstone.

Commit message: "session-44: capstone review — full architecture trace, final retrospective, complete test verification"

Session 45 — Decorators Pending

session-45

Files changed:

  • decorators_lab.py — Created: Custom timing and validation decorators applied to Country Explorer functions.
  • docs/sessions/session-45/index.html — Created: This session document.

Commit message: "session-45: write custom decorators using functools.wraps"

Session 46 — Generators, Iterators & Context Managers Pending

session-46

Files changed:

  • generators_lab.py — Created: A generator over country data and a custom Timer context manager.
  • docs/sessions/session-46/index.html — Created: This session document.

Commit message: "session-46: write a generator function and a custom __enter__/__exit__ context manager"

Session 47 — Packaging & Virtual Environments Pending

session-47

Files changed:

  • env/ — Created: An isolated virtual environment for this project (not committed to git).
  • requirements.txt — Created: The exact, reproducible list of the project's dependencies.
  • docs/sessions/session-47/index.html — Created: This session document — the final session of the curriculum.

Commit message: "session-47: isolate dependencies with venv and freeze them to requirements.txt"