02 / 90

Day 02: Concept decomposition and minimal reproductions

Concept decomposition and minimal reproductions. Each activity keeps prediction, observation, review, and recovery evidence.

Self-Directed Learning & Python 480 active minutes (8 hours focused study)
01 120 min

Concept decomposition and minimal reproductions

Independent Mastery Check — no AI assistance during assessed work. Disclosing any assistance honestly is required, but assisted work is remediation only: complete a fresh unaided check before claiming mastery.

Prerequisites

Completion of Day 01 (object mutation tracer and prediction-experiment-review routine). No advanced Python is assumed.

Learning Objective

Decompose a confusing request into observable concepts, inputs, outputs, constraints, and a minimal reproduction; reuse the Day 01 tracer reasoning rather than duplicating its code.

Instructions

Apply the Day 01 prediction-experiment-review cycle to a new confusing request — do not paste the Day 01 tracer or invent your own task. Work closed-book: (1) write every predicted output before running anything; (2) run the given snippet and record the observed outputs; (3) decompose the result into inputs, expected outputs, constraints, names/objects/mutation/allocation; (4) distill a minimal reproduction; (5) schedule one fresh unaided check. Keep inside the 120-minute budget.

Practice & Prediction Log

A learner reports: "My cleanup helper was supposed to strip the spaces, but the variable still has them afterwards. Why doesn't s.strip() fix s?"

Predict every line of output before running:

s = '  data  '
print(repr(s.strip()))
print(repr(s))
s = s.strip()
print(repr(s))

Then decompose the request into: inputs; the learner's expected output; the observed output; the violated constraint; and which concepts are names, objects, mutation, and allocation. Finish by writing the smallest snippet that still demonstrates the effect (your MRE).

Independent Mastery Criterion

Pass when, unaided and closed-book: (a) all three printed lines are predicted correctly before execution; (b) the decomposition correctly identifies allocation-not-mutation and that only assignment rebinds the name; (c) the MRE is at most three lines and still reproduces the unchanged-variable effect. Any assistance is remediation only and requires a fresh unaided variant (e.g. `name.upper()`) predicted and verified correctly before mastery is claimed.

Authoritative Source Resources & Provenance

linking PSF License Version 2

Python Data Model & Mutability Reference

Author: Python Software Foundation | Original Source Link ↗

Relevant Section / Range: Section 3.1 & 3.2 (Objects, values, types)

Verified Version & Date: Python 3.12 (Verified: 2026-10-30)

Selection Rationale:

Normative reference on Python identity vs value semantics and mutable vs immutable types without tutorial inaccuracies.

Source Prerequisites:

Basic command line and high school reading comprehension

Safe Fallback (Offline Resilience):

Official documentation is mirrored locally via standard library pydoc and embedded offline lesson explanations if internet access is interrupted.

Compared Candidate Sources & Selection Analysis (4)
MIT OCW 6.0001 (Prof. Eric Grimson) ↗ compared_alternative [CC BY-NC-SA 4.0]

High pedagogical clarity for Python fundamentals, but structures mutability around academic lecture pacing rather than immediate hands-on minimal reproductions (MRE).

Stanford CS336: Language Modeling from Scratch (Spring 2024) ↗ compared_deferred [No license declared (the repository has no LICENSE file, so all rights are reserved by default)]

Strong systems engineering and PyTorch tensor rigor, but assumes advanced Python mastery and PyTorch installed; deferred to Days 30-60 model pretraining.

3Blue1Brown: Essence of Linear Algebra ↗ compared_deferred [3Blue1Brown copyright (all rights reserved); site FAQ permits only short clips under stated conditions]

Strong visual intuition for linear transformations and vector spaces; selected for Days 10-18 mathematics foundations, but not relevant for Day 01 Python object references.

Andrej Karpathy: Neural Networks: Zero to Hero (micrograd) ↗ compared_deferred [MIT (Repository) / Standard YouTube License (Video)]

Clear, executable autograd intuition; code is MIT license, but video subtitles have unknown/proprietary distribution rights (prohibiting full-text transcript import). Selected for Days 19-25 autograd implementation with linking-only reuse.

linking Journal publisher copyright (all rights reserved) - lawful external linking only

Improving Students' Learning With Effective Learning Techniques: Promising Directions From Cognitive and Educational Psychology

Author: John Dunlosky, Katherine A. Rawson, Elizabeth J. Marsh, Mitchell J. Nathan, Daniel T. Willingham | Original Source Link ↗

Relevant Section / Range: Psychological Science in the Public Interest 14(1): 4-58; practice testing and distributed practice sections

Verified Version & Date: Psychological Science in the Public Interest, 2013 (Verified: 2026-10-30)

Selection Rationale:

Detailed comparative review rating practice testing and distributed practice as high-utility techniques while rating highlighting and rereading low-utility; anchors the retrieval, correction, and spaced-review design of Days 88-90.

Source Prerequisites:

None beyond general academic reading.

Safe Fallback (Offline Resilience):

Curriculum restates the utility ratings and application conditions in original prose; every task remains runnable offline.

Compared Candidate Sources & Selection Analysis (2)
Pashler et al. Learning Styles: Concepts and Evidence ↗ compared_alternative [Publisher copyright (originally Wiley; now SAGE Publications)]

Important negative result on learning-styles matching but narrower scope; Dunlosky et al. rates a broader set of techniques directly usable for this curriculum.

Brown, Roediger & McDaniel: Make It Stick: The Science of Successful Learning ↗ compared_alternative [Publisher copyright (Harvard University Press)]

Strong trade-book synthesis of the same evidence base; the peer-reviewed review is preferred for citation precision and technique-by-technique utility ratings.

02 120 min

Selected-agent bounded task and permission review

Agent-Assisted Engineering Check — declare the selected track, permissions, and review boundary; agent output is not independent evidence. If no authorized tool is available, mark the live portion blocked/unexecuted: the illustrative transcript below teaches the review workflow but cannot count as live agent evidence.

Prerequisites

day-02-act-01. One Agent Tool Track selection already made in the course profile.

Learning Objective

Use one selected agent on a bounded exercise with declared permissions, budget, context, review, and retry limits.

Instructions

Create a new empty directory agent-task-sandbox, record find . -type f before and after (a declared permission is a contract, not an OS sandbox — you must verify scope yourself). Give your selected agent exactly the prompt below. Allowed actions: create files inside agent-task-sandbox only, run the created file once. Forbidden: writes outside the sandbox, git commits, network access, installs, reading your home files. Require human approval before every write. Budget: at most 3 agent turns or retries; stop on artifact verified, budget exhausted, or any out-of-scope action (then abort and record the violation). Afterwards fill the review checklist and keep it with your evidence.

Practice & Prediction Log

Exact prompt to give the selected agent:

"In the directory agent-task-sandbox (absolute path: ), create a file hello.py that prints day 02 when run with python3 hello.py. Do not create or modify anything else. Do not use the network or install packages. Stop after creating the file and running it once."

Expected artifact: agent-task-sandbox/hello.py plus your own review.md.

Review checklist (answer each item in review.md):
- find . -type f inside the sandbox shows only hello.py (no extras)
- the file content does only what was asked
- python3 hello.py prints day 02
- every write happened inside the sandbox and after your approval
- the transcript shows the agent stopped within the 3-turn budget

Independent Mastery Criterion

Pass when: (a) the bounded prompt, permission list, 3-turn budget and stop rules were declared before the agent ran; (b) the learner's independent `find`/`cat`/run checks verified the artifact and scope — not the agent's own claims; (c) the checklist verdict is recorded. Either the live run is verified as above, or the submission honestly marks the live portion blocked/unexecuted and shows the checklist mechanics on the labelled illustration. Presenting the illustration or agent claims as live evidence fails.

Authoritative Source Resources & Provenance

linking Open Access / CC BY 4.0

SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering

Author: John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press | Original Source Link ↗

Relevant Section / Range: Section 2 The Agent-Computer Interface and Section 3 SWE-agent: Designing an ACI for Software Engineering

Verified Version & Date: NeurIPS 2024 / arXiv:2405.15793v2 (Verified: 2026-10-30)

Selection Rationale:

Primary literature on agent-computer interfaces showing that bounded tool commands, trajectory inspection, and environment constraints determine whether an agent can carry an engineering task to verifiable completion.

Source Prerequisites:

Agent loops, tool protocols, and basic software engineering workflow vocabulary.

Safe Fallback (Offline Resilience):

The permission/budget control profile, tool contract schema, and trace audit procedure are fully implemented in the local bounded agent fixture (projects/agent_learning).

Compared Candidate Sources & Selection Analysis (2)

Broader generalist agent platform; SWE-agent isolates the agent-computer interface design principles most relevant to bounded task delivery.

AutoCodeRover: Autonomous Program Improvement ↗ compared_alternative [Open Access / CC BY 4.0]

Focuses on autonomous program repair via code search; SWE-agent better matches the curriculum's bounded-tool and human-verification emphasis.

linking All Rights Reserved (personal research blog) Prose is linked, not copied; the curriculum uses its own bounded-agent implementation

LLM Powered Autonomous Agents

Author: Lilian Weng | Original Source Link ↗

Relevant Section / Range: Sections: planning, memory, tool use, challenges

Verified Version & Date: Blog post June 23, 2023 (Verified: 2026-10-30)

Selection Rationale:

Widely used survey mapping agent architecture components (planning, memory, tools) and their failure modes; supports the capstone integration architecture review.

Source Prerequisites:

Agent loops, tool use, and planning vocabulary.

Safe Fallback (Offline Resilience):

The capstone architecture lesson specifies the adapter boundary, budgets, and tool contracts directly; no blog content is required offline.

Compared Candidate Sources & Selection Analysis (2)
Significant Gravitas: AutoGPT repository ↗ compared_alternative [MIT License (outside autogpt_platform/); Polyform Shield License (autogpt_platform/)]

Open-ended autonomous loop; deliberately excluded as the capstone must remain a bounded, evaluable system.

Yohei Nakajima: BabyAGI repository ↗ compared_alternative [MIT License]

Task-list autonomy demo; the survey article gives vocabulary while the capstone keeps fixed tasks and budgets.

03 120 min

Independent terminal/filesystem check

Independent Mastery Check — no AI assistance during assessed work. Disclosing any assistance honestly is required, but assisted work is remediation only: complete a fresh unaided check before claiming mastery.

Prerequisites

day-02-act-02. Bash is required for the assessed path; the verified execution scope is Linux Bash.

Learning Objective

Independently create and inspect a directory and file, then verify the artifact with terminal commands without AI assistance.

Instructions

Predict the output of each check before running it, then record the observed output. Work entirely inside a new disposable fs-sandbox directory: create nothing in your home directory or any existing project, read no real user files, and assume nothing about prior repository state. Run the assessed sequence under Bash - the block and its printed rm -r -- line use Bash %q quoting, and Linux Bash is the executed scope; zsh, dash, and Windows PowerShell/cmd equivalents are unexecuted references, listed in the answer for orientation only. The sequence runs inside a contained fail-stop subshell: it creates a fresh private root with mktemp, validates it, and aborts before any write if mkdir or cd fails - a failed setup can never write into your current directory. The block ends by printing a literal rm -r -- <private-root> cleanup command (Bash %q-quoted) that names exactly the root it created; run it only if you want that directory removed. Run the block under Bash - Linux Bash is the executed scope; zsh/dash/Windows are unexecuted.

Practice & Prediction Log

Run the whole block below in a fresh Bash shell (paste it as one block), writing down your prediction before each pwd, find, cat, ls, and wc. If setup fails, the subshell aborts and nothing is written into your current directory. The block ends by printing a literal rm -r -- <private-root> cleanup command you may run when you want that directory removed:

(
set -e
SBX_ROOT=$(mktemp -d "${TMPDIR:-/tmp}/d02sbx.XXXXXX")
[ -n "$SBX_ROOT" ]
[ -d "$SBX_ROOT" ]
[ -w "$SBX_ROOT" ]
[ -x "$SBX_ROOT" ]
mkdir "$SBX_ROOT/fs-sandbox"
cd "$SBX_ROOT/fs-sandbox"
pwd
mkdir -p notes/drafts
printf 'first note\n' > notes/todo.txt
printf 'idea one\nidea two\n' > notes/drafts/ideas.txt
find . -type f | sort
cat notes/todo.txt
cd notes && pwd && ls && cd ..
wc -l notes/drafts/ideas.txt
printf 'rm -r -- %q\n' "$SBX_ROOT"
)

For every check, record: predicted output, observed output, and whether the filesystem state matched your mental model (path, file content, current directory).

Independent Mastery Criterion

Pass when, unaided: (a) every `pwd`/`find`/`cat`/`ls`/`wc` prediction was written before execution and every observed output was recorded; (b) all artifacts were created inside `fs-sandbox` only and verified with the stated commands; (c) any misprediction is recorded with the corrected assumption. Assistance is remediation only and requires a fresh unaided check before mastery is claimed.

Authoritative Source Resources & Provenance

linking PSF License Version 2

Python Standard Library: pathlib

Author: Python Software Foundation | Original Source Link ↗

Relevant Section / Range: Path.exists, Path.cwd, and anchoring paths to __file__

Verified Version & Date: Python 3.12 (Verified: 2026-10-30)

Selection Rationale:

Normative reference for the exists()/cwd() evidence that separates an absent file from a wrong working directory.

Source Prerequisites:

Basic Python syntax from Study Days 01-09

Safe Fallback (Offline Resilience):

Path.exists() and Path.cwd() are exercised directly in the local drill, so no online page is required.

Compared Candidate Sources & Selection Analysis (2)
os.path documentation ↗ compared_alternative [PSF License Version 2]

Functionally equivalent for exists() checks; pathlib keeps the beginner syntax object-oriented and consistent across the block.

shutil — High-level file operations ↗ compared_alternative [PSF License Version 2]

Covers copying and moving whole trees rather than path modeling; pathlib remains the right reference for the filesystem checks these days rehearse.

linking PSF License Version 2

Python Standard Library: tempfile

Author: Python Software Foundation | Original Source Link ↗

Relevant Section / Range: TemporaryDirectory for disposable on-disk fixtures

Verified Version & Date: Python 3.12 (Verified: 2026-10-30)

Selection Rationale:

Normative reference for creating and auto-removing fixture files inside tests without touching real user files.

Source Prerequisites:

Basic Python syntax from Study Days 01-09

Safe Fallback (Offline Resilience):

TemporaryDirectory is part of the installed standard library and needs no page access.

Compared Candidate Sources & Selection Analysis (2)
pytest tmp_path fixture ↗ compared_alternative [MIT]

Equivalent capability scoped to the pytest runner; deferred until the curriculum adopts pytest.

io — Core tools for working with streams ↗ compared_alternative [PSF License Version 2]

Lower-level file-object interface without automatic cleanup semantics; tempfile was selected for the safe scratch-file pattern the drills require.

04 120 min

Prediction-experiment-review and retrieval

Independent Mastery Check — no AI assistance during assessed work. Disclosing any assistance honestly is required, but assisted work is remediation only: complete a fresh unaided check before claiming mastery.

Prerequisites

day-02-act-03 plus your own recorded Day 01–02 logs.

Learning Objective

Retrieve the three-day method, compare evidence with the mastery criteria, and schedule recovery for every missed concept.

Instructions

Work in distinguishable phases: (1) closed-book recall — without looking at any notes, write down the Day 01–02 evidence you remember (tracer outputs, venv invariants, git state transitions, the strip/MRE result); (2) evidence comparison — open your own recorded logs and compare recalled vs recorded values line by line; mark each concept verified or missed, and annotate corrections without overwriting the recall; (3) fresh unaided transfer — predict a new snippet's output unaided, run it, record the result; (4) schedule a dated recovery or next check for every missed item.

Practice & Prediction Log

Closed-book, list the Day 01–02 concepts and the evidence value you recall for each (e.g. what a is c evaluated to; what sys.prefix != sys.base_prefix means; the git state order). Then compare with your written records — do not re-run the old commands. For each concept mark verified or missed with the actual recorded value. If nothing was missed, say so explicitly, reject one plausible common misconception with evidence (e.g. "assignment copies the list"), and still perform the fresh transfer check: predict the output of

d = {'a': 1}
e = d
e['b'] = 2
print(d, d is e)

unaided, then run it and record the result. Schedule a dated next check.

Independent Mastery Criterion

Pass when the log shows: (a) recall written before any checking and clearly separated from the comparison phase; (b) at least two Day 01–02 concepts each compared against an actual recorded value; (c) either a real mismatch with its correction, or an explicit "none found" plus a plausible misconception rejected with evidence; (d) the fresh unaided transfer prediction and its observed result; (e) a dated next check or recovery step for each missed item. Assistance is remediation only and requires a fresh unaided check before mastery is claimed.

Authoritative Source Resources & Provenance

linking Journal publisher copyright (all rights reserved) - lawful external linking only

Test-Enhanced Learning: Taking Memory Tests Improves Long-Term Retention

Author: Henry L. Roediger III, Jeffrey D. Karpicke | Original Source Link ↗

Relevant Section / Range: Psychological Science 17(3): 249-255, Experiments 1-2

Verified Version & Date: Psychological Science, 2006 (Verified: 2026-10-30)

Selection Rationale:

Foundational experimental evidence that retrieval practice (testing) outperforms repeated study for long-term retention; grounds the Day 88 AI-free retrieval checks in peer-reviewed learning science rather than folk advice.

Source Prerequisites:

Basic understanding of study sessions, retention intervals, and experimental design vocabulary.

Safe Fallback (Offline Resilience):

The curriculum restates the experimental design and effect sizes in original prose; every sealed task runs without the paper.

Compared Candidate Sources & Selection Analysis (2)

Strong meta-analytic coverage of spacing effects but addresses scheduling rather than the retrieval effect itself; retained as support for the Day 90 spaced-review schedule.

Equally foundational follow-up demonstrating repeated retrieval vs repeated study; the 2006 paper is cited as the standard first controlled demonstration.

linking Journal publisher copyright (all rights reserved) - lawful external linking only

Improving Students' Learning With Effective Learning Techniques: Promising Directions From Cognitive and Educational Psychology

Author: John Dunlosky, Katherine A. Rawson, Elizabeth J. Marsh, Mitchell J. Nathan, Daniel T. Willingham | Original Source Link ↗

Relevant Section / Range: Psychological Science in the Public Interest 14(1): 4-58; practice testing and distributed practice sections

Verified Version & Date: Psychological Science in the Public Interest, 2013 (Verified: 2026-10-30)

Selection Rationale:

Detailed comparative review rating practice testing and distributed practice as high-utility techniques while rating highlighting and rereading low-utility; anchors the retrieval, correction, and spaced-review design of Days 88-90.

Source Prerequisites:

None beyond general academic reading.

Safe Fallback (Offline Resilience):

Curriculum restates the utility ratings and application conditions in original prose; every task remains runnable offline.

Compared Candidate Sources & Selection Analysis (2)
Pashler et al. Learning Styles: Concepts and Evidence ↗ compared_alternative [Publisher copyright (originally Wiley; now SAGE Publications)]

Important negative result on learning-styles matching but narrower scope; Dunlosky et al. rates a broader set of techniques directly usable for this curriculum.

Brown, Roediger & McDaniel: Make It Stick: The Science of Successful Learning ↗ compared_alternative [Publisher copyright (Harvard University Press)]

Strong trade-book synthesis of the same evidence base; the peer-reviewed review is preferred for citation precision and technique-by-technique utility ratings.