Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

OS 8.1 (1 of 2): Maintenance: prevent and correct

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

40 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

Software is never finished

A shop launches an app. It works well. Everyone is happy.

Six months later, a new law says every food product must show its allergy information. The app must change.

A month after that, a bad file damages part of the customer list. The app must be repaired.

Software needs work after its release. That work is maintenance.

Key words

WordWhat it meansExample
MaintenanceWork that keeps released software working and useful.A fix, an update
Preventive maintenanceA change made early, to stop a problem you can see coming.Update for a new law
Corrective maintenanceA change that repairs an error nobody expected.Repair damaged data
RegulationA rule from the government or an official body.A law on allergy labels
Business processThe steps a company follows to do its work.How an order is checked and sent
Zero-dayA weak place that attackers find before the maker knows about it.A new fault in a popular tool
Targeted attackAn attack on one person or one company.A thief attacks one bank only
Data corruptionData that is damaged or wrong.An age of -5

The cells students fill in are left blank in this preview.

Four reasons to prevent, four to correct

GroupReason to changeExample
Prevent: you can see it comingA change to a regulationA new law about data or labels. The software must follow it
PreventCompatibility with new products or technologyA new phone system arrives. The app must work on it
PreventA change in the business processThe company starts to send parcels from a second warehouse
PreventThe release of a new product or serviceThe shop adds a gift card. The software must handle it
Correct: nobody expected itA new weakness because another product changed (zero-day)A tool the app uses has a new fault that attackers use at once
CorrectA targeted attackA thief attacks one company and gets into its site
CorrectData corruptionA bad update turns some ages into words
CorrectA system failureThe server stops and orders are lost

The cells students fill in are left blank in this preview.

Match each story: prevent or correct?

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

A zero-day gives the maker no time

Important

The maker has had zero days to fix the weak place, because attackers know about it first. So these updates are urgent.

Try it: spot damaged data

Code: python
rows = [(1, 17), (2, "abc"), (3, -5), (4, 20)]

for row in rows:
    age = row[1]
    good = isinstance(age, int) and 0 <= age <= 120
    print(row[0], age, "good" if good else "DAMAGED")

# 0 <= age <= 120 means: age is from 0 to 120.
# Add (5, None) to the end of the rows list, then press Run.
# Read whether it is good or damaged.

Make a free account to save your work and track your progress.

Your turn: repair the data

A bad update damaged some rows in the customer list. Each row is a customer id and an age. A good age is a whole number from 0 to 120. Fill in two functions. find_corrupt gives the ids of the damaged rows. repair gives a new list without the damaged rows. Do not change the original list. Press Run Tests.

Code: python
# Each row is a pair: (customer id, age). In a row, row[0] is the id and row[1] is the age. A good age is a whole number from 0 to 120.
# Data corruption means some rows were damaged: for example the age is text, empty (None),
# negative, or far too big.

def find_corrupt(rows):
    # Give back a list of the customer ids whose age is damaged.
    return []


def repair(rows):
    # Give back a new list of the rows with the damaged rows left out.
    return rows

Make a free account to save your work, or press Start lab to work through the whole lesson.

Check: prevent or correct?

Have a go

Check: prevent or correct?

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Key words crossword

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Plan for some changes, be ready for others

Some changes can be planned, because the team sees them coming. Others cannot be planned, because they come as a surprise.

Good teams do both. They plan for the changes they can see. They keep time and people ready for the surprises.

Final check

Have a go

Final check

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.