Home: README
- Beginners who can run Python but still feel lost reading code.
- Learners who need repeated, hands-on drills.
- A set of foundational scripts that solve small, real tasks.
- A debugging notebook that captures mistakes and fixes.
- Setup complete from 03_SETUP_ALL_PLATFORMS.md.
- Working
.venvand pytest.
Goal:
- Understand
str,int,float,bool, andNone.
Task:
- Write a script that reads text values and converts them safely.
Minimum script behaviors:
- Convert
"42"to integer and add 10. - Reject invalid number text with a clear error message.
Goal:
- Build confidence with
if,elif,else.
Task:
- Evaluate an alert severity string and print an action:
Critical->Page On-CallWarning->Create Ticket- else ->
Log Only
Goal:
- Process many records with predictable logic.
Task:
- Iterate over a list of alert dictionaries.
- Print a one-line summary for each.
- Count critical alerts.
Goal:
- Break logic into testable units.
Task:
- Implement:
normalize_status(text: str) -> stris_critical(status: str) -> bool
- Add pytest tests for both functions.
Goal:
- Read and write files safely with
pathlib.
Task:
- Read a text file of events.
- Write a summary file containing counts by severity.
Goal:
- Read tracebacks and isolate root cause quickly.
Task:
- Trigger and fix:
KeyErrorTypeErrorFileNotFoundError
Record each incident in notes/debug_journal.md with:
- error message,
- root cause,
- fix,
- prevention rule.
- 15+ micro-scripts in a dedicated foundations project.
- 20+ passing tests across key logic helpers.
- Debug journal with repeated failure patterns and fixes.
- Delete a required dict key and handle it safely.
- Change a numeric input to text and validate before math.
- Rename an input file and recover with clear error handling.
- If loops confuse you: print intermediate values each iteration.
- If functions confuse you: write expected input/output examples first.
- If tests confuse you: test one function at a time with tiny data.
You are ready for the next phase when you can:
- write and test small functions from scratch,
- explain tracebacks in plain English,
- process list-of-dict data without guesswork.
- Play: mutate examples aggressively and observe behavior.
- Build: complete every lab in order and commit after each lab.
- Dissect: read a peer script and refactor it into smaller functions.
- Teach-back: explain one lab weekly in writing or a recorded walkthrough.