38

There's a lot of activity on meta bemoaning the loss of the "lacks sufficient understanding" close reason. Very little of it addresses what I considered to be the intended target of that close reason:

Questions which come from an alternate universe, because their premises are counterfactual / break the laws of physics in the one I (and Stack Overflow) exist in.

A hypothetical title of such a question would be:

How can I configure the size of the std::map hash table in order to reduce collisions?

It could be well-written, specific, include details about the library version and an SSSCE of code that uses a std::map..., and it still is a bad question.

For those of you who aren't familiar with the C++ standard library containers, the reason this question is trash is because std::map is usually implemented as a red-black tree and cannot be a hash-table due to the iteration ordering requirements in the Standard.

In the past, the correct thing to do was leave a comment saying that there is no hash table to configure, and close as "lacks sufficient understanding". Can't do that any more.

What is the correct response when someone doesn't understand what they're asking, to the point where they ask for something completely impossible? The question can't be edited into shape1, because once you remove the fallacy, there's nothing left. Is that comment now a valid answer? Does another close reason apply?

Here's a real "Not in my universe question" with a terrible title that isn't representative of the actual question content:


1 These are necessarily X-Y problem questions, but no third-party can guess what X was, let alone properly describe it in order to salvage the question.

9
  • 1
    I was about to reference a discussion posted here just earlier today by someone else who posted a question with a false premise... But it looks like he deleted it. Boo!
    – Shog9
    Commented Jun 7, 2014 at 3:49
  • Some overlap with "Is 'don't do it' a valid answer?" insofar as we're talking about invalid premises for questions.
    – jscs
    Commented Jun 7, 2014 at 18:53
  • 1
    @Josh: They are similar, but not overlapping. The premise of the question you found is that what's asked for is possible but not advisable. The questions being discussed here deal in requests relating to things that don't exist. A third category would be requests that make sense but are not possible (e.g. "How can I iterate a std::map in insertion order?" The iteration order of std::map does exist -- it's sorted by key, and the insertion order does exist, but the insertion order isn't remembered so there's no solution). In the latter two cases, being a good or bad idea is irrelevant.
    – Ben Voigt
    Commented Jun 7, 2014 at 20:42
  • 8
    A good answer to your example question would be "I think you're confusing std::map, which typically uses a red-black tree internally, with std::unordered_map, which uses a hash table internally. You can set the size of a std::unordered_map like so..." It's not a very compelling example, because the question could be trivially edited to be sensible (which the asker could do as soon as you explained they were confusing map and unordered_map). Commented Jun 8, 2014 at 6:51
  • 4
    I don't think there's anything inherently wrong with such questions as long as they're not duplicates. If someone has the misconception that leads to asking for an impossibility, they're probably not the only person to have had such a misconception, and an answer which explains why what they're asking for is impossible and clarifies what they should have asked (see @TimothyShields comment just above) has value for future users of the site with the same or similar confusion. Commented Jun 8, 2014 at 11:07
  • @R..: But it doesn't answer the question. I like Dukeling's approach of answering the misconception as a different question, and then closing with a pointer.
    – Ben Voigt
    Commented Jun 8, 2014 at 16:44
  • @TimothyShields: Editing that question in such a way would be totally inappropriate. How do you know that their code even can use std::unordered_map? They may be using other features that unordered_map does not have, or even third-party code that specifically uses std::map. Edits should clarify question, not replace them, and your approach replaces the question. Your answer is a comment, not an answer... which as I said, used to be the way this was handled -- with a comment and a close vote. That way is no longer available.
    – Ben Voigt
    Commented Jun 8, 2014 at 16:45
  • @BenVoigt: I don't see where Timothy's comment suggested editing the question. Rather he proposed answering in a way that acknowledges and explains the OP's misunderstanding. You can argue over whether this is semantically an "answer" but that's ignoring the reality that it probably solves OP's problem and answers the question of others who have a similar misunderstanding and thereby "resolves" the question -- and OP should have a chance to accept it as such. Commented Jun 8, 2014 at 17:06
  • 1
    @R..: I quote him directly: "the question could be trivially edited to be sensible (which the asker could do as soon as you explained they were confusing map and unordered_map)."
    – Ben Voigt
    Commented Jun 8, 2014 at 17:10

5 Answers 5

23

Personally I'd suggest trying to find a post which addresses the incorrect belief (or perhaps even ask and answer such a question if one doesn't exist) to close it as a duplicate of.

For your hypothetical example, such a post could be What is the map data structure in C++ (or perhaps this - the accepted answer in the first doesn't answer the question - it really bugs me when people don't ask what they want to know).

If someone managed to find themselves with this incorrect belief, it stands to reason that a question addressing it could be useful.


If this doesn't apply, then you should probably follow Shog's advice about answering it / leaving it open (not that I'm sure I agree with it).

2
  • 1
    I think finding (or even creating) a dupe addresses two problems with the "answer with an explanation" approach: firstly, explaining why the question is invalid doesn't necessarily leave a well-matched question-answer pair for later readers; and secondly, as Ben Voigt points out, the questioner can pull the rug from under you by editing the question to be based on a completely different frame of reference - at which point a retracted dupe vote still leaves a decent answer somewhere else for next time.
    – IMSoP
    Commented Jun 7, 2014 at 18:13
  • This feels like a lot
    – bob
    Commented Jul 9 at 2:29
78

Just post an answer. Chances are, the person asking isn't the only one out there with wacky ideas about how things work, and it's better to educate them than to have to keep closing each new question born of ignorance.

6
  • 4
    Then the problem becomes when the original poster clues into the fact that it's an X-Y problem, and completely changes the question rendering all existing answers irrelevant.
    – Ben Voigt
    Commented Jun 7, 2014 at 3:56
  • 7
    well... That's always a problem. Regardless of the question.
    – Shog9
    Commented Jun 7, 2014 at 4:00
  • 37
    @BenVoigt You can roll it back. If the OP redos the edit and engages in a rollback war, you can flag for a mod to lock the post and hope the user comes to meta with an amusing rant about mod abuse. :D
    – Mysticial
    Commented Jun 7, 2014 at 5:22
  • "Just post an answer... better to educate" You just described what I have been doing on Stack Overflow for 5+ years: very little closing (beside the obvious ones like spam or off-topic), and a lot of answering.
    – VonC
    Commented Jun 8, 2014 at 11:22
  • @VonC: What about duplicate / too broad / unclear? AFAICT, that is important too. Commented Jun 8, 2014 at 12:29
  • @Deduplicator unless the question is practically a carbon-copy of another question, I just keep answering, adding elements pertinent to the specific context of the question.
    – VonC
    Commented Jun 8, 2014 at 12:37
25

All questions are asked due to a lack of understanding by the questioner to some extent (otherwise they wouldn't be asking!). Closing well-formed questions when knowledge could instead be shared seems to run contrary to the purpose of Stack Overflow in my opinion.

In your example, an answer that simply stated

  • it cannot be done
  • why it cannot be done
  • some alternatives that might achieve the original intention of the poster

would be a very valuable answer, not just to the original poster, but to all those in future who also want to manipulate a std::map and don't realize that it isn't backed by a HashTable implementation.

I'm all for closing poor questions that show lack of research, are duplicates, badly worded, or simply ask to "give me da codez". I also think there needs to be some basic level of comprehension by a coder to warrant bothering to respond, but questions which create genuine ground for informative and useful answers that are not opinion-based are definitely not the ones that need closing if you ask me.

8
  • So, you're recommending answering these questions with the help of a crystal ball and some tarot cards, to divine the original intention of the poster? You did see my original footnote, right? I'm not talking about an explanation that what they want is not possible, but that their question, in a very clear manner, makes no sense.
    – Ben Voigt
    Commented Jun 8, 2014 at 3:09
  • No I'm not saying that at all: X-Y Questions are usually unanswerable... However, I just do not see the specific example you have given as a good example of an X-Y question that should be closed due to "being unanswerable". Commented Jun 8, 2014 at 3:57
  • What do you think is the original intention? It might be improving average performance. It might be trying to make performance more consistent. It might be to avoid timing attacks. It might be just for the user's education. With the actual question I linked, I can't tell whether the intent is improving compile times, better/more descriptive error messages, or supporting some hare-brained claim that Java is superior to C++.
    – Ben Voigt
    Commented Jun 8, 2014 at 3:59
  • 4
    There is a pretty good comments system for seeking clarification or does that not exist in the universe you are describing? Commented Jun 8, 2014 at 4:01
  • If the question needs comments answered to be dealt with, it is supposed to be put on hold (closed) in the meantime.
    – Ben Voigt
    Commented Jun 8, 2014 at 16:48
  • ...and the comments system isn't meant for chat, but it doesn't stop posters using it that way. If every question that had a clarification comment was put on hold the site would grind to a halt. The first 2 bullet points in my list could easily be addressed for your example without further clarification. If you don't like a question there's always the "ignore it" option. As I thought I'd expressed in my post, I think there are a lot of close candidates on Stack Overflow, I just don't think the example you have posted is in that category. Commented Jun 8, 2014 at 20:30
  • 2
    I think you're intentionally missing the point. There's a huge difference between "has a clarification comment" and "cannot even begin to be answered until clarifying information is provided". This discussion is not about gimme-teh-codez, or it-cannot-be-done questions, rather about "there is no it" questions
    – Ben Voigt
    Commented Jun 8, 2014 at 21:14
  • I'm saying there's a huge difference between the example you have given and "cannot even begin to be answered until clarifying information is provided". I am getting tired of repeating that and I am also saying that comments are not a place for a conversation. Commented Jun 8, 2014 at 21:20
6

Downvote Hover

Downvote it. It isn't useful. It doesn't show research effort. It will signal that the question is not good. Leave a comment as before if you'd like, but at least downvote it.

2
  • So you're saying these questions don't get answered and also don't get closed?
    – Ben Voigt
    Commented Jun 9, 2014 at 16:00
  • 1
    I'm saying that you can feel free to downvote and not answer. If someone else wants to take the time to explain clearly why it's not in the same universe, it may help someone in the future. Questions that are closed and not reopened end up getting deleted which is of zero value to future visitors. A question with totally wrong assumptions may help someone in the future with the same totally wrong assumptions. What makes this solution so unappealing?
    – jmac
    Commented Jun 9, 2014 at 23:22
6

You are basically saying: "This guy is asking a question without knowing the answer. This annoys me."

The correct approach is to write an answer explaining why the question doesn't make sense. Or better yet, write a Q&A style post where you answer your own question "How to use std::map as a hash table?", with the answer "You can't, because of...".

You can then use that post as reference, to close such questions as duplicates in the future. Eventually, it will become a "frequent" question when enough duplicates have been linked to it.

This is how it is done in other such cases. To continue with C++ examples, you can have someone asking "why does i = i++ print different results on different compilers? (code follows to illustrate)" That question is similarly flawed, because the code invokes undefined behavior. It doesn't make much sense to post answers investigating how this undefined behavior manifests itself on various systems. The correct way is to close it as a duplicate to "Why are these constructs undefined behavior?".

Your case is exactly the same as the i = i++ one.

You must log in to answer this question.

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