62

I have answered this question, where the OP has a requirement that seems to be a nearly impossible programming task.

I explained why this is a bad requirement, but the OP ultimately wanted an answer for this requirement.

Since the question is about a json object that can not be serialized, I give a hint that he could concatenate a string by himself. The OP now wants me to write the string concat code for him, which seems in my eyes too broad.

So technically, I didn't gave an answer. Should I remove it?

12
  • 5
    I'm sad to say: probably yes. It's most definitely an X/Y problem, but if the OP won't budge there is little you can do. Stack Overflow does not exist to educate people, it exists to ask and answer valid questions. Even the ones that are designed to make life unnecessarily harder than it needs to be. Perhaps it can be salvaged by just narrowing it down to "no, not possible because reasons" and strip out the part where you're trying to salvage the situation.
    – Gimby
    Commented Feb 22, 2017 at 8:28
  • 47
    I would just leave it standing as is. It's very educational about why it's dumb to try and implement dumb client requirements should anyone ever happen to stumble upon it; other than that, no point investing any more energy in it (including editing or deleting) IMO
    – Pekka
    Commented Feb 22, 2017 at 8:50
  • 59
    There is generally no upper bound on how much time a programmer will spend on an impossible task. That makes a "no" answer the possibly most productive answer you could ever give. A "yes" answer saves him an hour, a "no" answer saves him weeks. But SO users in general strongly dislike such answers and vote them unhelpful. Maintaining such an answer is also very little joy, they have a knack for turning into "yes" years later. I personally don't bother, life's too short, and just post a comment. The SO format is just not made for them, only happy answers work. Commented Feb 22, 2017 at 8:53
  • @HansPassant, I agree with what you're saying. Would this be the kind of answer to make community wiki so you don't have to maintain or am I getting that wrong?
    – Bugs
    Commented Feb 22, 2017 at 12:10
  • 6
    That's an option to avoid getting reminded repeatedly that your answer is unpopular. But doesn't do anything to stop snarky comments that typically accompany such an answer and if it is more likely to get somebody to edit it then I haven't seen it yet. You got your fair share of snark, clearly the OP isn't happy. They never are and there are few reasons to have to put up with "don't escape smartly", for one. As I said, life's too short. Commented Feb 22, 2017 at 12:32
  • Such OP in the linked question makes SO users look like auto-answering bots. SO is a tool, not the users.
    – Imaginary
    Commented Feb 23, 2017 at 2:04
  • 1
    I personally don't hesitate to ask questions where the answer might be "no, that's not possible" -- and no problem when anyone answers them as such. I have noticed that they tend to get downvoted; apparently, some users feel that if something can't be done, one shouldn't ask if it can. For that reason, next time I may note in the question that if the answer is "no", I'm fine with it, and please don't resist saying so. Commented Feb 23, 2017 at 7:04
  • 9
    "technically, I didn't gave an answer" -- don't be so hard on yourself. ...You already got a good answer below. But just to reinforce the point: sometimes (often, even), the person asking the question is the least qualified to recognize a good, relevant answer. That your answer didn't meet the impossible criteria given, does not keep it from being an answer, or even a good answer. If you really had failed to provide an actual answer, then sure...delete away. But that doesn't look like the case in this example. Commented Feb 23, 2017 at 8:07
  • 3
    My "You have an XY problem. Here's how to do what you really want" answer to that question is now my second-highest-scoring answer of all time, less than 24 hours after it was posted. It's rather frightening how much traffic that question is getting -- I hope most of it is from people who found it from this meta question (as I did), rather than from people who found it by searching for "Json object with duplicate keys"...
    – rmunn
    Commented Feb 24, 2017 at 8:34
  • @rmunn 's answer is the better answer, and incorporates yours. It's not possible and not a good idea, but he understood the reason for the question and solved the underlying problem. Nevertheless your answer is correct, and there is no need to delete it.
    – Ben
    Commented Feb 24, 2017 at 9:03
  • @Ben, the op explicit said, he can not change the json. This was more clear in the first revision of the question. If that wasn't the fact, I would have given an other answer. Commented Feb 24, 2017 at 9:05
  • Re @WilliamJockusch As an asker if I ever ask a question where the answer is "no" even if it leaves me unsatisfied, it still leaves me educated. I (will / would? (off to English.SO for the proper future-tense verb for a past-tense decision due to hypothetical question)) mark the answer as accepted and find another way. Commented Apr 25, 2017 at 15:29

8 Answers 8

110

No (I wanted to answer "No, this is not possible", but it is possible)

If what the OP is asking for is impossible, that's the best answer the question is going to get. If there is some way of achieving something similar, or anything else that can help the OP or future readers, don't hesitate to provide it. If not, oh well.

Worst case scenarios:

  1. You're wrong, someone posts an answer explaining this, life goes on
  2. You're right, but eventually the behavior is implemented and it is then possible. Someone posts an answer explaining this, life goes on.

Either way, the earth continues to rotate on its axis, so I'd say it's a net benefit.


As for the further request to write the string concatenation code, that should probably be a different question. If you want to provide such an example in your answer, there wouldn't be anything wrong with that. Likewise, if you don't want to provide such an example, there isn't anything wrong not doing so either.

5
  • 13
    In worst case scenario 1, deleting the answer then becomes appropriate (because the answer is wrong). In worst case scenario 2, updating the answer to say "Not possible unless you have C++27 (or whatever)" seems appropriate, but not essential. Commented Feb 23, 2017 at 9:18
  • 1
    Also, even if the OP is intransigent, a "No, that's not possible" answer may be helpful for anyone else who starts down the same path. Commented Feb 24, 2017 at 19:43
  • This answer ignores all the discussion around the XY problem and runs straight into a corner: User asks about the problem they are having with Y, wasting everybody's time, instead of asking about X.
    – Braiam
    Commented Feb 25, 2017 at 15:42
  • @Braiam did you miss "If there is some way of achieving something similar, or anything else that can help the OP or future readers, don't hesitate to provide it. If not, oh well."?
    – user4639281
    Commented Feb 25, 2017 at 15:44
  • 1
    I would further add that there are many questions to which a solution is not appropriate. However, the rationale as to why the solution is not appropriate is not necessarily, in itself; without utility to the community. Further, many XY problems are common and have been arrived at through a seemingly logical sequence of entirely rational beliefs or assumptions. Therefore, there is educational utility to the community as a whole to address why an XY problem is an XY problem. Additionally, let's not forget that due to advances in technology, the problem may not always persist.
    – Jordan
    Commented Apr 24, 2017 at 21:44
16

So technically, I didn't gave an answer. Should I remove it?

Yes, you did. So no, you shouldn't. The answer is "this isn't possible".

If the OP then changed the question (and to a non-question at that; we're not here to "write the string concat code for him) you should roll it back; questions shouldn't be fundamentally changed like that once they have answers.

Anyway, frankly, that's a really terrible question that will never help any future visitors so this is entirely a moot point.

4

It does happen that things are impossible, or maybe you are just wrong.

I have answered such questions in the past, in general I tend to let them simmer for a while (depending on tag activity), just to see if someone else manages to answer it and it wasn't just my lack of knowledge.

If nobody answers, or all answers are wrong, I will then add my own answer:

  • I'll qualify with the current version of the language/framework; after all it could become feasible.
  • I'll also explain why, as just "No" isn't really helpful.

I think negative answers are good answers. They may not satisfy the OP, but we don't answer only for the OP anyway.

4

Ignoring the specific question for a while...

When someone asks for something technically unfeasible, one has to wonder "does OP understands what he's asking?". In those cases asking "why do you need to do <impossible thing>?" becomes more practical. You will understand why the impossible thing is necessary, meanwhile you don't do fools errand trying to explain why it isn't possible or offering alternatives that only makes you waste time.

The most likely scenario is that OP doesn't need to do <impossible thing>, but to solve <a situation>, which he thought he needs <impossible thing>. Asking "why?" when there are absurd technical requirements can convert questions from "How to do <impossible thing>?" to "In what way can I solve this <issue>?".

In that case, both potential answerers and OP had a more productive use of their time: OP now has a solution that is not only feasible, but what is recommended for its specific situation (maybe learning something in the process) and answerers don't have to use time defending why it isn't technically feasible what the question asks nor need to, in the future, maintain it. Basically, their answer will be "correct" as long as their isn't a technical change that breaks backwards compatibility, unlike in the other situation when someone will come along and "prove wrong" the answer.

If OP edits the question after you answered to ask the later question, it's correct to delete the answer: you didn't have all the necessary information to post the most adequate answer, and since OP clarifies it, it's appropriate.

14
  • If a question is edited to invalidate existing answers, the edit should be rolled back and the OP should ask a new question. The answerer should not be deleting their answer just because the OP doesn't know how Stack Overflow works.
    – user4639281
    Commented Feb 23, 2017 at 18:10
  • @TinyGiant so, unclear questions with answers should never be clarified? How about off topic ones? Having an answer doesn't mean that it shouldn't be edited ever, specially if the edit clarifies the question!
    – Braiam
    Commented Feb 23, 2017 at 18:55
  • It shouldn't be edited to invalidate existing answers. In the case of the wayward resource request rescue, there was always an answer that answered the question, the edits that invalidated existing answers invalidated crap answers that were later deleted. If the question has a good answer and it is later determined that the asker asked the wrong question, they should ask a different question, not change their question if it would make that good answer irrelevant.
    – user4639281
    Commented Feb 23, 2017 at 19:02
  • @TinyGiant tell me, where I said that the question should be edited or otherwise? My last paragraph specifically address a unclear question ("dn't have all the necessary information to post the most adequate answer") which is indisputable a case where a edit, even if it invalidates existing answers, that clarifies the question incontestable! We do not want unclear questions, they aren't answerable and therefore closed.
    – Braiam
    Commented Feb 24, 2017 at 1:24
  • "If OP edits the question after you answered to ask the later question, it's correct to delete the answer"
    – user4639281
    Commented Feb 24, 2017 at 2:02
  • @TinyGiant so, OP shouldn't improve his question because it invalidates answers? Are you aware how counterproductive that is?
    – Braiam
    Commented Feb 24, 2017 at 17:01
  • If it changes the question to ask something other than what the question originally asked, it should be a new question. Any low quality question on the site can be improved by completely replacing it with a different question, but that doesn't mean that's what should happen.
    – user4639281
    Commented Feb 24, 2017 at 17:39
  • @TinyGiant you know perfectly well we change questions to ask "something other than what the question originally asked" if it means improving the question. What's different in this case?
    – Braiam
    Commented Feb 25, 2017 at 12:07
  • If you think it is acceptable to completely replace an answered question with a completely different question that has nothing to do with the answers, you're mistaken.
    – user4639281
    Commented Feb 25, 2017 at 15:38
  • @TinyGiant how you improve a XY question?
    – Braiam
    Commented Feb 25, 2017 at 15:40
  • If it's an acceptable on-topic question that has been answered, you ask a different question
    – user4639281
    Commented Feb 25, 2017 at 15:42
  • @TinyGiant so you will ignore SE policy?
    – Braiam
    Commented Feb 25, 2017 at 15:44
  • Show me where SE policy states that it is acceptable to completely replace an acceptable answered question with a completely different question that has nothing to do with the answers it has received?
    – user4639281
    Commented Feb 25, 2017 at 15:47
  • Have you never heard of chameleon questions? Because that is exactly what you're describiing
    – user4639281
    Commented Feb 25, 2017 at 16:09
2

It's important to distinguish "extremely difficult" from "demonstrably impossible", "theoretically possible but no one knows how yet" or "it's possible, but the way you're trying to do it won't work."

If it's a case of being flat-out impossible, that's a perfectly valid answer. See this question for a rather epic (and humorous) answer explaining why it's impossible to parse HTML with a regex. (Apparently, trying to do so summons tainted souls to the realm of the living). In fact, there are several answers there explaining why this is simply impossible (HTML is a context-free language, not a regular language).

If something might be impossible, that could be a valid answer as well. As a more philosophical example, consider whether the Chinese Room Argument could be a valid answer to a question like "Is strong AI possible?" Granted, that would be a terrible Stack Overflow question because it would generate discussion rather than a definitive answer, but just throwing out a hypothetical example...

In the case of "it's possible, but the way you're trying to do it won't work," then that's also an answer (although it would preferably give some explanation as to how you think they should do it instead). That's where the XY problem comes in.

A case of "that's really difficult, look at your requirements" may be more suited to a comment in my opinion because that's more of a critique of the question (are you sure that that's what you want to do?) than an actual answer.

1
1

No, this is not possible because ...

..can be a very helpful answer to very helpful questions where there was actually some reasonable hope that is could have been possible at the time the question was asked. The important part is why it isn't possible. That must be part of the answer (the question then kind of becomes "Why isn't it possible to...?").

On the other hand, there are zillion possible ways to pose questions which are impossible to answer positively because either the requirements are too high or the underlying assumptions are just too unrealistic. I just wouldn't bother answering them in the first place and these questions are not very helpful. If anything these questions might get deleted/closed.

In summary: An answer stating that something is impossible is clearly an answer and should not be deleted in general unless you really want to (for example because of a negative reception, SO tends to undervalue negative answers a bit). Not all such questions are actually worth answering.

1
  • "Not all such questions are actually worth answering" this is the most important issue: is preferable asking "why?" to avoid wasting your time with those kind of questions.
    – Braiam
    Commented Feb 24, 2017 at 17:02
1

An answer that is "No it is not possible" is not the most helpful answer.

Sometimes that means "I'm pretty sure it is not possible in my experience" but then someone later on shows that it is.

If you don't think it is possible then don't answer the question as it doesn't solve the problem.

However, sometimes "No" is technically correct but is still not the most helpful answer.

In your case you are technically correct in your answer, however, it doesn't help provide a solution to the problem.

The other answer is much more useful as it proposes an alternative solution whilst still (vaguely) highlighting that the original expected answer is not possible.

In this particular question the OP didn't seem to care though and accepted his own answer!

-2

I say keep the answer.

I had a recent experience as the question asker in this situation. My question was essentially "How can I do X with Y", and the first answer was "Not possible unless you use Super-New-Mostly-Unsupported-Version of Y". This was indeed correct in general, and I almost accepted it. I held off because I wanted some clarification, hoping they'd update or someone else might elaborate with citations.

Some hours later I log back in, and a different person had came along and showed that it actually was possible under the particular constraints of my problem. The first answer had since been deleted. That is the only situation I would consider deletion of a "no, not possible" answer appropriate.

TL;DR I would have accepted such an answer, because it gave me the information I needed to continue work on the project. It is valuable to verify that the task was impossible and why, which you provided in detail.

You must log in to answer this question.

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