News for hackers. Stuff that matters.
Re:The Debugging Mindset by sleepychu on Monday April 03, 2017 @05:05AM (#14021476)
My favorite debugging trick (when faced with an 'impossible' bug) is to state my assumptions, it's usually clear when they're all laid out which ones are conflicting.
Re:The Debugging Mindset by jspash on Monday April 03, 2017 @07:00AM (#14021875)
Sounds like Rubber Duck Debugging. A simple, yet effective technique. http://wiki.c2.com/?RubberDucking https://blog.codinghorror.com/rubber-duck-problem-solving/

Having just read the recent article on HN about Japanese workers "pointing at things" got me thinking that the two actions probably stimulate a similar area of the brain. Sometimes we just need to get "out of our head" to make a breakthrough in the problem we're trying to solve.

Re:The Debugging Mindset by AstralStorm on Monday April 03, 2017 @07:58AM (#14022104)
It is no longer Rubber Duck when you actually spell out the assertions. It becomes a form of very good and useful documentation and sometimes runtime verification.
Re:The Debugging Mindset by mrSugar on Monday April 03, 2017 @06:51AM (#14021854)
Sounds like a variation on Ayn Rand's "contradictions do not exist, if you think you see one, check your premises, some of them will be wrong".
Re:The Debugging Mindset by eriknstr on Monday April 03, 2017 @10:24AM (#14022946)
Is that quote intentionally saying that you have contradicting premises, and by extension is the statement in that sentence that contradictions do not exist contradicted by the later part of the sentence, or is there something about the sentence that I'm not understanding?
Re:The Debugging Mindset by mysterydip on Monday April 03, 2017 @01:00PM (#14024601)
It reads like that at first. What it's saying is for example: Assume x is 5. Assume function TimesFive multiplies things by 5.

When we do TimesFive(x) and my answer is 50 instead of the 25. I check the TimesFive function and it's just "print x*5". But how is that possible? 5x5 is 25!

The problem in this case is my assumption that x would be 5 was wrong.

I've had this issue before in my code (though not as trivial an example of course), but it's always a good reminder of something to check when troublshooting.

Re:The Debugging Mindset by dhodell on Monday April 03, 2017 @12:39PM (#14024332)
Which sounds like a variation on various Socratic learning techniques.
Re:The Debugging Mindset by AnimalMuppet on Monday April 03, 2017 @01:36PM (#14025050)
Or if it's not clear, you can start testing/tracing/logging to see which assumption isn't valid.