I'm not even sure how to define this difficulty. It reminds me of the test a couple of prospective employees did on me before I got a job. They would pick an object in the room and then I'd be allowed to ask questions to help myself determine what that object is (much like 20 questions). I was ridiculously good at this (no, I never got high points for humility), so I'd assumed that I'd be really good at troubleshooting bugs...But here's the thing I figured out recently. I'm really good in that situation because it's really easy to see everything that's in the room, thus I can approach my problem with some concept of it's component parts. In essence I know what I don't know. But with programming I run into a lot of situations where the problem is a complete unknown to me. I know it's broken, but I have no concept of how it might be broken. I've followed all the instructions, I know the technology fairly well...If I'm honest, I feel like I'm just having a hard time imagining things that could be wrong so I can test them and, hopefully, find a solution.How do I go about developing that skill? What do I need to do to help my, apparently, limited imagination come up with ways that my project could possibly be broken? Are there exercises (puzzles perhaps?) that can make me better at this? I'm aware that probably the biggest cure is just experience...but I'm hoping to help accelerate the process if I can. Staring at my computer screen blankly for a few hours at a time is not even kind of fun...
Learning to investigate bugs
learning;debugging
Every defect in software is ultimately due to a discrepancy between assumptions and reality. Insidious bugs are simply discrepancies between particularly deep-seated assumptions and reality. The ability to diagnose bugs depends on your capability to question your own assumptions, and that does indeed require an awareness that you don't know certain things, you just assumed them and used to be right until now.Obviously the tools of the trade, log files, debuggers etc. are helpful in uncovering such assumptions and re-aligning your world model with the actual system. But until you are ready to question the crucial assumption, e.g. It can't be bad input because we have comprehensive input checking, you will spend your entire time checking the wrong parts of the system, or simply not knowing where else to look in the first place.