Day 24 / 25 Capstone Build Lab 0/0 exercises Exercises ↓

AmouAI Hub/Courses/Programming Fundamentals/Day 24

Week 5 · Craft, Comparison & Capstone · Day 24

Capstone Build Lab

Guided build sessions. You build yours while a parallel reference project gets built on camera.

Study time
4 hours
Reading
Focus
build · test · polish

By the end of today you can

  1. Work from a design document to a running program
  2. Build in vertical slices rather than horizontal layers
  3. Keep a suite green while the code changes underneath it
  4. Recognise when to cut scope rather than cut quality
  5. Use the debugger and the tests together
  6. Commit in small, reviewable steps

Today's videos

Watch each video, then work the matching sections below. Watching alone will not do it.

24A
Vertical Slices (120 min)
Why you build one feature end to end rather than all the classes first · the four-hour shape · committing at every green point · persistence now, not later · cutting scope rather than quality.
24B
Build Lab & Getting Unstuck (120 min)
The reference project built on camera · the debugging order from Day 5 · a failing test as a bug you can reproduce on demand · the five capstone failures and what causes each.

1How to build, not what to build

The order matters more than the speed.

Vertical slices, not horizontal layers

Do not build all the classes, then all the persistence, then all the interface. Build one feature end to end — one command that reads input, changes the model, saves, and reports. Then the next. You always have something that runs, and you find integration problems on day one instead of at midnight.

A four-hour shape

BlockFocusRule
0:00–0:30Skeleton — project layout, one class, one passing testIt must run before you go further
0:30–1:30Slice 1, end to endCommit when green
1:30–2:30Slices 2 and 3Commit each
2:30–3:15Edge cases and error handlingBreak it on purpose
3:15–3:45Tests up to target; run black/ruff or the formatter
3:45–4:00README, and honest notes on what is unfinished
If you are behind at 2:30, cut scope — not quality

Drop a whole feature and say so in the README. Do not ship four half-features with no tests. A smaller finished program scores better and, more importantly, teaches you more — because finishing is the part most people never practise.

2When you get stuck

Everything you learned on Day 5, in the order to use it.

  1. Read the error properly. Bottom line first, then walk up the frames. Two minutes here saves twenty.
  2. Reproduce it smallest. Can you trigger it in five lines? Now you have a test case.
  3. One hypothesis. "The list is empty when it reaches this function." Not "something is broken".
  4. One test. The smallest thing that would confirm or kill it — one print, one breakpoint.
  5. Change one thing. Re-run. Observe. Change four and you have learned nothing.
  6. Rubber-duck it. Explain the function out loud, line by line. The bug usually surfaces mid-sentence.
  7. Walk away for ten minutes. Genuinely effective, and the step people skip.
The tests you wrote are your debugger

A failing test is a bug you can reproduce on demand, in one second, forever. That is the entire reason Day 15 came before Day 24: when the capstone breaks, you will not be hunting through a running program — you will be reading a red test that names the broken behaviour.

Common capstone failures

SymptomUsuallyFix
Nothing works after a big changeToo many changes between commitsgit stash, go back, smaller steps
Tests pass, program is wrongTesting the wrong thingTest the behaviour, not the implementation
Save works, load does notFormat written ≠ format expectedRound-trip test: save then load then compare
Works for you, crashes for the markerAbsolute paths, or a missing data fileRelative paths; create the file if absent
Slower and slower as data growsAccidental O(n²)Day 11 — find the loop inside a loop

>_Python playground

A real Python interpreter running inside your browser. Nothing is installed, nothing is uploaded, nothing can break.

scratch.pypython not loaded
Values for input(), comma separated →
Output appears here. The first run takes a few seconds while Python loads.

Exercise set

Checked automatically the moment you submit. Work top to bottom — each one assumes the last. Your answers are saved in this browser.

All Warm-up Core Challenge Reset day

Day 25 — Testing, Delivery & Course Synthesis

Ship it, then trace the through-line across all twenty-five days.

Continue →