Draw the Boundary Around a Successful Demo

Filed under: Workshop Notes
A screen can say “request accepted” even when the program has nothing it can recover after closing. A tiny two-run experiment makes the distinction visible without building a kiosk.
The variety in Raspberry Pi’s 29 October 2026 product showcase includes service kiosks and photo booths. Our example is independent of those products: a short Python program that writes one invented request to a local file.
Run the same program twice
Use a new practice folder. Save this as request_demo.py and run it with Python 3 from that folder. It creates or overwrites only workshop-request.txt there.
from pathlib import Path
p = Path('workshop-request.txt')
previous = p.read_text(encoding='utf-8') if p.exists() else '(none)'
print('previous run:', previous)
request = 'seat by the window'
print('this run:', request)
p.write_text(request, encoding='utf-8')
In our local check, the first process printed previous run: (none). After it exited, a second process in the same folder printed previous run: seat by the window. Both printed the current request. The saved file, rather than the old process’s variable, supplied the second run’s previous value.
The relevant file operations are documented in Python’s Path read/write methods. This check ran on a Linux server with Python; it is not a Raspberry Pi hardware test.
Why the indicator alone would be misleading
The program prints the current request before writing the file. If writing failed, that line could already have appeared. The visible message and the storage operation are separate events. A real interface should make clear which event its confirmation represents.
Now consider changing the request. This example replaces the file’s contents; it does not append a second record. A successful second run therefore demonstrates retrieval of one saved value, not a history of every request. The intended behaviour must determine which observation counts as success.
What the two runs establish
They establish that, in this small check, a new process read the text written by the previous process. They do not test a power cut, concurrent writers, delivery to another service or whether someone acted on the request. Those are separate properties and would require different designs and tests.
For a workshop, this is a useful stopping point. Participants can inspect the file and explain why the second process knows something from the first. The demonstration has acquired a clear boundary: one value, one file and two normal runs. Its next question can be equally specific—such as how to preserve two requests without silently replacing the first.