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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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"