Important Note: College Board organizes AP Computer Science Principles by Big Ideas and Topics, not by one fixed unit order for all schools. In many classrooms, Unit 1 is taught as Big Idea 1: Creative Development.
What This Unit Is About
This unit teaches that computer science is more than just writing code. Students learn how to collaborate, define the purpose and function of programs, follow a design and development process, and identify and fix errors.
AP Computer Science Principles is an introductory course, and no previous coding experience is required.
1.1 Collaboration
Main Idea
Collaboration improves computing innovations. When people with different ideas, skills, and experiences work together, they often create stronger and more useful programs.
What Is a Computing Innovation?
A computing innovation is something that uses computing as an important part of how it works. It may be:
- A physical product, such as a self-driving car
- A software product, such as photo-editing software
- A computing concept, such as online shopping or e-commerce
Why Collaboration Matters
- Team members bring different strengths and perspectives
- Diverse viewpoints can help reduce bias
- User feedback helps developers improve a program
- Communication helps teams create better solutions
Example
A team creating a school app may include one student who designs the screens, one who writes the code, one who tests the program, and several users who provide feedback.
1.2 Program Function and Purpose
Main Idea
Every program should have a clear purpose and a specific function. Students should be able to explain what the program does and how it works.
Key Vocabulary
- Program: A collection of statements that performs a task when run by a computer
- Code Segment: A portion of a program
- Purpose: The overall goal of the program
- Function: What the program actually does
Inputs, Outputs, and Events
Programs take in input and produce output.
- Input: Data sent to a program, such as mouse clicks, typed text, or sound
- Output: Information produced by the program, such as text, images, or scores
- Event: An action that triggers code to run, such as clicking a button
Student-Friendly Summary
A good program should answer these questions:
- What is the program supposed to do?
- What input does it need?
- What output does it create?
- How does the user interact with it?
Example
A quiz app might have the following:
- Purpose: Help students review for a test
- Input: Button clicks and typed answers
- Output: Scores, messages, and the next question
1.3 Program Design and Development
Main Idea
Programs are developed through an iterative process. Developers create, test, revise, and improve programs over time.
Common Steps in Development
- Investigate and reflect on the problem
- Design a solution
- Create a prototype
- Test the program
- Revise and improve the program
Iterative and Incremental Development
- Iterative Development: Repeating steps and improving the program over time
- Incremental Development: Building a program one small part at a time
Designing for Users
Good design begins by understanding the users and the problem. Developers may use:
- Surveys
- Interviews
- User testing
- Direct observations
Developers should also think about:
- Requirements: What the program must do
- Constraints: Limits such as time, tools, or resources
Documentation
Documentation is written information that explains how a program works or how it was developed. Comments are one form of documentation.
- Documentation helps people understand code
- Documentation helps teams maintain programs
- Comments do not change how the program runs
Acknowledging Code From Others
If a programmer uses code from another source, that source should be acknowledged. This includes code from teammates or outside resources.
Student-Friendly Summary
Strong programs are usually not built in one try. Developers research, plan, build, test, revise, and document their work.
1.4 Identifying and Correcting Errors
Main Idea
Debugging is an important part of programming. Students must be able to identify and correct errors in algorithms and programs.
Types of Errors
- Logic Error: The program runs, but gives the wrong result
- Syntax Error: The code breaks the rules of the programming language
- Run-Time Error: The error happens while the program is running
- Overflow Error: The program tries to use a number outside the allowed range
Debugging Strategies
- Use test cases
- Trace the program by hand
- Use visualizations
- Use debugging tools
- Add extra output statements to track values
Examples
- If a score is always wrong, that may be a logic error.
- If the code will not run because a parenthesis is missing, that may be a syntax error.
- If the program crashes while running, that may be a run-time error.
Big Ideas to Remember
- Collaboration improves computing innovations.
- Programs should have a clear purpose and function.
- Programs use inputs, outputs, and events.
- Program development is iterative and incremental.
- Documentation helps explain and maintain code.
- Debugging is essential in programming.
Quick Review Sheet
- Computing Innovation: A product or concept that uses computing
- Program: Code that performs a task
- Input: Data sent to a program
- Output: Information produced by a program
- Event: An action that triggers code
- Iterative Development: Improving a program through repeated revision
- Incremental Development: Building a solution piece by piece
- Documentation: Written explanation of code or program behavior
- Logic Error: Runs, but gives the wrong result
- Syntax Error: Breaks language rules
- Run-Time Error: Happens while the program is running
Teacher Note
These notes are designed to match the common AP CSP interpretation of Unit 1 = Big Idea 1: Creative Development and are written in a student-friendly classroom format.