Week 28 · Unit 12: Be a problem solver · 3 lessons
1
Try it before you build it
Computing 6: Unit 12, pp. 162–177
GoalExplain what a prototype is and how testing it with users leads to a better program.
New words
prototype · a model of a program that is tested before the final version is builtspecification · a list of what a program must do, including its inputs, outputs and interfaceuser · a person who uses a programfeedback · comments from users about what works well and what should change
Explanation
Before a programmer writes all the code, they often make a prototype. A prototype is a model of the program. Some parts of it may work and some may only be pictures. The prototype is tested with users, and the users give feedback. The programmer uses the feedback to make a better prototype, and this repeats until the users are happy. Each prototype is checked against the specification, which lists the inputs, outputs, stored data and user interface that the program needs. A prototype shows early whether something is missing or whether there is something that the users do not want. It is much cheaper to change a drawing than a finished program. A prototype can be a paper sketch, a set of linked pictures or a program that only partly works.
Worked examples
Part
What the till needs
inputs
the item chosen and how many
outputs
the total to pay
stored data
the total so far for each customer
user interface
large buttons with words, and a clear prompt
A school wants a till program for the bake sale. This is the specification for it. The prototype is checked against every row.
Prototype
What it shows
Good for
paper sketch of the screens
the layout
checking that all the parts are there
linked pictures on a tablet
how screens follow each other
checking the order of steps
a part-working Scratch program
how it behaves
checking that the calculations work
There are different kinds of prototype. A simple one can answer one question quickly, and a better one can show how the program behaves.
Version
Feedback from users
Change made
1
the buttons are too small
make the buttons bigger
2
I cannot see what I must pay
show the total in large letters
3
nothing tells me that I can start
add the words ‘Press a button to start’
Each round of testing gives feedback, and each version fixes the problems from the last one. This is why prototyping is repeated.
Class activity
Paper prototype (no computer): design the screen of a till for a bake sale on a sheet of paper. Draw buttons for two items, a place for the number and a place for the total. A friend is the user and points with a finger as if it were a mouse. You are the computer: when they press a button, you swap in the next paper screen. Write down three things that confuse the user. Make version 2 and test it with another person. Did the number of confusing things go down? If you have a computer or tablet, show the final paper design to an adult and talk about how you could build it.
Practice
1
Omar spent three weeks building a whole quiz program before he showed it to anyone. The users said they wanted pictures, not long questions in words. How could a prototype have helped Omar?
Week
What Omar did
1
wrote code
2
wrote more code
3
finished the program
4
showed users: ‘We wanted pictures!’
A quick paper or part-working prototype, tested in the first days, would have shown that the users wanted pictures. Omar could have changed the design early, before he had written lots of code.
2
Write a sensible input for the row that is missing in this specification.
Part
Requirement
inputs
?
outputs
the time left in big numbers
interface
one Start button
For example: the player presses the Start button, or types the number of seconds.
3
Why is it cheaper to find a problem in a prototype than in the finished program?
In a prototype only a small amount of work has been done, so changes are quick. In a finished program many parts depend on each other, and a change could take a lot of time.
4
Mia tests a paper prototype and her friend cannot find the button that ends the game. What should Mia do next?
She should write down the feedback, change the design, for example a bigger button with the word END, and then test the new version with the user again.