Hands-on Labs
Hands-on Labs
Reading about computational thinking is like reading about swimming. These labs get you in the water.
Each lab is a guided, runnable exercise built around one design rule: every lab fuses two or more CT concepts, because that is how the concepts occur in real work. Nobody hands you a “decomposition task” — you get a messy problem, and decomposition, pattern recognition, and evaluation happen together or not at all.
The labs
| Lab | Fused concepts | You will build |
|---|---|---|
| Lab 1: Support-Ticket Triage Pipeline | Decomposition + pattern recognition + algorithm design | A rule-based text classifier, measured and iterated against labeled data |
| Lab 2: Simulate an Epidemic | Abstraction + modeling & simulation + systems thinking | An agent-based SIR simulation exposing feedback loops and tipping points |
| Lab 3: Trust but Verify | Verification thinking + evaluation & debugging + data thinking | A harness that checks LLM-style outputs against invariants and golden cases |
How to use these labs
- Requirements: Python 3.9+ and nothing else. Every lab uses only the standard library — no installs, no API keys, no accounts. If
python3 --versionworks in your terminal, you are ready. - Type, don’t paste — at least once. The friction is the learning. Paste on your second pass if you like.
- Run after every step. Each lab is staged so the program runs (and tells you something) at every checkpoint. If a step’s output surprises you, stop and figure out why — that surprise is the lab working as intended.
- Do the “iterate” steps. The first working version is the beginning of each lab, not the end. The CT skill being trained is the loop: measure, diagnose, change one thing, measure again.
- Predict before you run. Before each run, say out loud what you expect. Prediction errors are where models — yours, not the computer’s — get repaired.
- Expected time: 45–90 minutes per lab. They are independent; do them in any order, though Lab 1 is the gentlest on-ramp.
Working with an AI assistant? Good — that mirrors real practice. But apply the scaffolding rule from the research literature: make the AI explain, then verify its claims by running the code. Never accept a step you could not defend to a colleague.
When a lab leaves you wanting the underlying theory, the concept pages in Foundations, CT in the AI Era, and Data & Systems Thinking are the reference shelf.