3

By far the most common fault I encounter in reasonably good attempts at asking for help here is something I've seen called "the xy problem", where someone has encountered a situation, has a method for dealing with it, and is asking for help on how to implement that method but their real problem is in their choice of method.

How to ask a good question does say

Introduce the problem before you post any code

In the body of your question, start by expanding on the summary you put in the title. Explain how you encountered the problem you're trying to solve, and any difficulties that have prevented you from solving it yourself. The first paragraph in your question is the second thing most readers will see, so make it as engaging and informative as possible

but I think that could be improved. The heading should certainly strip "before you post any code", newbies who aren't posting code, i.e. they're having trouble using tools not writing code, will just skip right over it. And that last sentence there? Move this section above the bullet points that currently precede it, they don't just apply to the title. Here's my first attempt at an improved version:

Write a question title that summarizes the specific problem

The title is the first thing potential answerers will see, and if the summary there isn't interesting, they won't read the rest. So write the best, most concise introduction you can here (and see below)

Explain the situation that prompted your question

In the body of your question, start by expanding on the summary you put in the title, and be sure to provide enough context that people trying to help you are likely to understand how to proceed. If you're having difficulty implementing the solution to some problem, explain the problem as well as the solution you're attempting and the difficulty you're having. The first paragraph in your question is the second thing most readers will see, so make it as engaging and informative as possible.

In general

  • Pretend you're talking to a busy colleague and have to sum up your entire question, one sentence for the title everyone sees and a rewarding paragraph for those that take an interest. What details can you include that will help someone get you out of the trouble you're in? After your first explanation of the situation, subsequent details should include any error messages, key APIs, or unusual circumstances that make your question different from similar questions already on the site.
  • Spelling, grammar and punctuation are important! Remember, this is the first part of your question others will see - you want to make a good impression. If you're not comfortable writing in English, ask a friend to proof-read it for you.
  • If you're having trouble summarizing the problem, write the title last - sometimes writing the rest of the question first can make it easier to describe the problem.


edit: s/identify your problem/get you out of the trouble you're in/

11
  • Why so more people can pester the op into asking a question they never intended to ask nor want the answer for? Point is that I often find that people who think a problem is an XY problem are wrong. Giving these people more ammunition is not a good thing.
    – user4639281
    Commented May 28, 2018 at 20:22
  • @TinyGiant I think helping people give good answers to good questions is a worthwhile goal, and ignoring or downvoting bad contributions remains very easy to do if further discussion to improve the quality doesn't seem worthwhile, no?
    – jthill
    Commented May 28, 2018 at 20:44
  • 1
    Or we could just answer the damn question instead of assigning intent where there is none. If the asker figures out after the fact that they asked the wrong question, they can figure out the right question to ask. They don't need us to berate them or to derail their question because you think they might be asking the wrong question. Why assume that because you dont understand the reasoning behind why someone is doing something the way they are that makes the question somehow bad?
    – user4639281
    Commented May 28, 2018 at 21:01
  • 5
    @TinyGiant I strongly disagree. We don't only answer for the OP, but for other users as well. If a question seems to be an xy problem, that possibility should at least be investigated before answering. Most suspected xy problems I have encountered turned out to be real xy problems. Commented May 28, 2018 at 21:05
  • 2
    I think I've been right in suspecting those more often than not too.
    – jthill
    Commented May 28, 2018 at 21:05
  • @ModusTollens thats right, we answer for future readers, which is why we should answer the question asked, not some other question that isn't asked. I hate showing up to a question from a google search that matches what I'm looking for, only to find an answer that doesn't help me at all because it is answering a different question.
    – user4639281
    Commented May 28, 2018 at 21:23
  • @TinyGiant We might have a misunderstanding. Of course the answer shouldn't answer a different question, but it should answer the actual problem with a fitting solution and ideally point out why OPs approach wouldn't work or might be problematic. Still talking about xy problems. Commented May 28, 2018 at 21:25
  • @TinyGiant Example: a user asking how to delete a data entry that is saved in a comma separated list in a relational database column -> normalized db design should be mentioned. It is useful for beginners in db design to be pointed to the correct approach. Commented May 28, 2018 at 21:30
  • I think the good questions the [git] tag gets get now are asked by users who were badly instructed, who come at it with preconceived notions about what things are for and are trying to match the overbearing and misleading abstractions they've acquired against the reality, and are understandably albeit woefully confused. I think of it as close kin to the Paris syndrome. The sheer tonnage of Bierce-ian erudition dedicated to "explaining" and complaining about Git should be shocking. There's also many repeats, I'm not here about those @HansPassant
    – jthill
    Commented May 28, 2018 at 23:09
  • Take the guy who wanted git stash -p to ignore already-added hunks. That was his question: how to do that. "Should" he have read the actual Git (in this case) docs for all the commands as the primary source as career professionals do, playing around with it some as she went along to check his understanding, and gone from there? Sure. But if that's what everybody did, there would be almost no consultants or professors, because it's not all that hard to understand what's really going on ... once you've got a certain minimum of enlightenment about what computers actually do. @HansPassant
    – jthill
    Commented May 28, 2018 at 23:16
  • ... and, by the way, that stash question is also one of the answers to yours, "what could anyone ask now that hasn't already been asked here". @HansPassant
    – jthill
    Commented May 28, 2018 at 23:25

0

You must log in to answer this question.

Browse other questions tagged .