Sometimes, I come across answers (not comments) that shows a proof that the code of the OP is working fine. Of course, not all such answers are correct, since the difference in version of the interpreter/browser/whatever runs the code may cause the difference in behavior. However, in case that such difference is no way related to the problem, is "it works fine here" considered an answer?

  • Interestingly, the answer doesn't "prove" anything. It just claims running the code in a php session will yield the correct results, except it uses an unnecessary code block to do it.
    – user200500
    Feb 16 '13 at 15:30
  • @Asad might be influence of very high rep OP Feb 16 '13 at 15:45
  • @Asad: While it is the motivation for this question, I would like to ask it on a more general basis.
    – nhahtdh
    Feb 16 '13 at 15:54
  • Possible duplicate of meta.stackexchange.com/questions/118992/…
    – Barmar
    May 27 '13 at 0:29

Not really. It doesn't answer the question...

It does makes a great comment, however.

For it to be an answer, you need to detail what could cause the issue, not that you can't reproduce it. You can explain that the different versions are not the issue.

  • 4
    Than please take a look at stackoverflow.com/a/14897702/1723893 i have flagged it as not an answer but got flag disputed ... Feb 16 '13 at 15:15
  • @NullPointer: IMO, the example you linked to isn't just a works here answer. There is also a suggestion that there is more relevant code than the snippet in question. In fact, the best answer is probably the comment by David Kiger, who phrased it more explicitly than Marc B. But the fact is that the question wasn't the best one to begin with. Feb 16 '13 at 16:09
  • @GoranJovic than what else it is ?... there is not any difference between code in question and in answer of Marc B Feb 16 '13 at 16:12
  • @NullPointer: The real problem is that this situation occurs only with bad questions. That answer contains all that can be inferred from what is given. That it barely constitutes an answer can tell something. Feb 16 '13 at 16:43
  • @GoranJovic A bad question is no excuse for a bad answer.
    – yo'
    Feb 16 '13 at 23:43
  • 1
    @tohecz bad questions get closed then deleted. The bad answers get deleted alongside with them. Problem solved! :) Feb 17 '13 at 9:25
  • @ShaWizDowArd If someone asks a bad question, it is explained to them in comments why is it bad. If they doesn't improve the question, it is eventually closed. Seems that we live a different world ;)
    – yo'
    Feb 17 '13 at 16:16

Yes and no.

If in fact the basic premise of the question is flawed, then the correct answer is "actually, nothing is wrong here". It's the only valid answer that can be given, as it is the truth.

Ideally, of course, such an answer would also be able to inform the OP as to how they misinterpreted their results, or perhaps how they could have misconfigured their system to get different results. This would have to be part of the answer in order for the answer to actually get an upvote from me.

That's my view within the scope of a posted answer.

However, the only scenario in which this makes sense is where an OP has posted a localised debugging question. "What's wrong with my code?" or "My code doesn't work". These are not okay on Stack Overflow and, as such, the question should be closed with no answers given at all.


No, however:

Comments are a poor place to provide proof of working, like console output, mixed code and commentary, etc.

It depends on context. I don't blindly mark them as non-answers, because dense, code-ridden comments are tough to deal with, and such non-answers may have value.

  • 1
    It might be a good idea to make such answers CW to show that you know that it doesn't answer the question.
    – yo'
    Feb 16 '13 at 15:26
  • @tohecz In general I agree. Feb 16 '13 at 15:52
  • @tohecz: I don't think it is the intended use of the CW, though...
    – nhahtdh
    Feb 16 '13 at 19:52
  • @nhahtdh It is probably not. But sometimes you need to post a "comment" that is just too large or complicated for a comment. This is the only way how to do so (or do I miss something?)
    – yo'
    Feb 16 '13 at 23:20
  • @tohecz I don't think the community at large flags non-answers that provide value, CW or not. I replied in haste; I'm not sure making a non-answer as CW really helps its cause much. Feb 17 '13 at 1:06
  • @DaveNewton It probably depends on which site you are on. It surely works at TeX.SE, but it may be caused by the fact that many things work differently at TeX.SE considering "good" and "bad".
    – yo'
    Feb 17 '13 at 8:27

You must log in to answer this question.

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