in reply to Problem-solving Under Pressure: Noting the Proportion of Knowledge, Skill, and Chance

I've actually found that randomly stabbing in the dark at a bug (aka "thrashing"), although it eventually will usually lead to a solution, is not nearly as effective as taking an extremely rational and logical approach.

Basically, you start at the visible failure condition, and you work backwards until you find the point where things went wrong. Usually, if a bug is hard to find, it's because it's in some area that the programmer assumed couldn't possibly be going wrong ("I already checked the file permissions..."). I have often helped co-workers solve bugs by getting them to test those assumptions.

Ultimately, keeping your cool and staying rational in a stressful debugging situation will usually pay off.

  • Comment on Re: Problem-solving Under Pressure: Noting the Proportion of Knowledge, Skill, and Chance