This is a list of mental states that prevent you from finding a bug.
Since this written in a negatory way, let's start with an example:
Some trickster may have gone and #define true 0
.
I heard there was once an old compiler where *&1 = 0
would make true false by modifying the constant table.
You may be convinced that the bug is someplace where it is not.
It's hard to find a bug that no longer exists.
You might be ignoring a plausible candidate.
There may be a function call you didn't notice. The context may be scattered in different files. Some state might be modified by some distant code.
If a chain has two broken links, fixing one link does not fix the chain. If a 4 line-change is required to fix the bug, then a single line change won't fix it.
Plane accidents tend to be caused by multiple things going wrong at the same time.
cause₁ || cause₂ || cause₃ --> symptom
Your compiler might be outputting to a.out
but you are executing b.out
. Or you might be editing a backup. Or the thing you're editing is being restored somehow. You may be editing function l instead of similarly shaped function I. This can be recognized by frustration growing with increasingly drastic changes, and often naturally resolves itself by the programmer trying something flagrant that should break everything but does not.
There may be a function called twice, where the first call is good, and the second call is bad, and you set a break point at the function, and are investigating the first call instead of the second.
The output may be created correctly, but whatever is displaying it has a problem. Eg a draw function may be creating vertex data, but a bad matrix is putting it somewhere the camera can't see.
You may have forgotten to discard a change.
You might be doing constant_integer.add(23)
and ignoring the result.
You might be doing list = list.sort()
and erasing the list.
Floats are not ℝ.
This is often caused by a copy & pasting, but could also be caused by copying & pasting in an axis-indexed constant array.
Make sure only one copy of tail -F
is writing logs to your terminal.
Coming back with fresh eyes, or someone else's, may bring clarity.
???? It's probably to use this list to remind/reset/stimulate the subconcious than to go through everything as an explicit checklist???