The gym that texts the wrong people
A small gym has 8 names on its member list. The owner sends a text: "Half price this month."
Two people get it twice. One person left the gym two years ago and is angry. One number is wrong, so a stranger gets the text.
Nobody looked after the list. How much work would it take? Is it worth it?
Key words
| Word | What it means | Example |
|---|---|---|
| Maintain | To keep data correct, up to date and useful. | Fix a phone number. |
| Out of date | Data that was true once but is not true now. | A member who left |
| Duplicate | A second copy of the same record. | Sam Patel twice |
| Archive | To move old data to a safe place you rarely use. | Members from 2022 |
| Skills | What a person knows how to do. | Writing a short program to check the list |
| Record | One row of data about one thing. | Sam Patel and his phone number |
| Cost | The money something takes, including time and skills. | £20 an hour of staff time |
| Six Vs | Six V words that describe data: volume (how much), velocity (how fast), variety (how mixed), variability (how it changes), veracity (how true), value (how useful). | Velocity: new members every minute |
| Priority | What you do first because it matters most. | Fix wrong phone numbers first. |
The cells students fill in are left blank in this preview.
Data does not look after itself
People move. Phone numbers change. Members leave. A list that was right in January is wrong by June.
To maintain data means to keep it correct, up to date and useful. It is work that never ends.
Quick check: looking after data
Have a go
Quick check: looking after data
3 questionsThree things limit the work
Time: somebody must spend hours checking, fixing and deleting. Data comes in all the time, so the work comes all the time.
Skills: somebody must know how to do it. A person who cannot write a small program must find duplicates by hand.
Cost: time and skills cost money. Storage and tools cost money too.
Worked example: what does a check cost?
| Step | Working | Answer |
|---|---|---|
| Hours for one check | 3 hours | 3 hours |
| Checks in a year | 1 every month | 12 checks |
| Hours in a year | 3 x 12 (3 times 12) | 36 hours |
| Cost of one hour | The pay for a worker | £20 |
| Cost in a year | 36 x £20 (36 times 20) | £720 |
The cells students fill in are left blank in this preview.
Try it: find out of date records
members = [
["Sam Patel", "2026-09-28"],
["Aisha Khan", "2026-10-02"],
["Leo Brown", "2024-11-14"],
["Mia Evans", "2026-09-30"],
["Tom Hughes", "2023-06-19"],
]
# Members whose last visit was before the start of 2025.
# A date written year-month-day can be compared as text.
for member in members:
if member[1] < "2025-01-01":
print(member[0], member[1])
# Change the date to "2026-01-01" and press Run again.
Make a free account to save your work and track your progress.
How it all fits together
You have met three groups of ideas.
The six Vs say what your data is like: big, fast, mixed, changing, true or useful. The quality checks are ways to test that data is good. They say what you can do about it. Time, skills and cost say what you can afford.
A good decision uses all three.
Three things, one decision
Match the problem to the limit
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Your turn: find the duplicates
The gym list has some members twice. Each member is a pair: the name and the phone number. Fill in two functions. The first counts the rows for one name. The second lists every name that is there more than once. Press Run Tests to check.
def count_rows(members, name):
# members is a list of pairs: [name, phone].
# Give back how many rows have this name.
return -1
def duplicates(members):
# Give back a list of the names that are on the list more than once.
# Each name appears once, in the order it first appears in members.
return None
Make a free account to save your work, or press Start lab to work through the whole lesson.
Extra: Try it: duplicates in SQL
-- A real gym keeps its list in a database and asks it in SQL.
-- Which emails are on the list more than once?
SELECT email, COUNT(*) AS times
FROM members
GROUP BY email
HAVING COUNT(*) > 1
ORDER BY email;
-- Change email to name in all three places and run it again.
Make a free account to save your work and track your progress.
What is worth doing?
You cannot do everything. Ask three questions.
- How bad is the problem? Wrong phone numbers lose members. A spelling mistake does not.
- How much work is the fix?
- Is there a cheap fix that stops it happening again?
Do the big problems with a small fix first.
Options for the gym
| Option | Time | Skills | Cost | Fixes |
|---|---|---|---|---|
| Remove duplicates with a small program | Low | Coding needed | Low | Double texts |
| Phone every member to check details | High | None | High | Wrong numbers |
| Ask members to check their details online | Medium | Web skills | Medium | Wrong numbers |
| Archive members who left | Low | Coding needed | Low | Texts to old members |
| Do nothing | None | None | None | Nothing |
The cells students fill in are left blank in this preview.
Quick check: judge it
Have a go
Quick check: judge it
4 questionsWrite your judgement
The gym owner has 4 hours a week to look after the list and no coding skills. Use the table of options. Do these steps.
- Choose two options.
- Say why you chose each one.
- Use the words time, skills and cost in your answer.
- Say which of the six Vs matters most here.
Write 4 to 6 short sentences.
A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.
Make a free account to save your work, or press Start lab to work through the whole lesson.
Key words crossword
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Watch: looking after the list
Press Play on the short film below. It follows the gym list, what keeping it in order costs, and how to choose what to do. Listen for the myth about doing everything.
Film: Maintaining data
Maintaining data: time, skills, cost
Every scene, as text
- The gym that texts the wrong people. "Half price this month." (sent to: 8 names on the list). Two people get it twice (duplicate: a second copy). One person left the gym two years ago (out of date: true once, not true now). One number is wrong, so a stranger gets the text.
- Data does not look after itself. People move. Phone numbers change. Members leave. Right in January, wrong by June. To maintain data: keep it correct, up to date and useful.
- Three things limit the work. Time (takes: hours of checking, fixing, deleting). Skills (needs: somebody who knows how). Cost (covers: time, skills, storage and tools).
- Worked example: what does a check cost? One check: 3 hours. 3 × 12 = 36 hours a year (checks in a year: 12, one a month). 36 × £20 = £720 a year (cost of one hour: £20).
- Three things, one decision. The six Vs: what is the data like? (velocity: one of the six, how fast). Quality checks: what can we do? Time, skills, cost: what can we afford? Each has an arrow into: What is worth doing? An arrow down to: A plan: do this first, leave that for later.
- Myth (false): you can do everything. That is not true: you cannot do everything. Do the big problems with a small fix first. Remove duplicates with a small program (fixes: double texts). Archive members who left (fixes: texts to old members; archive: a safe place you rarely use).
Final check
Have a go
Final check
5 questionsRemember
Important
Keeping data in good order takes time, skills and money. Look at the six Vs, pick the quality checks that matter, and do the big jobs with small cost first.