Day 25 / 25 Testing, Delivery & Course Synthesis 0/0 exercises Exercises ↓

AmouAI Hub/Courses/Programming Fundamentals/Day 25

Week 5 · Craft, Comparison & Capstone · Day 25

Testing, Delivery & Course Synthesis

Ship it. Then trace the through-line from print("hello") to a two-language OOP system, and see where it leads into AI and data science.

Study time
4 hours
Reading
Focus
ship it · then look back

By the end of today you can

  1. Run a final testing pass that finds things, rather than confirming what works
  2. Write a README someone else can actually start from
  3. Package and submit a project cleanly
  4. Trace the through-line across all 25 days
  5. Name what you would learn next, and why
  6. Say what you can now do that you could not on Day 1

Today's videos

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

25A
The Final Testing Pass (120 min)
Changing your goal from confirming to breaking · the eight attacks · hostile input and why a hand-rolled parser dies · coverage and its limits · fixing what the pass finds.
25B
Delivery & Synthesis (120 min)
Packaging · the six-section README · the fresh-clone check · the through-line from print("hello") to a two-language OOP system · NumPy, pandas and where this leads next.

1The final testing pass

Try to break it. That is the job.

Change your goal for one hour

Every test you have written so far was trying to confirm the program works. For this hour, you are trying to make it fail. Those are different activities and they find different things.

AttackTryShould
EmptyNo data, empty file, empty string, zero itemsExplain, not crash
OneExactly one item — the classic off-by-oneBe correct
BoundaryThe limit, and one either sideBe correct at all three
Wrong typeLetters where numbers goReject with a clear message
Huge10,000 itemsFinish. If not — Day 11
HostileQuotes, commas, newlines, emoji in text fieldsRound-trip intact
InterruptedKill it mid-write, then reloadNot corrupt the data
RepeatedThe same action twiceBe idempotent or refuse clearly
The hostile-input row is the one people skip

A contact named O'Brien or an address containing a comma will break a hand-rolled CSV writer instantly. This is why Day 10 said do not write your own parser. Test it with a real apostrophe.

Coverage, and its limits

terminal
pip install pytest-cov
pytest --cov=. --cov-report=term-missing

Coverage tells you which lines ran during your tests. That is genuinely useful for finding whole functions nobody exercises. But 100% coverage does not mean correct — a test that runs a line without asserting anything about it counts just the same. Use it to find gaps, not to award yourself a grade.

2Packaging and delivery

Someone else has to run this.

project layout
expense-tracker/
├── README.md
├── requirements.txt
├── .gitignore
├── src/
│   ├── models.py
│   ├── storage.py
│   └── main.py
├── tests/
│   ├── test_models.py
│   └── test_storage.py
└── data/
    └── .gitkeep

The README, in order

  1. What it does — one paragraph, no jargon.
  2. How to install — the exact commands, copy-pasteable.
  3. How to run — the exact command.
  4. How to testpytest, and what a pass looks like.
  5. Design notes — the structure, and one or two decisions you made and why.
  6. Known limitations — what does not work, and what you would do next.
Section 6 gains you marks, not loses them

An honest limitations section reads as judgement. Pretending a known gap does not exist reads as not having looked. Every experienced reviewer would rather see "search is case-sensitive; I would normalise on input" than discover it themselves.

Before you submit

  • Clone it into a fresh folder and follow your own README exactly. It will fail. Fix that.
  • No absolute paths, no /Users/yourname/.
  • No secrets, no API keys, no personal data.
  • .gitignore covers __pycache__/, .venv/, *.class, editor folders.
  • The tests pass on a clean checkout, not just on your machine.
"It works on my machine" is the oldest bug in software

The fresh-clone check catches it in five minutes, and it is the single highest-value thing on this page.

3The through-line

Twenty-five days, one argument.

DaysWhat you learnedWhat it was really for
1–5Variables, types, conditionals, loops, debuggingPrograms are state that changes over time — and you can watch it
6–7Functions, scope, recursionNaming an idea is how you stop holding it all in your head
8–10Lists, dicts, sets, files, modulesChoosing the right structure decides how hard everything else is
11Algorithms and Big-OCost is a property you can reason about before measuring
12–14Classes, encapsulation, inheritanceBundling data with behaviour, and drawing boundaries
15Exceptions and testingMaking failure explicit, and provable
16–21JavaWhich parts were the idea and which were Python's spelling
22–25Craft, comparison, capstoneSoftware is written for people, and finishing is a skill
The one sentence

Every day of this course was about managing complexity so it fits in a human head. Functions, data structures, classes, interfaces, modules and tests are all the same move: draw a boundary, name what is inside it, and let yourself stop thinking about the rest.

What you can do now

  • Write a program of a few hundred lines and still be able to change it
  • Read a traceback and go straight to the cause
  • Choose a data structure for a reason you can state
  • Decompose a problem into functions and classes with honest names
  • Write tests that would catch your own mistakes
  • Read code in two languages, and learn a third from documentation
  • Finish something — which is rarer than it sounds

Where this leads

NextUsesBecause
NumPyLists → arraysWhole-array operations instead of loops; Day 11's cost lesson applied
pandasDicts of lists → DataFramesDay 9's grouping and counting, at scale
Testing at depthDay 15 and 21Fixtures, mocking, property-based testing
Databases and SQLDay 10's persistenceWhen a CSV stops being enough
Web APIsDay 10's JSON, Day 12's classesThe same structures, over a network
ML frameworksDays 12–14PyTorch and scikit-learn are OOP designs — Model, Layer, fit
The honest next step

Do not start another course tomorrow. Build a second thing — something you actually want to exist, without a brief telling you what to do. The gap between following instructions and choosing your own is the last one this course cannot close for you, and the only way across is to build something nobody asked for.

The LM Playground builds a language model from scratch, and Diffusion Playground builds an image generator. Both assume exactly what you now have.

>_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

That is the course

Twenty-five days, two languages, four mini-projects and a capstone. Now go and build something nobody asked you to build.

Course home →