← Back to course
Code Crew G6+ / Week 12 / Thursday
4/6
Week 12 Β· Ship and demo

Thursday

Demo day
// Test, polish, snapshot, graduate
⏱ about 30 min

Thursday: Demo day

Demo day at Mission Control. The whole crew gathers around the big screen, and Rocket feels his heart thumping. He has practiced, but he still feels nervous.

"What if it crashes in front of everyone?" he whispers to Raven.

Raven smiles. "What do you notice about your plan?" she asks. "You tested it, you fixed the edge cases, and you have a snapshot. You are ready. And if something odd happens, that is useful feedback."

Nova hovers beside the screen, ready to take notes. "Interesting," she says. "The best demos tell a short story: the problem, the tool, and one real example from start to finish."

Rocket takes a breath and begins with the problem.

Plan your demo

PUT THE DEMO STEPS IN A GOOD ORDER
  • ?Say the problem: the crew needed a log that never loses a note
  • ?Show the stats
  • ?List the entries and search for a word
  • ?Run mission_log.py and add a real entry
  • ?Ask for feedback
  • ?Run the tests and show they pass
WHY THIS EXERCISEA demo that starts with the problem helps people understand why each feature matters.
β—‡ GIVE THE DEMO
Show Mission Log to a grown-up. Follow your demo plan, and let them type one entry themselves.
Then ask three questions: What was easy? What was confusing? What one thing would make it better?
Write down the answers exactly as they say them.
Choose one small improvement from their feedback. Save a snapshot first, then make the change.

An example improvement

One tester said: I only want to see my last few entries. Here is a function that gives the newest entries first. The small program below tests it before it goes anywhere near Mission Log.

# latest_check.py
def latest(entries, how_many=3):
    """The newest entries, newest first."""
    result = []
    index = len(entries) - 1
    while index >= 0 and len(result) < how_many:
        result.append(entries[index])
        index = index - 1
    return result


log = ["first", "second", "third", "fourth"]
assert latest(log) == ["fourth", "third", "second"]
assert latest(log, 1) == ["fourth"]
assert latest([]) == []
print("latest() passed its tests")
What does latest(["a", "b", "c"], 2) return? Type the first item.
How many items does latest(["a"], 3) return?
FEEDBACK
  • Read the question.
  • Tap your answer.
Your tester says the menu is confusing. What is the best first step?
At your computer
1. Before the demo, run test_mission_log.py once.
2. Give the demo, following your plan.
3. Type latest_check.py, save it and run it. Check for the passed message.
4. If you choose to add latest to Mission Log, save mission_log_v2.py first.
5. After any change, run test_mission_log.py again.
PRACTICE: READ LATEST()
  • Read the question.
  • Tap your answer.
What does latest(["a", "b", "c", "d"]) return?
Why does the while condition check index >= 0?
Which test checks the empty list edge case?
StatementTrue or false?
latest changes the order of the original list.?
latest(log, 2) returns two entries.?
how_many=3 is a default value.?
A demo should hide the tests from the audience.?
WHY THIS EXERCISElatest only reads the list to build a new one, and passing tests are part of a strong demo.

You gave a real demo and turned feedback into an improvement. That is the full cycle real teams use. Tomorrow is graduation.

← Wednesday