Plan the house before you build it
Nobody builds a house by laying bricks and hoping. They draw plans first.
Software needs plans too. You draw the screens. You plan the steps. You plan the data.
Today you also meet a new helper: an AI tool that can write code. It is fast. But you must check every line.
Key words
| Word | What it means | Example |
|---|---|---|
| Interface | The part of the software that a user sees and touches. | screens and buttons |
| Wireframe | A simple drawing of a screen, with no colour or pictures. | boxes for the logo and the menu |
| Algorithm | A list of steps that solves a problem. | how to work out the order total |
| Flowchart | A picture of steps joined by arrows. | start, add up the food, show the bill |
| Function | A named block of code that does one job. | delivery_fee |
| Licence | Permission, with rules, to use something that somebody else made. | free to copy, but you must say who made it |
| Data requirement | What facts the software must store, and what kind each one is. | name: text; price: a number |
| Generative AI | A tool that makes new text or code from a request you type. | a chat tool that writes a function |
| Prompt | The request you type to a generative AI. | Write a function for a delivery fee. |
| Review | Read and check somebody else's work, or a tool's work. | check the code against the list of requirements |
| Requirement | Something the software must do or be. | Delivery is free over 20 pounds. |
The cells students fill in are left blank in this preview.
Quick check: design words
Have a go
Quick check: design words
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Three things to design
| Design | What you make | Pizza app example |
|---|---|---|
| Interface | Wireframes of each screen | The order screen: pizza list, size buttons, total, Pay button |
| Algorithms | Flowcharts or step lists | Steps to add up the basket and the delivery fee |
| Data | A table of the facts to store | Customer name, phone number, pizza, size, price |
The cells students fill in are left blank in this preview.
Data requirements for an order
| Field | Kind of data | Rule |
|---|---|---|
| customer_name | Text | Cannot be empty |
| phone | Text | Text, because we never add phone numbers |
| quantity | Whole number | 1 to 10 |
| price | Number with decimals | Never below 0 |
| paid | True or False | False until payment works |
The cells students fill in are left blank in this preview.
Using AI to write code
A generative AI can write a section of code in seconds. You type a prompt. It gives code back.
The code looks neat and correct. But it can be wrong. It does not know your requirements unless you tell it. It is your job to check the code you use.
Run the AI code: it looks fine
def delivery_fee(food_total):
if food_total > 20:
return 0
return 3
print(delivery_fee(10))
print(delivery_fee(30))
print(delivery_fee(20))
# Requirement: free delivery at 20 or more.
# Look at the last line of output. Is it right?