Free preview lesson
Understand What a Bug Is and How to Reproduce It
Describe the bug in one sentence
Why this matters
Before you can fix a bug, you need to say clearly what is wrong. A vague report like "the app is broken" gives you nothing to work with. A clear description tells you where to look and when you know you have fixed it.
What a bug is
A bug is a mistake in a program that makes it do something other than what you expect. The program may not crash at all. It might show the wrong total, skip an item or save the wrong name.
How to write a good description
Use these three parts in one sentence:
- What you expected: the result you thought the program would give.
- What actually happened: the result you really saw.
- The exact input: the values, clicks or words that caused it.
For example: "When I enter 3 items at 2 dollars each, I expect a total of 6, but the total shows 5."
Keep the sentence specific. Avoid guesses about the cause, such as "the maths is wrong somewhere." You are describing the symptom, not the reason.
What to do now
Pick a bug you have seen, or use a recent problem in your code. Write one sentence with the expected result, the actual result and the exact input.