Year 9 · Summer 2

Raid: Capstone · Lesson 1 of 5

Brief and planning: user needs, success criteria, task split

TheoryTopic 14 Programming furtherTopic 11 Algorithms

Year 9 · Raid: Capstone · Lesson 1 of 5

You will learn to

  • Identify the user and their needs from the brief the guild chose.
  • Write success criteria that a test can answer with a clear yes or no.
  • Use decomposition to split the project into parts, and give each part an owner.
  • Plan which parts are built in sprint 1 and which in sprint 2.

Year 9 · Raid: Capstone · Lesson 1 of 5

Success criteria

You have got it when you can say:

  • I can turn a vague goal, like 'easy to use', into a criterion I can test.
  • I can show our list of parts, with a name next to each one.
  • I can explain our plan to the teacher and get it signed off.

Year 9 · Raid: Capstone · Lesson 1 of 5

Retrieval starter

Questions from before. Write your answers, then show them.

  1. Last unit

    What does print("3" + "4") show?

    A An errorB 34C 7

    B. 34

  2. Last unit

    The Tube map leaves out real distances. That's…

    A DecompositionB Pattern recognitionC Abstraction

    C. Abstraction

  3. Earlier this year

    Caesar shift 1: 'CAT' becomes…

    A CAT1B BZSC DBU

    C. DBU

Year 9 · Raid: Capstone · Lesson 1 of 5

Key words (1 of 4)

List
One name holding many values in order. Also called an array.
Index
An item's position in a list, counting from 0.
Subroutine
A named block of code you can call when needed.
Function
A subroutine that returns a value.

Year 9 · Raid: Capstone · Lesson 1 of 5

Key words (2 of 4)

Parameter
A placeholder in a subroutine for a value passed in.
Validation
Checking input is reasonable before using it.
Boundary data
Test data at the very edge of what's allowed.
Algorithm
Precise, ordered, finite steps to solve a problem.

Year 9 · Raid: Capstone · Lesson 1 of 5

Key words (3 of 4)

Decomposition
Breaking a problem into smaller ones.
Abstraction
Ignoring detail that doesn't matter for the problem.
Sequence · selection · iteration
Steps one after another. First this, then this.
Pseudocode
Code-like writing for algorithms, without strict rules.

Year 9 · Raid: Capstone · Lesson 1 of 5

Key words (4 of 4)

Trace table
Records variable values step by step to check logic.
Variable
A named place in memory that holds a value.

The explanation · step 1 of 3 · part 1 of 2

The development cycle

Real software teams work in a cycle of five stages. This Raid follows the same cycle.

StageThe questionIn this Raid
AnalysisWhat is the problem, and who has it?Lesson 1
DesignHow will we solve it? Who does what?Lesson 1
BuildMake it, in small stepsLessons 2 and 3
TestDoes it meet every success criterion?Lesson 4
EvaluateWhat works, what does not, and what next?Lesson 5

The explanation · step 1 of 3 · part 2 of 2

The development cycle (continued)

★Remember

Success criteria are written now, before anyone builds. In lesson 4 you test against them.

The explanation · step 2 of 3 · part 1 of 2

User needs and success criteria

Choose one brief: a quiz app, a sensor device, a data story or a website.

Name the user. List what they need. A success criterion is one need, written so a test can answer yes or no.

e.g.Example

Guild brief: a binary quiz app to help Year 7 pupils revise. Users: Year 7 pupils who are new to binary.

The explanation · step 2 of 3 · part 2 of 2

User needs and success criteria (continued)

Vague: you cannot test itTestable: yes or no
It is easy to useIt explains the rules in one short message at the start
It has lots of questionsIt asks 10 questions, one at a time
It checks the answersIt accepts only whole numbers from 0 to 255, and asks again if not
It keeps scoresIt saves the player's name and score to a file

The explanation · step 3 of 3 · part 1 of 2

Split the work

Use decomposition: break the project into parts. Give each part one owner.

PartOwnerSprint
Ask one question and check the answerAna1
Reject bad input and ask againLeo1
Choose 10 questions and keep the scoreSara1
Save the name and score to a fileOmar2
Join the parts and test them togetherEveryone2

The explanation · step 3 of 3 · part 2 of 2

Split the work (continued)

Each part should work on its own. Then it can be tested on its own.

!Watch out

Show the criteria and the split to the teacher. Do not start building until the teacher signs them off.

Year 9 · Raid: Capstone · Lesson 1 of 5

Worked example

Turn the vague criterion 'The quiz is fair' into criteria you can test.

  1. Ask: what would 'fair' look like? You must be able to see it in a test.
  2. Every question has exactly one right answer. Test: check each answer by hand.
  3. An answer typed with spaces, like ' 5 ', still counts as 5. Test: type it and check it is marked right.
  4. The final score matches the number of right answers. Test: get 7 right on purpose. The quiz must say 7 out of 10.

Year 9 · Raid: Capstone · Lesson 1 of 5

Quick quiz · 1 of 3

In ["a", "b", "c"], the index of "c" is…

  1. A 2
  2. B 3
  3. C c

A. 2

Counting starts at 0: a = 0, b = 1, c = 2.

Year 9 · Raid: Capstone · Lesson 1 of 5

Quick quiz · 2 of 3

word = "Python". What is word[1:4]?

  1. A "Pyth"
  2. B "ytho"
  3. C "yth"

C. "yth"

Start at index 1 (y), stop before index 4 (o): y, t, h. That's 4 − 1 = 3 characters.

Year 9 · Raid: Capstone · Lesson 1 of 5

Quick quiz · 3 of 3

In def area(w, h): … and a = area(4, 3), which are the arguments?

  1. A area and a
  2. B w and h
  3. C 4 and 3

C. 4 and 3

Arguments are the actual values passed in the call. w and h are parameters.

Year 9 · Raid: Capstone · Lesson 1 of 5

Exit ticket

Answer on paper before you go. Then check.

  1. A variable made inside a function is…

    A Saved to a fileB Global: usable anywhereC Local: only exists inside it while it runs

    C. Local: only exists inside it while it runs Local variables are wiped when the function returns.

  2. Testing a 0–50 range with 50 is…

    A Erroneous dataB Boundary dataC Normal data

    B. Boundary data It's right at the edge of what's allowed.