Self-Directed Learning & Python Engineering Foundations 480 active minutes (8 hours focused study)

Day 01: Diagnosis, Learning Methods, and Environment

Use a diagnostic self-check, prediction-experiment-review, retrieval, concept decomposition, and a verified terminal environment; the existing mutation example is the shared tracer bullet, not a duplicated lesson.

90 min Independent Mastery Check; assistance after your prediction and observed output are recorded is remediation only — the assessed explanation must be produced unaided, and any assisted remediation requires a fresh independent attempt before mastery is claimed.

Learning Methods, Minimal Reproductions & Prediction-Experiment-Review Routine

Prerequisites

High-school reading comprehension and basic terminal awareness; no advanced Python syntax required.

Learning Objective

Use a diagnostic self-check and the prediction-experiment-review loop on the existing mutation tracer bullet, then decompose the concept into names, objects, mutation, allocation, and evidence.

Instructions

In programming and model debugging, blind prompting and repeated guessing conceal real gaps in understanding. This activity requires you to analyze an object mutation and reference problem using the Prediction-Experiment-Review cycle.

Practice & Prediction Log

Examine the following Python code snippet. Write your predicted output in the draft area below before running it:

a = [1, 2, 3]
b = a
b.append(4)
c = a + [5]
print('Case 1:', a)
print('Case 2:', c)
print('Case 3:', a is b, a is c)

Explain why b.append(4) affects a, whereas a + [5] does not. Formulate a minimal reproducible example (MRE): a short witness snippet demonstrating that b and a name the same object — required even if every prediction was correct, since it is the evidence for the identity claim, not only a remedy for unexpected behavior.

Day 01 Objective Diagnostic Check: Reference vs. In-Place Mutation

Answer the following questions to verify your understanding. Select your declared assistance condition before submitting.

Declared Assistance Condition

Note: AI-free work is an honest declared condition, not claimed surveillance.

1.

After running a = [1, 2, 3]; b = a; b.append(4), what is the value of a?

2.

Given c = a + [5], what does a is c evaluate to?

3.

Which statement accurately describes the underlying mechanism of b = a in Python?

Attempt History & Evidence

    Learning Project Submission & Evidence

    Notice: Pasted execution logs and notes are self-reported evidence and do not constitute independent or automated verification.

    0 / 4096 bytes
    Declared Assistance Condition

    Note: AI-free work is an honest declared condition, not claimed surveillance.

    Current Submitted Evidence Details

    No submission recorded yet.
    Independent Mastery Criterion:

    Mastery Criterion: The learner independently predicts the distinction between in-place mutation and object allocation, writing a 3-step diagnostic trace (prediction, observed outcome, root-cause explanation) and a minimal identity/mutation witness snippet (MRE) — required regardless of prediction outcome — without AI assistance.

    Authoritative Source Resources & Provenance

    Linking (Lawful external reference) 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 (Rejected for Day 01) [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.

    Optional Video Resource (Unavailable does not block study)

    Note: Optional external media resource is unavailable. Text and self-contained exercises remain fully functional offline.

    120 min Independent Mastery Check

    Python Environment Setup, Terminal Operations & Virtual Environments

    Prerequisites

    Terminal access on a modern operating system.

    Learning Objective

    Create a clean Python 3.12+ virtual environment in an empty sandbox directory and verify interpreter and package isolation with `sys.prefix`, `sys.executable`, and `python -m pip`.

    Instructions

    Assessed on a POSIX shell (bash or zsh on Linux/macOS). Start in a fresh terminal where no virtual environment is active — the before-state probe must print True; record the executable and prefix paths it reports. Windows equivalents are given at the end but were not executed in this material.

    python3 --version
    python3 -c "import sys; print(sys.executable); print(sys.prefix); print(sys.base_prefix); print(sys.prefix == sys.base_prefix)"
    mkdir venv-sandbox && cd venv-sandbox
    printf 'marker\n' > marker.txt
    python3 -m venv .venv
    . .venv/bin/activate          # bash/zsh; cmd.exe and PowerShell differ (below)
    echo "$VIRTUAL_ENV"
    python -c "import sys; print(sys.executable); print(sys.prefix); print(sys.base_prefix); print(sys.prefix == sys.base_prefix)"
    python -c "print(open('marker.txt').read().strip())"
    python -m pip --version
    deactivate
    python3 -c "import sys; print(sys.executable); print(sys.prefix); print(sys.base_prefix); print(sys.prefix == sys.base_prefix)"

    Expected invariants:
    - python3 --version reports Python 3.12 or later before you build on it.
    - In a fresh shell the before-state probe prints sys.prefix == sys.base_prefix as True; record those paths as your before-state.
    - After activation, $VIRTUAL_ENV names the .venv directory, sys.executable resolves inside .venv, and sys.prefix equals the .venv path while sys.base_prefix keeps pointing at the base installation — that inequality is the isolation check. sys.executable reports the invoked path, which may be a symlink, so rely on the prefix values rather than resolving a physical executable.
    - the venv interpreter itself reads marker.txt and prints marker: a Python process inside the venv still reads a file outside .venv in the working directory — interpreter/package isolation, not a filesystem sandbox.
    - python -m pip --version reports pip from .venv's site-packages; python -m pip keeps pip paired with the active interpreter.
    - After deactivate, the closing probe prints the same values as your recorded before-state (sys.prefix == sys.base_prefix again).

    Windows equivalents (reference commands, not executed in this material): create with py -m venv .venv; activate with .venv\Scripts\Activate.ps1 (PowerShell) or .venv\Scripts\activate.bat (cmd.exe); diagnostics are $env:VIRTUAL_ENV in PowerShell, %VIRTUAL_ENV% in cmd.exe, and where.exe python in place of command -v/echo $PATH. deactivate, python -c, and the sys.prefix/sys.base_prefix checks are the same.

    If no supported Python is available, follow the recorded fallback in the exercise instead of claiming the environment portion.

    Scope note: a virtual environment isolates the Python interpreter and its installed packages via sys.prefix/sys.path. It is not a filesystem or security sandbox — as the venv Python's marker read shows, programs run inside it can still read your files — and it does not pin Python itself.

    Practice & Prediction Log

    Start in a fresh terminal where no virtual environment is active and run the worked sequence: record the before-state probe, create .venv in a new empty directory, activate it, record echo $VIRTUAL_ENV, the inside-venv probe, the marker.txt read by the venv interpreter, and python -m pip --version; then deactivate and confirm the closing probe matches your recorded before-state. If python3 --version fails or reports a version below 3.12, do not claim the stated environment: with an older interpreter, record the observed version and repeat the checks scoped to it; if no interpreter exists, record command -v python3 (Windows: where.exe python), python3 --version, echo $PATH (Windows: %PATH% / $env:PATH) and the observed error, and schedule installing Python as a recovery task. An unexecuted environment task is not evidence of mastery.

    Independent Mastery Criterion:

    In a fresh shell with no environment active, independently run the create–activate–verify–deactivate cycle in a new directory and produce recorded output in which the inside-venv probe shows `sys.prefix != sys.base_prefix` with `python -m pip` resolving inside `.venv`, the `marker.txt` read demonstrates the venv is not a filesystem sandbox, and the closing probe matches the recorded before-state — plus a correct one-line explanation of interpreter isolation versus filesystem/security sandboxing. If no supported Python exists, mastery of this portion is not claimed; the recorded fallback evidence and recovery task substitute for it.

    Authoritative Source Resources & Provenance

    linking PSF License Version 2

    The Python Tutorial: Virtual Environments and Packages

    Author: Python Software Foundation | Original Source Link ↗

    Relevant Section / Range: Section 12 (creating venvs, pip installs, requirements files)

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

    Selection Rationale:

    Primary reference for python -m venv and interpreter isolation, which the Day 01 drill checks through activation, the sys.prefix/sys.base_prefix probes, and python -m pip --version; its requirements-file and wrong-environment material is practiced later, on Study Day 11.

    Source Prerequisites:

    Basic Python syntax from Study Days 01-09

    Safe Fallback (Offline Resilience):

    The Day 01 drill needs no network: venv creation and activation, the sys.executable/sys.prefix/sys.base_prefix probes, the venv interpreter's marker.txt read, python -m pip --version, and deactivate all run offline; without a supported Python, the exercise's recorded no-interpreter fallback applies.

    Compared Candidate Sources & Selection Analysis (2)
    pip documentation ↗ compared_alternative [MIT]

    Primary reference for pip commands, but the tutorial presents the create-activate-install loop as one beginner-friendly narrative.

    virtualenv documentation ↗ compared_alternative [MIT License]

    Mature third-party environment tool with overlapping behavior; the stdlib venv tutorial was selected to avoid an extra dependency for first-time setup.

    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:

    Background reference for working-directory-relative file access: the Day 01 drill's venv interpreter reads marker.txt from the current directory using open(), not pathlib; Path.exists()/Path.cwd() evidence that separates an absent file from a wrong working directory is practiced on Study Day 10.

    Source Prerequisites:

    Basic Python syntax from Study Days 01-09

    Safe Fallback (Offline Resilience):

    Not needed to complete the Day 01 drill, which makes no pathlib call, so no online page is required; Path.exists() and Path.cwd() are exercised offline on Study Day 10.

    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.

    150 min Independent Mastery Check

    Git Fundamentals: Repository Initialization, Commits & Status Inspection

    Prerequisites

    Basic file commands (mkdir, cd, ls) and a working `git --version`.

    Learning Objective

    Independently initialize a disposable Git repository and complete a modify–stage–commit–log cycle, verifying each transition with `git status`, `git diff`, and `git log`.

    Instructions

    Assessed task — independent: perform the whole cycle yourself in a newly created, disposable directory; never inside this project or any existing work. Do not use destructive commands (reset --hard, clean, push --force). If a commit fails because no author identity exists, set it locally inside that repository only, as shown.

    mkdir git-sandbox && cd git-sandbox
    git init
    git config user.name "Learner"
    git config user.email "[email protected]"
    printf 'first line\n' > notes.txt
    git status
    git add notes.txt
    git diff --cached
    git commit -m "Add notes file"
    printf 'second line\n' >> notes.txt
    git status
    git diff
    git add notes.txt
    git commit -m "Append a second line to notes"
    git log --oneline
    git status

    Expected invariants:
    - git status lists notes.txt as untracked before git add; after staging, git diff --cached shows the new lines prefixed +.
    - After a modification, git status/git status --porcelain shows the file as modified-unstaged ( M), and git diff shows the unstaged change.
    - git log --oneline lists both commits, newest first; the final git status reports a clean working tree.
    - git config user.name/user.email without --global writes only this repository's .git/config, so your machine-wide identity is untouched.

    Record each command and observed output in your log.

    Optional, unassessed orientation — outside this check: you may open the Agent Tool Track page to preview which agent tool you will use later. Orientation is not part of this Independent Mastery Check and contributes no evidence to it.

    Practice & Prediction Log

    Carry out the full command sequence in a new empty directory. Your assessed artifact is a recorded log of commands and outputs showing the untracked → staged → committed transitions for notes.txt, a second modify–stage–commit cycle, and a final git log --oneline listing two commits. Also record one status observation: either something git status reported that you did not expect, or — if nothing surprised you — one expected status transition with its actual output and an explanation of why that output confirms your prediction. Keep your raw prediction and raw output exactly as they occurred.

    Independent Mastery Criterion:

    Independently execute the complete cycle — initialize a new repository, edit a file, stage it, verify the staged diff, commit, and confirm both commits with `git log --oneline` ending in a clean `git status` — in a disposable directory, with no pre-existing repository state, no destructive commands, and no agent assistance.

    Authoritative Source Resources & Provenance

    linking CC BY-NC-SA 3.0 noncommercial share-alike

    Pro Git, Second Edition

    Author: Scott Chacon and Ben Straub | Original Source Link ↗

    Relevant Section / Range: Chapter 3 (Git Branching), Section 7.7 (Reset Demystified), Sections 5.2/6.2 (Contributing to a Project)

    Verified Version & Date: Second edition (Apress, 2014) (Verified: 2026-10-30)

    Selection Rationale:

    Freely licensed reference for branching, merging, conflict resolution, and safe recovery vocabulary used on Day 14.

    Source Prerequisites:

    Basic git status/log/diff vocabulary from earlier study days

    Safe Fallback (Offline Resilience):

    git help <command> and the Git manual pages ship with Git and cover the same commands offline; every required workflow is stated locally in the lesson.

    Compared Candidate Sources & Selection Analysis (2)
    GitHub Skills interactive courses ↗ compared_alternative [MIT (varies by course)]

    Interactive but requires a GitHub account and an external service; disposable local repositories keep the exercise self-contained.

    Atlassian Git Tutorials ↗ compared_alternative [All Rights Reserved]

    Vendor-owned prose with no permissive license; Pro Git covers the same ground under CC BY-NC-SA.

    120 min Independent Mastery Check

    Day 01 Review: Retrieval Practice & Learning Reflection Log

    Prerequisites

    Complete the first 3 activities of Day 01.

    Learning Objective

    Produce a closed-book retrieval log that restates today's key concepts in your own words, records the evidence for one misconception — or, if none was found, an explicit none-found record plus a plausible misconception rejected with evidence — and schedules a concrete recovery step.

    Instructions

    Do this unaided, with the lesson and your notes closed.
    Step 1 — unaided recall (references closed): write what you recall about each of today's three threads — object references and mutation, virtual-environment isolation, and the Git modify–stage–commit cycle — without looking anything up.
    Step 2 — reference check and correction: only now open the reference answers, mark where your recall was wrong or incomplete, and handle one misconception as the rubric requires. Annotate rather than overwrite your Step 1 text so the unaided attempt stays distinguishable.
    Step 3 — fresh unaided check (references closed again): apply one corrected or recalled concept to a new small case — predict output on fresh code or re-derive a check — and record the result.
    Step 4 — schedule a short recovery step: a specific time and trigger for re-testing the weakest items before starting Day 02.

    Rubric — your log must satisfy all four items:
    - at least two Day 01 concepts restated in your own words during the unaided recall step, not copied phrasing;
    - either one actual misconception recorded with the concrete evidence that corrected it, or — if none was found — an explicit statement that none was found plus one plausible common misconception you reject with the evidence that justifies the rejection;
    - the fresh unaided transfer/retrieval check from Step 3 with its result recorded — a bare 'everything correct' claim establishes nothing;
    - one scheduled recovery step with a specific time and trigger.
    Raw length is not evidence: a short log satisfying the rubric outranks a long summary.

    Practice & Prediction Log

    Write the retrieval log described in the instructions — unaided recall first, then reference-checked correction (or the explicit none-found alternative), then the fresh unaided check and the scheduled recovery step.

    Independent Mastery Criterion:

    Produce a closed-book retrieval log satisfying all rubric items: at least two Day 01 concepts restated in your own words; one actual misconception corrected with concrete evidence — or, if none was found, an explicit none-found record plus a plausible misconception rejected with evidence; a fresh unaided transfer check with its result recorded; and one scheduled recovery step. Word or character counts and bare correctness claims are not evidence of conceptual mastery.

    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.