1.3 Investigating and designingFind out what people need, then plan it

The design phase starts with investigation: finding out what the program must do. The course names four ways to collect that information from users: surveys, interviews, direct observations, and user testing. Each tells you something different.
| Method | What you learn | Example |
|---|---|---|
| Survey | Answers from many people, quickly | 200 students rate how they study |
| Interview | Deep reasons from a few people | Talk 20 minutes with two coaches |
| Direct observation | What people really do | Watch shoppers use a self-checkout |
| User testing | Where a prototype confuses people | Five users try to add a task |
What you learn becomes the program requirements: descriptions of how the program functions, which may include descriptions of user interactions it must provide. A program's specification is the document that defines its requirements. Requirements are the contract. They tell the team what to build and, later, what to test.
| Requirement | Kind | How you would test it |
|---|---|---|
| R1. A user can add a task with a due date | What it must do | Add "Lab report, Friday"; it appears in the list |
| R2. A finished task can be checked off | User interaction | Tap the box; the task moves to Done |
| R3. The timer can be set from 5 to 60 minutes | Range of inputs | Try 4, 5, 60 and 61 |
| R4. The chart shows the last 7 days | Output | Enter 8 days of data; only 7 bars appear |
?Wait, what's a user interface?
Then comes the planning itself. Design can include brainstorming, planning and storyboarding (drawing each screen in order, like a comic strip of the app), organizing the program into modules and functional components, creating diagrams that show the layout of the user interface, and developing a testing strategy, meaning deciding how you will test each part before you build it.
Organizing into modules deserves a picture. Big programs are too complicated to think about all at once, so designers decompose them: break the program into a few large parts, then break each part into smaller jobs. Each small job is something one person can build and test on its own, which fits incremental development perfectly.
?Wait, what does "decompose" mean in computing?
I thought about it. Show me
- (a) Interviews with the coach, to learn exactly what "training too much" means to her (for example, more than 40 miles in a week). A survey of the runners, to learn how and when they would log runs (phone, right after practice).
Why?
Different methods for different questions: depth from the coach, breadth from the team. - (b) R1: A runner can log a run with a date and a distance in miles. R2: The coach sees a warning next to any runner whose total for the last 7 days is over 40 miles.
Why?
Each requirement says what the program must do in a way you could test. R2 even has a cutoff to test at 40 and 41. - (c) Modules: Run log (entering and saving runs) and Coach dashboard (weekly totals and warnings).
Why?
Each module can be built and tested on its own, then combined.
Answer: For example: interview the coach and survey the runners; R1 a runner can log date and miles, R2 the coach sees a warning above 40 miles in 7 days; modules for the run log and the coach dashboard.
Stuck? Get a hint
- Who has the information you need? The coach knows the rule; the runners know their habits.
- A testable requirement says exactly what happens, often with a number.
- Modules are the big parts: one for runners, one for the coach.
- Adebugging
- Bstoryboarding
- Cincremental testing
- Ddocumentation of a run-time error
Show the answer
B. Drawing the screens in sequence is storyboarding, one of the design activities the course lists. No code exists yet, so it can't be debugging or testing.
- AThe app should be good.
- BThe app uses blue buttons because the team likes blue.
- CA user can set a reminder for any time from 5 minutes to 24 hours in the future.
- DThe team will meet every Tuesday.
Show the answer
C. A requirement describes how the program must function, including user interactions, and it can be tested (try 4 minutes, 5 minutes, 24 hours). "Should be good" can't be tested, and the meeting schedule is about the team, not the program.
- Investigate with surveys, interviews, direct observation and user testing.
- Program requirements describe how the program functions, including user interactions. A specification defines them.
- Design activities: brainstorming, storyboarding, organizing into modules, UI layout diagrams, planning a testing strategy.
- Decompose a big program into modules and small jobs that can be built and tested one at a time.