Practice question · Put in order
Order the steps of a systematic debugging process.
- Narrow down the faulty code section
- Fix the code and run tests to confirm
- Form a hypothesis about the cause
- Reproduce the bug with a specific input
Hints
- Reproducing the fault has to come before narrowing it down.
- Verification belongs at the end, after the change is made.
Show the answer
- Reproduce the bug with a specific input
- Narrow down the faulty code section
- Form a hypothesis about the cause
- Fix the code and run tests to confirm
Why
Disciplined debugging avoids random changes that may introduce new bugs.
Practise Debugging and validation
The app has 9 more questions on this lesson, and keeps your place in the course. Physics I is free to start.
More questions on Debugging and validation
- Your projectile simulation says a thrown ball climbs forever. Which debugging move gives the most information…
- A program runs without errors and produces plausible numbers that are wrong. Why is this harder to catch than…
- Order these steps into the scientific debugging method.
- Complete the description of debugging.
- Sort these errors by category.