Why don't people first debug then ask questions?

If people started using the debugger they would learn faster where they are having errors and try to solve them, at least in Java I did that, in C you could do some prints and see what was happening by creating a debug variable (if debug is 0 then no prints are done, else prints are done).

Why don't they debug first?


migrated from stackoverflow.com Apr 28 at 10:26

This question came from our site for professional and enthusiast programmers.

closed as primarily opinion-based by Louis, Wooble, Toon Krijthe, morgano, Aziz Shaikh Apr 28 at 11:37


You're right but (1) it's easier to ask than to learn how to debug; and (2) your next question should ask why people don't read the SO help before asking inappropriate questions :-) –  paxdiablo Apr 28 at 10:09
I downvoted this because it's off-topic, but you are absolutely right, I feel the pain as well. People just don't make any effort. –  The Paramagnetic Croissant Apr 28 at 10:11
It doesn't bother me, the downvote. Just wanted to know others opinion on the this topic. –  DavideBar Apr 28 at 10:15
This is off-topic here. You should post on [meta], but it's probably already been asked. It's a common frustration. –  Hobo Sapiens Apr 28 at 10:19
Didn't knew about the Meta Stack, going to check over there ;) –  DavideBar Apr 28 at 10:20
If only people read documentation, or tried things themselves first, or, indeed, learned about debugging. What a perfect world we'd have! –  Martijn Pieters Apr 28 at 10:34
Debugging is a skill. A skill that requires practice. And if you have a problem to solve, why on earth would you take the time to practice when there is an entire community out there that already has the required skill? –  Bart Apr 28 at 10:36
Bart are you saying something like "don't study, because there is an entire community that can read" ? –  DavideBar Apr 28 at 10:38
It's certainly not my recommendation. But I fear it's the approach taken by many. With subsequently a lot of users fooling themselves thinking that they've understood. In light of the solution the question has become trivial. Until you have to answer the next question. –  Bart Apr 28 at 10:38
But it's not that hard to debug. I can't understand it... –  DavideBar Apr 28 at 10:42
Laziness, it's the same as unclear question or duplicate. A lot of people don't do efforts. And we have to comment to get more informations. –  Larme Apr 28 at 11:11
This is a good question. Unfortunately, it's not one we can answer. –  Andrew Barber Apr 28 at 13:34

1 Answer 1

up vote 6 down vote accepted

Simple answers are laziness or a lack of a solid foundation. While perhaps a bit too broad, it covers how many users seem to approach their programming task. Programming to them is a skill where you write or assemble code until your problem is solved.

Debugging however has several requirements:

  • You need to understand the problem you're solving.
  • You need to understand your solution to the problem.
  • You need to understand what results to expect in various stages of your solution.

Many users seem to be lacking in one or more of these requirements, and often simply don't seem to grasp that these requirements exist at all. Or they have obtained code that has to do X, but when running DoX() it doesn't seem to be doing that, and they have no clue about the implementation in the first place. (And we're not just talking newbz here) Debugging, even if it's just a pen and paper trace of values, is something that is completely foreign to them. "What do you mean, draw a tree to see if my recursion behaves like I expect it to?".

So if your code doesn't work, yet the code has to solve your problem, what do you do? Well, there is an entire community out there which somehow has developed the voodoo skill to write code without bugs and who will trivially spot bugs for you. And sure, you might get some flak from this user who mentions debugging, but you'll more than likely get your answer anyway.

Ahahah the best answer I've seen =D "voodoo skill to write code without bugs" –  DavideBar Apr 28 at 11:14
And "You need to understand your tools". Many users don't know how to start their debugger. On embedded systems, it may actually be quite difficult to do so (some SoCs allow loading code via USB mass-storage emulation without a debug interface connected). –  Ben Voigt Jun 26 at 18:58

Not the answer you're looking for? Browse other questions tagged .