Debugging
1.[3p] Put the steps of the debugging method in order.
Put the steps of the debugging method in order.
Cut the failing case down until only what is needed to fail remains
Make the bug happen on demand, with a written input and expected output
Make the observation and keep or discard the hypothesis
State a hypothesis specific enough to predict an observation
Show the answer
b, a, d, c
2.[3p] A bug lies somewhere in a 1000 line region. How many checks does binary search need, at most, to reach a single line?
A bug lies somewhere in a 1000 line region. How many checks does binary search need, at most, to reach a single line?
3.[2p] A test passed at a release 512 commits ago and fails now. How many builds does git bisect need in the worst case?
A test passed at a release 512 commits ago and fails now. How many builds does git bisect need in the worst case?
4.[3p] Why is "something is wrong with the sorting" a useless hypothesis?
Why is "something is wrong with the sorting" a useless hypothesis?
5.[3p] A bug appears only sometimes, on the same input. What does intermittency usually mean?
A bug appears only sometimes, on the same input. What does intermittency usually mean?
6.[2p] Logging an object in a browser console logs a live reference, so expanding it later can show a state the object did not have when it was logged.
Logging an object in a browser console logs a live reference, so expanding it later can show a state the object did not have when it was logged.
7.[3p] Which of these make a print statement more useful?
Which of these make a print statement more useful?
Select all that apply
8.[3p] Where should an assertion be placed while hunting a bug?
Where should an assertion be placed while hunting a bug?
9.[2p] Before git bisect can be trusted, one thing must exist: a single command that answers good or bad reliably. What is that called, in one word?
Before git bisect can be trusted, one thing must exist: a single command that answers good or bad reliably. What is that called, in one word?