(no title)
arjonagelhout | 6 months ago
Take this example: "When debugging I typically:"
> Write tests to isolate the problem
In the case of math functions, or more primitive building blocks, writing tests can help ensure correctness of the underlying functions, to exclude them from the problem search.
> Reason about the code logically first
This is always useful.
> Use a debugger to step through code systematically
Useful when dealing with a larger codebase and the control flow is hard to follow. The call stack can give quick guidance over trying to manually decipher the control flow.
> Add print statements to understand data flow:
Useful when debugging continuous data streams or events, e.g. mouse input, where you don't want to interrupt the user interaction that needs to be debugged.
thierrydamiba|6 months ago
teapot7|6 months ago
arjonagelhout|6 months ago
mannykannot|6 months ago
In this case, one tacit assumption is that a given developer will typically adopt just one of these approaches. Another is that they can meaningfully and objectively be ordered along either of the axes purportedly being measured.