Day 23 / 25 Comparative Case Study + Capstone Kickoff 0/0 exercises Exercises ↓

AmouAI Hub/Courses/Programming Fundamentals/Day 23

Week 5 · Craft, Comparison & Capstone · Day 23

Comparative Case Study + Capstone Kickoff

One non-trivial application, built twice. Where each language is pleasant, where each fights you, and when you would reach for which.

Study time
4 hours
Reading
Focus
one spec, two languages

By the end of today you can

  1. Compare two implementations of one spec on evidence rather than taste
  2. Say where static typing paid for itself and where it cost you
  3. Estimate how each version would behave at ten times the size
  4. Choose a language for a stated problem, and defend it
  5. Scope a capstone you can actually finish
  6. Write a design document: spec, model, structure, risks
  7. Identify the riskiest part of your build and schedule it first

Today's videos

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

23A
The Same Spec, Twice (120 min)
A library system in both languages · where Java cost more to write and less to change · where the compiler earned its keep · type hints and mypy · choosing a language for a stated problem, and defending it.
23B
Capstone Kickoff (120 min)
Scoping something you can actually finish · user stories · the data model · module structure · the test plan · naming your risks and scheduling them first · writing the out-of-scope list.

1The same spec, twice

A library system, built in both languages. Same behaviour, same tests.

MeasurePythonJavaReading
Lines of code~320~610Java's ceremony is real and roughly 2×
Files611One public class per file forces the split
Time to first runminuteslongerCompilation, and more to declare
Bugs caught before running014Typos, wrong types, missing overrides
Bugs found by tests93Java's compiler had already taken most of them
Bugs found after "done"41The expensive ones
Time to add a new item type~10 min~18 minMore to write, less to check
Time to rename a core method~25 min~2 minRename refactoring is exact when types are known
Read the last two rows together

Java cost more to write and far less to change. That is the trade in one line — and it explains why the answer depends on the project. Code that ships once and is never touched has different economics from code twelve people will edit for five years.

2Typing trade-offs

An honest ledger.

Static typing wins whenDynamic typing wins when
The codebase outlives its authorsThe program is small and short-lived
Many people edit the same codeOne or two people own it
Refactoring must be safeRequirements change faster than the code
The API has external consumersYou are exploring the problem
Failures are expensiveIteration speed is the priority
Python is not "untyped"

Python has types — it checks them at runtime rather than compile time. And type hints plus mypy give you much of Java's checking without the ceremony: def check_out(self, item_id: str, member: Member) -> date: This is now standard practice on any Python codebase of size, and it moves Python meaningfully along the spectrum. The choice is not binary.

The point of two languages, stated plainly

You now know what a class is, separately from Python's way of spelling it. You have felt why interfaces exist, because Java would not let you skip them. And you have seen the same idea — a name pointing at an object — in two type systems. That is understanding rather than familiarity, and it is not reachable in one language.

3Capstone kickoff

Choose it today. Design it today. Build it tomorrow.

Your capstone must be a working application in either language, with tests, documentation, and a defensible design.

Scope, honestly

The failure mode is always scope, never ability

Every unfinished capstone this course has seen was too big on day one. Pick something you could finish in half the time available, then use the other half for tests, edge cases and polish. A small thing finished beats an ambitious thing at 70%, and it is not close.

Good scopeToo big
Expense tracker with categories and a monthly reportA personal finance platform
Command-line quiz app with saved scoresA learning-management system
Recipe manager with search and shopping listsA social recipe network
Text-adventure engine with 6-8 roomsAn MMO
Library system extending Mini-Project 3A library system with a web front end

The design document

  1. One paragraph. What it does and who for. If you cannot, the idea is not clear yet.
  2. User stories. Five to eight, in the form as a X, I want Y, so that Z.
  3. Data model. Your classes, their fields, and how they relate. Draw it.
  4. Module structure. Which file holds what, and what depends on what.
  5. Test plan. What you will test and which edges you expect to break.
  6. Risks. The parts you are least sure about — and schedule those first.
  7. Out of scope. Written down, so you can say no to yourself tomorrow.
Section 6 is the one that saves you

Whatever you are least sure about — the file format, the persistence, the one algorithm you have not written before — build that first, in a throwaway script, before anything else. If it turns out to be harder than you thought, you find out on day one when you can still change the plan, rather than on day three when you cannot.

Section 7 matters more than it looks. "Out of scope: no web interface, no multi-user, no undo" is a sentence you write today so that tomorrow-you cannot quietly add them at 11pm.

>_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 24 — Capstone Build Lab

Guided build sessions, with a reference project built alongside.

Continue →