How to shoot yourself in the foot

Here’s another one to throw onto the “how to ask questions” heap. Sometimes, somebody asks a question on Stack Overflow that amounts to this:

What is the best way to shoot myself in the foot?

It is very tempting of course to answer:

Choose which foot you’d like to shoot, aim the gun at it, then pull the trigger.

Really, however, I usually try something more along those lines:

Shooting oneself in the foot is rarely something you’ll want to do. It can have serious consequences on your health, and in particular on your ability to use your foot afterwards. Shooting any part of your body (or other people’s for that matter) is in general not something I can recommend.

What exactly are you trying to achieve by shooting yourself in the foot?

Explain, then ask for more information. And the answer to this is…

There’s a really scary spider on my foot.

or…

I need to drill a hole in the floor under where my foot is, to get some cables from my basement.

Now, we can provide some useful answers that will hopefully avoid the whole gun shooting thing.

The problem with the initial question is that the author assumes he has figured out the best solution to his problem. He believes his problem to just be a technical hurdle, whereas they are a sign that they’re doinitrong.

While there is a technically good answer to the question, we know that we can do better. What we need to find out is what the questioner’s problem is, not what his question is.

Sometimes, however, it gets weirder:

What is the best way to shoot myself in the foot with a power drill?

If somebody asks you this, resist the urge to answer

Despite the superficial resemblance between a handgun and a power drill, you can’t shoot yourself in the foot with the latter. Buy a gun, then try again.

Once again, you must first understand what the questioner is really trying to achieve, and then solve that problem in a sane way…

2 Comments

  • Generally it is correct. But there is other side. For example, on stackoverflow I see numerous answers providing variants of how to avoid "shooting yourself in the foot" just because they do not know answer to a direct question. If I have very valid reason to do what I am going to do then I am not interested in all of those assumptions about what I could do to avoid my task. I just need this single unique piece of advice that can help me in my difficult situation. The fact that most of those who look at the question do not know the answer does not mean I am trying to do something wrong. It just means that the situation is not so simple and common as ones those people solve in their work on a daily basis. I appreciate an attempt to help but sometimes it gets annoying. Not an attempt to help in itself. No. But didactic tone of such answers that assumes that the person knows better what I need. But truth in this case that the person is dumb enough not to understand that the question far exceeds his level of understanding.
    Again, I absolutely agree with the idea above. It just resembled me of very common situation I see in the list of answers.
    That is if you know how to drill a hole in the floor does not mean that all problems are solved this way. In this case I always want to say ".... Well, you just do not know how to answer, then please shut up. You can't help this guy and do not understand the situation."

  • Fair enough, and I totally agree that this can be annoying. However, if you're asking a question, it's safe to assume you hope somebody knows something you don't. That something may not be what you expect, which is all for the best: it's an opportunity to learn new and unexpected skills. For instance, if you ask something about a particular technology that is designed to attract you into a pit of success, and away from a pit of doom, if you ask how to jump into the pit of doom, then it's a reasonable assumption that maybe you didn't understand what the technology's design vision was. In most cases, that assumption will be right, but we don't like to be data points in statistics, we prefer to be nice unique snowflakes ;) But I agree, from time to time, somebody will have a perfectly reasonable reason to do something that is usually not a good idea. The gunshot in the foot metaphor is a little too extreme to convey the subtlety of the problems we deal with every day, and we all have to hack our way forward from time to time.
    The solution however is to give more context to your questions. This will enable the potential answer writer to skip the WTF phase and go directly to give you the answer you need, or to show you a better way to achieve your real goal, that you may have missed. If the questioner fails to do that, then additional questions are the best next step. In the case of Stack Overflow, I do this in the comments section, in order not to pollute the answers.

Comments have been disabled for this content.