34

Every now and then, you come across a question that has an answer which can be literally found in the language's documentation.

Often, questions like that can be closed as duplicates. However, when they can't, what would be the best course of action?

  1. Close the question as looking for an offsite resource, and comment with a documentation url,
  2. Answer with a 1-on-1 copy from the docs (And linking to the docs, of course),
  3. Answer the question as you usually would, but also link to the docs,
  4. Something else?

I realize it's probably impossible to set a strict guideline of "You should always do X", but I was wondering what would be considered the best approach.

2
  • 14
    It could be as simple as the documentation is difficult to search or parse; a common problem actually. So answering it on SO with the appropriate tags and then linking to the documentation would be a great help to others. Just don't put link-only answers. Commented Jun 17, 2014 at 8:19
  • 2
    Here's a question I asked whose answer in the official documentation. I never noticed it, never had the occasion to notice it, and was stuck on different terminology. Commented Jun 17, 2014 at 14:23

1 Answer 1

49

Pick either 2 or 3, as appropriate (just make sure it isn't a link-only answer).

2. Answer with a copy from the docs (And linking to them, of course),
3. Answer the question as you usually would, but also link to the docs,

Just because something has an answer elsewhere on the Internet does not make it an inappropriate question for Stack Overflow. "RTFM" has been proposed as a close reason and rejected.

Just because something is mentioned in the documentation does not mean that it is sufficiently clear to everyone who reads it. There is a lot of bad, confusing, and misleading documentation out there. There is plenty more that requires a sufficiently in-depth understanding of the library before one can make heads or tails out of what it is trying to say. In those cases, you need an expert to translate it for you, or perhaps just find it for you. That's what Stack Overflow excels at.

If we started closing questions where the answer could be found in the documentation, we wouldn't have any questions left. Or at least not any good ones. We'd have a bunch of "debug my code" questions, and confused questions about obscure, poorly-documented libraries. Bleh! Most of the questions with the tag could be closed as duplicates of something on MSDN; many of the questions about C++ (and probably all of those with the tag) could be closed as duplicates of the language standard.

That said, the same rules for good and bad questions apply here just as they always do. There are questions that betray such a state of confusion or complete ignorance that they cannot reasonably be answered without literally writing a book. Don't try and write one in the answer box, you'll run out of room. And even though you could answer these by posting a link to the manual, it won't do anyone any good. Close these questions as "too broad" or "unclear what you're asking". If you so desire, press the person to clarify their question in a way that it becomes specific and answerable.

10
  • 6
    This actually makes a lot of sense. Users posting questions that can be answered from the docs may not have sufficient understanding to search for the answer in those docs, didn't think of that.
    – Cerbrus
    Commented Jun 17, 2014 at 7:59
  • @Cup You can downvote for whatever reason you want, I don't personally agree with that outlook. How many questions can you find in the git tag that cannot be answered either by looking in the official documentation or one or more books about Git? One of our friendly moderators just posted this self-answered question. I haven't checked, but I'll bet that information is documented somewhere. Of course, now it's documented on Stack Overflow, which is what we're interested in.
    – Cody Gray Mod
    Commented Jun 17, 2014 at 8:19
  • 2
    I'm saying that all or nearly all of them can be answered by looking in the docs. It doesn't make them worthy of a downvote. @cup
    – Cody Gray Mod
    Commented Jun 17, 2014 at 8:53
  • 1
    Among my 818 answers in SO, this is the most upvoted one. Rather depressing, in some respect, but anyway, I guess the upvotes are from people who have found that useful.
    – leonbloy
    Commented Jun 17, 2014 at 14:35
  • I would also add that some more obscure libraries having documentation with answers may be unreachable by the asker due to corporate firewalls and the like. It's always best to provide an answer and not just a link.
    – Andy
    Commented Jun 17, 2014 at 14:38
  • It's also good to note, that unless you know where to find it or the exact search phrase it can be difficult to dig into official documentation. StackOverflow often acts as a good resource to unearth gems hidden in documentation libraries. Commented Jun 17, 2014 at 15:06
  • I would change #2 to 'paraphrase the docs' in most circumstances because some documentation has legal guidelines that forbid copying it. For example the Java tutorials.
    – Radiodef
    Commented Jun 17, 2014 at 23:35
  • 2
    "There is a lot of bad, confusing, and misleading documentation out there. There is plenty more that requires a sufficiently in-depth understanding of the library before one can make heads or tails out of what it is trying to say." Thank you. Just, thank you. Dealing with this right now. This cannot be emphasized enough. Even xkcd acknowledges it: xkcd.com/1343. Needs an extra data point, though: tools with a manual you can't read.
    – jpmc26
    Commented Jun 18, 2014 at 23:22
  • 1
    Even TV Tropes has this well-covered (albeit for video games mostly): tvtropes.org/pmwiki/pmwiki.php/Main/GuideDangIt tvtropes.org/pmwiki/pmwiki.php/Main/ManualMisprint tvtropes.org/pmwiki/pmwiki.php/Main/TutorialFailure
    – BoltClock Mod
    Commented Jun 19, 2014 at 6:15
  • C++ language-lawyer is about 50% hit and miss with the standard itself. The other half are "congratulations, you found a defect that someone else already found. The committee is considering how to reword that bit." ;) Commented Jun 22, 2015 at 20:11

You must log in to answer this question.

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