# Private, Plain and Tested with Users

Class 24, Chapter 12: Build Your Own Performance App. 25 slides, about 31.5 minutes.

## 1. Title

Slide up while people sit down. Your app works on your laptop. Today it has to work for someone else: a coach who did not build it, a runner who will not read the code, and a file that must never leave the phone. By the end of class you will know how to test that with five people.

## 2. The simplest privacy: never hold the data  (2 min)

Heart data is health data. In European law it is a special category, processed only under strict conditions, and anyone who processes personal data must build protection into the design and make it the default. The idea is older than the law: privacy by design. For a student app the simplest way to honor it is to never hold the data at all. Process on the device. No accounts. No upload, and you can prove it in the Network panel. And say so on the page, in the first line under the title. Three small choices too: no file name in the summary, because files are often named after people; settings on the device; results, not raw data, in the export.

## 3. The whole worker, and how to prove it  (2 min)

This is the whole worker of the student app. It receives the file's text, checks the input, analyzes, and posts back either the numbers and the summary, or a message saying what was wrong. That is all it can do. There is no line here that could send the file anywhere. [Have everyone open the Heart app on a laptop now.] Open the developer tools, choose Network, and load a file. The only requests are for the app's own files. In the student app's browser check, the requests were the page, its script, its stylesheet, its worker and the example file, and nothing else. Do this check on your own app before the user test.

## 4. Which design best keeps a heart file private?  (2 min)

[Thirty seconds, then hands.] The answer is D. Privacy by design prefers not holding the data at all. If the file is read and analyzed on the device and never sent, there is nothing on a server to protect, breach or delete. A sounds responsible, and encryption does protect the file on the way, but for a day a copy sits on someone's server. B adds a database of people and passwords, and a breach you would have to report. C is the subtle one: sending a copy to the coach automatically takes the choice away from the athlete. The athlete decides who sees their data.

## 5. Check what you invite people to paste into an AI  (2 min)

A text export is made to be pasted, often into an AI assistant. So read what it contains. An earlier version of the Heart app's export repeated the name and age from its form. Fine if you keep it; a leak if you paste it into an outside service. The export now carries no name, gives age only as a ten-year band, and avoids two hundred twenty minus the exact age, which would give the age right back. One field still needs your eye: notes are copied in as typed. That is the Chapter 4 rule built into the tool. And the built-in example file must be synthetic, never a teammate's real recording.

## 6. Basic first: one clear result in the first minute  (2 min)

A new user should see one clear result in the first minute; detail can wait until they ask. The movement apps call this Basic and Advanced, and the student app copies the pattern in fourteen lines. Basic is the default. Advanced is one tick away and remembered on that device, and a coach's link can set it for a visit. The report always includes the Advanced part, because whoever reads it later cannot click. How do you decide what goes in Basic? Go back to the spec. The question was whether the file is good enough and what the number is. So: the number, the heart rate as a sanity check, and one quality line. On the left is exactly that.

## 7. Reports people read, and agents can parse  (2 min)

The screen disappears when the page closes; a report is what the athlete keeps. Make two kinds. A PDF for people: the student app uses a print stylesheet and the browser's print dialog, one line of script and no library. And plain text, for people and for AI assistants. Read the seven lines. What was measured. How clean it was. The two numbers with units. How to use them: only against your own recordings made the same way. What they are not. Where they were computed. Because the layout is fixed, an agent reading a folder of results knows where everything is. The movement apps do the same in Markdown.

## 8. Choose rating words with care  (1.5 min)

One warning before we leave reports. If your app rates a number, the words carry more weight than the number. The movement apps rate each metric Elite, Pro or Good, with three, two and one stars. Good is the lowest of the three. An athlete who reads Good, one of three, may well hear praise. Chapter 13 takes this up properly, next week. The student app avoids the problem by giving no rating at all, because nothing in its spec asks for a judgment. Ask of your own app: does the spec ask for a rating? If not, leave it out.

## 9. How many users do you need?  (2.5 min)

You know too much about your own app to test it. A usability test watches real people do real tasks while you keep quiet. How many? [Take guesses, then click.] If each user meets a problem with probability zero point three one, five users find about eighty-four percent. By hand: zero point six nine to the fifth is zero point one five six, one minus that. The curve flattens after five, so the advice is: test with five, fix, test five more. But read the limits. That is an average; some groups of five find far fewer. And a problem only one user in ten meets is found just forty-one percent of the time. If your users differ, coach and runner, test some of each.

## 10. Three tasks, and what to watch  (2 min)

A task is something a user really wants to do, given as a goal, not a list of clicks. The student app's three: look at the example, read your own number and whether the file is usable, and save a report and name the removed beats. The third needs Advanced on purpose: it tests whether people can find detail when they want it. Get consent first, and say you are testing the app, not them. Ask them to think aloud. Then watch and write, without helping: where they hesitate, every wrong tap, every misreading, like thirty-nine read as a score out of a hundred, and whether they finished and how long it took. Nobody helps. That is the hard part.

## 11. Check it by hand: one user's SUS score  (2 min)

After the three tasks, hand each user a short questionnaire, the System Usability Scale: ten statements answered from one to five. [Two minutes; everyone scores this user.] For odd items subtract one; for even items, which are worded negatively, subtract the answer from five. Add, and multiply by two and a half. [Click.] Seventeen plus sixteen, times two and a half: eighty-two point five. One warning: the result runs from zero to a hundred, but it is not a percentage. Published scores average about sixty-eight to seventy-one, so seventy is ordinary, not a pass mark.

## 12. A problem log, then change the app  (1.5 min)

After five sessions, make a problem log like this one. The rows are examples of the kind of entry, not results from a real test. For each problem: what you saw, how many users met it, and how bad it was. Did it stop the task, slow it, or only annoy? Fix the ones that stopped a task first. And do not dismiss a problem because only two of five met it. By the formula we just used, a problem two in five users meet is common in the population. Then write down what you changed and why, and test again with new people. You will run one more round in week thirteen, with the report itself.

## 13. Putting it online is copying a folder  (2 min)

Because the app is static files, putting it online is copying a folder. Build, test, and copy dist to any static host: a university web space, a course server, a free static-site service. The whole student app is five small files. Use an address with https; browsers allow some features, like Bluetooth for a live strap, only on secure pages. One setting saves an afternoon: hosts often serve you from a subfolder, and by default the links point to the root, so the page loads with no script and no visible error. Set base to dot slash. And plan for class: keep the last good build, put a version in the footer, keep the example file, and test on a phone.

## 14. Four questions for a responsible tool  (2.5 min)

A tool with your name on it carries your responsibility. Four questions. Is it a medical device? That depends on its intended purpose. Regulators treat low-risk general wellness tools differently, but only while the output is for wellness and does not prompt clinical action. The same app becomes something else when its words change, so keep the page's words on the training side, and when data suggests something medical, say see a clinician and nothing more. Who is accountable? You. Can everyone use it? Four accessibility rules cover a small app; note how close the contrast line is. Whose code is it? Read the license, keep the notice, and license your own.

## 15. A 90-second demonstration to a coach  (2 min)

This week's communication task is a ninety-second demonstration to a coach, about two hundred spoken words. The poor opening describes the code: Vite, worker, artifact filter, tachogram. A coach would have to look up every word. [Read the good version aloud, at speaking pace.] It starts from the coach's question. It shows the result before explaining anything. It says how to use the number and what it does not do. Privacy takes one sentence. It gives evidence that the app was tested. And it ends with one request. I shortened it slightly for the slide; the full version is in Section twelve point eleven. Rehearse yours and time it.

## 16. Build Lab B-12: consolidate into a working app  (2 min)

Build step twelve brings everything together. Your app from B-eleven takes the shape of this chapter's student app. Write the spec first, with its test and its will not do line. Keep the calculations in their own modules and call them from a worker. At least three known-answer tests: a hand calculation, a synthetic pattern, and a file checked by an independent program. Basic and Advanced. A summary and a report. The privacy and scope lines. Then build, put it on a host, open it on a phone and check the Network panel. And run the user test, and change at least one thing because of it.

## 17. Before Class 25  (1.5 min)

Project step twenty-five is due next class. Run a structured user test: tasks as goals, consent, notes without helping, and a problem log with the changes you will make, most severe first. Then check your app's privacy with the Network panel and write down what you saw. The exercises include B-twelve and the ninety-second demonstration; record yourself once and time it. Checkpoint four of the team project goes in with it. Read the first four sections of Chapter 13 before next class: what the audience needs, plain language, and how to say how sure you are.
