AP® Computer Science A · Unit 3 · Topic 3.2
How Program Design Choices Affect People
A program can run with zero bugs and still harm people, because every design choice — field limits, defaults, assumptions about data — decides who the program was built for and who it leaves out.
Code doesn't have opinions the way people do, but it does have assumptions baked in by whoever wrote it. Every field you declare, every limit you set, every default value you pick is a decision about what the 'normal' user looks like. A single line inside one method — a String capped at some length, a boolean defaulted to false, a numeric field that can't go negative — doesn't stay contained. It runs the same way for every single person who touches that program, so whatever assumption is baked into that line gets applied to all of them, whether or not it fits.
Take a signup form with a name field declared as a String with a 20-character limit. Most names fit fine, so the programmer who tested it with their own name saw no problem. But plenty of real legal names — names with multiple parts, names from naming traditions the programmer never considered — run longer than 20 characters. Those users get truncated or rejected, not because anyone decided to exclude them, but because nobody decided to include them either. The absence of a decision is still a decision once the code runs.
This connects directly to why classes bundle fields as private and expose only controlled access through methods: encapsulation controls who can change what, but it says nothing about whether the limits and defaults you chose are the right ones. A class with airtight encapsulation can still be badly designed for its users. That's why thinking about who will actually use a program — people the designer may never meet, with needs the designer never pictured — has to happen alongside the technical design, not after it.
Key terms
- Design assumption
- An unstated belief about users or data that gets built into a program's structure, such as how long a name can be.
- Default value
- The value a field or variable holds automatically when no other value is explicitly assigned.
- Edge case
- An input or situation far from the typical case a programmer imagined, often where flawed assumptions cause real harm.
- Encapsulation
- Keeping fields private and exposing controlled access through methods, which protects data integrity but not design fairness.
Watch it explained
- How it worksHow does one choice made inside a single method ripple out to every user of the program?
- Worked exampleTrace how a name field capped at 20 characters shuts real people out of a system.
- Common mistakeWhy isn't a program neutral just because the code contains no opinions?
- Going furtherWhat changes when a program is used by a group its designers never pictured?
Check yourself
End of topic.