AP Computer Science Principles · Unit 1 · 10-13% of the exam · about 70 minutes
Unit 1: Creative Development
By the end: Explain how people build programs together, describe a program by its purpose, inputs and outputs, follow the iterative and incremental development process, and find, name and fix syntax, logic, run-time and overflow errors with well-chosen tests.

- 1.1 Collaboration · 6 min
Why the best programs have more than one author
- A computing innovation has a program as an essential part. It can be physical, nonphysical software, or a nonphysical concept.
- Collaboration that includes diverse perspectives helps avoid bias: people with different experiences notice different problems.
- Teams produce innovations that reflect the diversity of their talents. Users are part of the collaboration too.
- 1.1 Collaboration in practice · 6 min
How good teams actually work
- Collaboration skills: communication, consensus building, conflict resolution, negotiation.
- Pair programming: a driver types and a navigator reviews and plans, swapping roles often.
- Online tools let programmers share work and give feedback from anywhere.
- 1.2 Program function and purpose · 7 min
Why it exists, and what it does
- Purpose: the problem the program solves, or the interest it pursues, for people.
- Function: what it does when it runs. Inputs, processing, outputs. Its behavior is usually described from the user's side.
- A program is a collection of statements that performs a task. A code segment is part of a program.
- 1.2 Inputs, outputs and events · 7 min
What goes in, what comes out, and what sets it off
- Input: data sent to a program. Tactile, audio, visual or text, from a user or another program.
- Output: data sent from a program to a device. Usually based on input or prior state.
- An event is an action (click, key press, program start, timer) that supplies input and triggers code.
- 1.3 Program design and development · 7 min
A loop, not a straight line
- Phases: investigating and reflecting, designing, prototyping, testing. Testing and reflection can send you back to any phase.
- Iterative: refine and revise based on feedback, testing or reflection, often revisiting earlier phases.
- Incremental: break the problem into pieces, and make each piece work before adding it to the whole.
- 1.3 Investigating and designing · 7 min
Find out what people need, then plan it
- 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.
- 1.3 Documentation and acknowledgment · 6 min
Notes for people, and credit where it's due
- Documentation describes what code does and how it was developed. Comments are documentation inside the code.
- Comments are for people. They do not affect how the program runs.
- Document throughout development. Some environments don't support comments, so use other documentation.
- 1.4 Identifying and correcting errors · 8 min
Four kinds of error, and how to tell them apart
- Syntax error: the language's rules are broken; the program won't run.
- Logic error: it runs and finishes but behaves incorrectly or unexpectedly.
- Run-time error: it fails during execution, such as dividing by zero or an index outside the list.
- 1.4 Testing with defined inputs · 8 min
Choosing tests that actually find bugs
- Testing uses defined inputs with expected outcomes. Compare expected and actual, then revise.
- Choose inputs that show every expected outcome, plus values at and just beyond the minimum and maximum.
- Test at each cutoff (just below, at, just above) and with unusual inputs like an empty list or zero.
- 1.4 Finding and fixing errors · 8 min
Tracing, extra output, and other bug-hunting tools
- Ways to find and fix errors: test cases, hand tracing, visualizations, debuggers, extra output statements.
- A trace table has one column per variable and one row per step. Fill it in exactly; never guess.
- Fixing one bug can reveal another. Retest after every fix, including unusual inputs.
- Unit 1 wrap-up · 6 min
Put it together