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
| Word | What it means | Example |
|---|---|---|
| Ticket | A numbered record of one user problem. | Ticket 231 |
| Helpdesk | The people who answer users' questions and problems. | The support team |
| Replicate | Making a problem happen again on purpose. | Open a class with no marks |
| Root cause | The real reason for the problem. | The code divides by zero. You cannot divide by 0 |
| User error | A user action the system does not expect, often caused by unclear design. | Typing a space in a number |
| System error | A fault in the machines or the way they connect, not in the code. | The server ran out of memory |
| Application error | A bug in the software itself. | A crash on an empty list |
| Security breach | Somebody got in, or got data they must not have. | Stolen passwords |
| Stakeholder | A person the product matters to or affects. | The teacher who reported the problem |
| Lessons learned | A 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
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:
- Write a test that shows the error. It fails now.
- Change the code until the test passes. The error is gone.
- Keep the test. If the error comes back, the test fails and tells you.
- 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.
# 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 questionsTell 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 questionsKey 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