Program Design and Development
How programs get built: development processes, finding out what users need, writing a specification and a design, documenting code, and giving credit for code from others.
1Development processes
A development process is the way a person or team gets from an idea to a working program. It can be ordered and intentional, following a plan step by step, or exploratory, trying things out to see what works. There are many development processes, but most use these phases:
| Phase | What happens |
|---|---|
| Investigating and reflecting | Find out what users need and what limits the program has; look back at what worked. |
| Designing | Plan how the program will meet its specification: layouts, parts, and how to test it. |
| Prototyping | Build a rough working version to try ideas out. |
| Testing | Run the program on chosen inputs and check the results against what was expected. |
2Iterative and incremental
An iterative process keeps refining and revising the program based on feedback, testing, or reflection all the way through. That may mean going back to an earlier phase: a test that confuses users can send the team back to designing.
An incremental process breaks the problem into smaller pieces and makes sure each piece works before adding it to the whole.
Real projects are usually both. Here is a quiz app over four weeks:
| Week | What the team did | Which idea |
|---|---|---|
| 1 | Build only the screen that shows one question and checks the answer; test it until it works. | incremental |
| 2 | Add the score counter, test it on its own, then connect it to the question screen. | incremental |
| 3 | Classmates find the font too small to read on phones; go back to the design phase and change the layout. | iterative |
| 4 | Add a timer and test it before adding it to the whole; testing shows the score resets wrongly, so revise the score code. | both |
The test for iterative: is the team revising based on feedback, testing, or reflection, possibly by going back to an earlier phase? The test for incremental: is the team building and checking one smaller piece before adding it to the whole?
3Investigation and requirements
The design of a program starts with investigation to find out what it must do. Investigation identifies the program’s constraints (limits such as time, budget, or the devices it must run on) and the concerns and interests of the people who will use it. Ways to investigate:
| Method | Example for a school club sign-up app |
|---|---|
| Surveys (collecting data) | Ask every student which clubs interest them and what device they use. |
| User testing | Watch five students try an early version and note where they get stuck. |
| Interviews | Talk with the club advisers about what information they need. |
| Direct observation | Watch how students sign up on paper at the activities fair. |
Program requirements describe how a program should work, and may include the user interactions it must provide, such as “a student can sign up for at most three clubs” or “the adviser sees a list of members.” A program’s specification is the document that defines its requirements.
4The design phase
The design phase outlines how to meet the specification. It may include:
- brainstorming ideas;
- planning and storyboarding, sketching each screen in the order a user sees it;
- organizing the program into modules and functional parts, such as a sign-up part and a member-list part;
- diagrams of the user interface layout, showing where buttons and text go;
- a testing strategy, deciding ahead of time how the program will be checked.
Investigate (surveys, user testing, interviews, observation) to learn users’ needs and the constraints; write requirements into a specification; design how to meet it. Iterative means revising from feedback, testing, or reflection, sometimes going back a phase; incremental means building and checking small pieces one at a time.
5Documentation and comments
Program documentation is a written description of what a code segment, event, procedure, or program does and how it was developed. Comments are documentation written inside the program for people to read; they do not affect how the program runs. In many text languages a comment starts with //. These two versions produce the same output, 84:
PROCEDURE average(nums)
{
total ← 0
FOR EACH n IN nums
{
total ← total + n
}
RETURN(total / LENGTH(nums))
}
DISPLAY(average([84, 91, 77]))
// average(nums): returns the mean of a nonempty list of numbers. // Adapted from the class example by Ms. Ruiz, Sept. 2026. PROCEDURE average(nums) { total ← 0 FOR EACH n IN nums // add up every score { total ← total + n } RETURN(total / LENGTH(nums)) } DISPLAY(average([84, 91, 77]))
Document throughout development, not at the end. Documentation helps you and your teammates build correct programs and keep them correct later, when someone has to fix or change code they did not write or no longer remember. Not every programming environment supports comments (some block-based tools have none), so other documentation, such as a separate written description, may be needed.
6Giving credit
Acknowledge any code that was developed collaboratively or by another source. The acknowledgment can go in the program documentation and should include the origin or the original author’s name, like line 2 of the commented version above. Using someone else’s code without credit presents their work as yours.
7Worked examples
The recipe app
Label each as iterative, incremental, or both. (a) A team builds the search feature, tests it alone, then adds it to the app. (b) After user testing shows people can’t find the save button, the team returns to the design phase and moves it. (c) The team adds a shopping list feature after checking it on its own, and testing it reveals that the search feature needs a change, which they make.
- 1(a) one smaller piece checked before joining the whole: incremental.
- 2(b) revision based on feedback, going back to an earlier phase: iterative.
- 3(c) a new piece checked before joining (incremental) and a revision driven by testing (iterative).
The bus-stop app
A team wants to know why riders miss buses at a busy stop. Which investigation method fits each question? (a) How many riders own a smartphone? (b) What do riders do in the minute before the bus arrives? (c) What does the transit planner need from the app?
- 1(a) a count across many people: a survey.
- 2(b) behavior people might not describe accurately: direct observation.
- 3(c) one expert’s detailed needs: an interview.
The club sign-up app
Interviews show that advisers need to know who joined, clubs have size limits, and students sign up on phones. Write three requirements.
- 1From the advisers: the app shows each adviser a list of the students in their club.
- 2From the size limits: the app does not accept a sign-up once a club is full, and tells the student so.
- 3From the phones: every screen works on a phone-sized display.
Borrowed code
Dev adapts a sorting procedure written by a classmate, Hannah Lee, for his project. What should his documentation include, and will adding comments change what the program does?
- 1A description of what the procedure does, its inputs, and what it returns.
- 2An acknowledgment naming the origin: written by Hannah Lee, adapted by Dev.
- 3Comments are read by people, not run by the computer, so the program behaves the same.
8Common mistakes
Testing and feedback often send a team back to designing or investigating. That is how an iterative process is supposed to work.
Incremental: small pieces, each working before it joins the whole. Iterative: refining and revising from feedback, testing, or reflection.
Document as you go. By the end, you have forgotten why you made choices, and teammates needed the notes earlier.
Comments are for people. The computer ignores them, so they never change output.
“Found online” is not enough. Give the origin or the original author’s name.
“We built the app incrementally: the question screen first, tested on its own, then the score counter. The process was also iterative: when classmates said the text was too small on phones, we went back to the design phase and changed the layout.”
Name the process idea and point to the specific step that shows it.