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.4 (2 of 2): Helping users: from ticket to fix

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.

45 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

Ticket 231

A teacher, Maya, sends a message to the helpdesk.

"I open the marks page for my new class. It shows an error. I have a lesson in ten minutes."

You are on the support team today. What do you do first? Do you guess? Do you change something and hope? A good team follows a process.

Key words

WordWhat it meansExample
TicketA numbered record of one user problem.Ticket 231
HelpdeskThe people who answer users' questions and problems.The support team
ReplicateMaking a problem happen again on purpose.Open a class with no marks
Root causeThe real reason for the problem.The code divides by zero. You cannot divide by 0
User errorA user action the system does not expect, often caused by unclear design.Typing a space in a number
System errorA fault in the machines or the way they connect, not in the code.The server ran out of memory
Application errorA bug in the software itself.A crash on an empty list
Security breachSomebody got in, or got data they must not have.Stolen passwords
StakeholderA person the product matters to or affects.The teacher who reported the problem
Lessons learnedA short note on what went wrong and how to prevent it.Test empty lists

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

Support finds the cause before fixing

flowchart TD
  ticket[A user reports a problem] --> replicate[Identify or replicate the problem]
  replicate --> cause{Find the cause}
  cause --> user[User error]
  cause --> system[System error]
  cause --> app[Application error]
  cause --> breach[Security breach]
  user --> fix[Help the user, or improve the design]
  system --> fix2[Fix the system]
  app --> fix3[Change the code and test it]
  breach --> stop[Contain it and report it at once]
  fix --> check[Check: fixed, will not return, nothing else broken]
  fix2 --> check
  fix3 --> check
  check --> tell[Tell the stakeholders]
  stop --> tell
  tell --> learn[Write the lessons learned]

Match each cause to its ticket

Have a go

Loading…

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

Step 1: replicate the problem yourself

First, make the problem happen again. This is replicating it.

Ask the user: What did you press? What did you expect? What happened? Then do the same yourself. If you can make it happen, you can fix it. If you cannot, ask for more detail.

Try it: replicate the problem

Code: python
def average_mark(marks):
    return sum(marks) / len(marks)

print(average_mark([50, 70]))   # a class with marks: works

# Now try a class with no marks. Remove the # on the next line, then press Run.
# print(average_mark([]))

# You can see the error. That is the problem in ticket 231.

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

A possible breach goes to security at once

Warning

If it might be a breach, stop. Tell the security lead at once. Do not delete anything. Logs (records of what happened) are evidence. Do not guess in public. Follow your company's plan.

Step 2: a test proves the fix

When the cause is a bug, follow four steps:

  1. Write a test that shows the error. It fails now.
  2. Change the code until the test passes. The error is gone.
  3. Keep the test. If the error comes back, the test fails and tells you.
  4. Run all the old tests. Nothing else may break.

Your turn: fix ticket 231

Ticket 231: the marks page shows an error for a class with no marks. You replicated it. Now fix it. average_mark gives 0 for an empty list. top_mark gives None for an empty list. Normal classes must still work. The hidden tests include the old cases, so a fix that breaks them fails. Press Run Tests.

Code: python
# Ticket 231: a teacher opens the marks page for a new class with no marks yet.
# The page shows an error. The bug is in these two functions. Fix them.
#   average_mark(marks): the average of the list. For an empty list give back 0.
#   top_mark(marks): the biggest mark. For an empty list give back None.
# Do not break the normal case.

def average_mark(marks):
    return sum(marks) / len(marks)


def top_mark(marks):
    return max(marks)

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

Check: what would you do?

Have a go

Check: what would you do?

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

Tell Maya, and write the lessons learned

Ticket 231 is fixed. Write two short notes. 1. A message to Maya, who is a teacher and not a developer. Say what happened, that it is fixed, and what she should do now. Use short sentences and no jargon. 2. A lessons learned note for the team, in three lines: what went wrong, why, and one thing to do so it does not happen again.

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.

Check: the support steps in order

Have a go

Check: the support steps in order

3 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.

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.