The Stacks
BIG IDEA 1: CREATIVE DEVELOPMENT · TOPIC 1.3

1.3 Program Design and Development

The CED describes a specific development process: investigate, design, prototype, test, repeat. Knowing the vocabulary for each piece — and what documentation is for — is worth several exam questions.

What you need to know

  • A development process can be ordered and structured or exploratory, but good ones share phases: investigating and reflecting, designing, prototyping, and testing.
  • Iterative development means going through those phases repeatedly, improving with each cycle. Incremental development means building and testing one small piece at a time and adding to what already works.
  • The investigating phase includes understanding the users: surveys, interviews, observation, and gathering requirements about what the program needs to do and for whom.
  • The designing phase includes brainstorming, planning the user interface, and using tools such as flowcharts or pseudocode to lay out an algorithm before writing real code.
  • Program documentation — comments inside the code plus external descriptions — explains what a program does and how, so it can be understood, maintained, and reused later by the author or others. Documentation should be written during development, not only at the end.
  • Comments are the in-code form of documentation; the computer ignores them. Good comments explain why and what, not just restate the line.
  • Abstraction underpins good design: managing complexity by focusing on what something does rather than how. Using a procedure or a list is a form of abstraction.
  • Requirements can change during development — that's normal, and iteration is how developers accommodate it.

Worked example

Building a grade-calculator: (1) Investigate — ask three classmates what they want; they all want weighted categories. (2) Design — sketch the screen and write pseudocode for the weighted average. (3) Prototype — code just the average for one category and confirm it's right. (4) Test — try zero grades, a 100, a missing category. Then loop back: add the second category, test again. Each loop is an iteration; adding one category at a time is incremental. The comments you write during step 3 are documentation.

Exam tip: If a question describes a team that repeatedly revisits earlier phases after testing, the answer is iterative. If it describes adding features one working piece at a time, the answer is incremental. They often happen together, but the exam tests them as separate terms.

Going deeper

The nuance, edge cases, and connections that turn a 3 into a 5.

  • The CED describes two development processes: iterative and incremental, and also notes that some processes are unstructured or exploratory — you try things and see what works. Exploratory development is legitimate, especially early; the exam won't call it wrong.
  • The four phases — investigating and reflecting, designing, prototyping, testing — aren't strictly linear. Testing reveals design flaws, which sends you back to designing. That loop is what "iterative" means.
  • Investigating includes understanding the users, not just the problem: who are they, what do they need, what constraints do they have? A program designed without investigating users tends to serve the developer's assumptions instead. This links to 5.3 (bias).
  • Program specifications — a description of what the program must do — come out of the investigating phase. The exam may call them requirements. They can change during development, and accommodating change is part of the process, not a failure.
  • Documentation serves future developers, collaborators, users, and your future self. The CED's specific claim: documentation is useful "during development" as well as after, because it helps you keep track of what you've done and why.
  • Two kinds of abstraction appear in design: procedural (a named procedure stands in for its steps) and data (a list stands in for many values). Good design uses both to keep the program understandable.

Mistakes that cost points

  • Treating iterative and incremental as synonyms. The exam tests them separately. Iterative = repeating the phases to refine. Incremental = building in small working pieces. A team that builds a rough full version, tests, and refines it is iterating. A team that builds feature 1, tests, then feature 2 is being incremental.
  • Thinking documentation is written only at the end. Options saying "documentation is completed after the program is finished" are wrong per the CED. It's throughout.
  • Believing comments affect the program. Comments are ignored by the computer. Any option claiming comments make code faster, slower, or fix errors is a distractor.
  • Skipping investigation on the Create Task. Students jump to coding, then can't answer the written response about their program's purpose for a specific user. Decide who it's for first.

Practice questions

Written in the style of the real exam. Try each one before revealing the answer.

Q1 A programmer builds a small working version of a game with one level, tests it, then adds a second level and tests again, continuing until all levels are done. Which development approach does this best illustrate?
  1. A Incremental development
  2. B Sequential execution
  3. C Data abstraction
  4. D Fault-tolerant design
Show answer

Answer: A. Building and testing one piece at a time on top of working code is incremental development.

Q2 Which of the following is the primary reason to include comments in program code?
  1. A Comments make the program execute faster.
  2. B Comments are required for the program to compile.
  3. C Comments help programmers understand the purpose and behavior of code when they return to it later.
  4. D Comments prevent runtime errors.
Show answer

Answer: C. Comments are documentation for humans. They have no effect on execution or errors.

Key vocabulary

Iterative development
repeatedly cycling through design, build, and test phases to refine a program
Incremental development
building a program in small pieces, testing each before adding the next
Prototype
an early, partial version of a program used to test ideas
Documentation
written descriptions and comments that explain what a program does and how it works
Comment
a note inside code intended for humans and ignored by the computer
Requirements
a description of what a program must do, often gathered from users