I find many problems made easier by applying cross-disciplinary knowledge.
Debugging has been one of those for me.
A long time ago I helped my mother with a murder mystery by researching how doctors diagnose things (I was a professional information broker then, with Dialog, Lexus/Nexus, GratefulMed, etc.), as much as I could without going to medical school. I learned a lot about differential diagnosis. That got me hooked on medical shows, where I learned a little more. At some point after that I wondered if I could apply differential diagnosis methods to debugging. Because there are often multiple possible causes for a bug, I found the differential diagnosis approach to work amazingly well for me.
I call this process D3 (Differential Diagnosis Debugging).
Below is roughly how I apply it. I am working on a book including this as a couple chapters, but that won't be out for at least another year. The material in this post is in the book, so I am told I must copyright anything smacking of an excerpt.
First, capture all the relevant details of the expected behavior. Create a unit test (or tests) to confirm the expected behavior.
Next, capture all the differences between the observed behavior and the expected behavior (the 'symptoms').
Then, examine those differences to come up with possible hypothesis about the causes.
After that, use a concept similar to Karnaugh Maps [1] to determine a sequence of small discrete unit tests whose truth (if true hypothesis could be true) determines a T or F for each hypothesis. If you wind up with more than one T then you need more tests (diagnostic testing).
Once you have a confirmed hypothesis, apply a fix an rerun all your tests. Rinse and repeat as needed, if needed (treatment), until all of your expected behavior tests pass.
Unpublished Work © Copyright 2022 William A. Barnhill, Jr. Some rights reserved. You may apply the D3 process as described herein; you may not incorporate the D3 process into a written work, a web site, or an email; you may discuss the D3 process if full attribution to the author is given.
Please don't hate me for the above folks. Been told I need to include that if I want to get published.
[1] https://en.wikipedia.org/wiki/Karnaugh_map