-11

Here is the problem:

  1. You begin to write a question, and you include your issue / non-working code

  2. You find the answer in the meantime, and you use the "Answer your own question – share your knowledge, Q&A-style" feature.

  3. Then you realize it makes no sense anymore to post the wrong non-working code in the question itself, because you have working code in the answer! And non-working code would be visual pollution because it's pointless: you have the answer already.

  4. You post it, and you get downvoted because people think "It looks like you want us to write some code for you" (which is obviously wrong -> other criticisms can be made, but not this one).

More generally, I feel that the "Answer your own question – share your knowledge, Q&A-style" philosophy is generally not welcome on Stack Overflow. Why?

In my self-answered question I really wanted to share the effort of searching for the answer, finding the right answer (okay, it was in a blog, but it took time to find the relevant one, and I had to slightly modify the code to make it work), and post it for future reference, for other people.

I have no other interest. (If it was possible, I would be okay with no voting on self-Q&A, to show that it's not to gain reputation).

Please believe me that was really done in no other interest than future reference.

11
  • 8
    Why do you remove your code from your question? If that is the most obvious way to do X, but it doesn't work, by all means, include it; it helps providing context. When a 'normal' question is answered, how many OPs remove their non-working-but-now-fixed code from their question?
    – Glorfindel
    Commented Jan 6, 2017 at 11:34
  • @Glorfindel : it was long code because tkinter code always takes some space (much visual pollution), wrong, and really provided no interest, once you know the answer.
    – Basj
    Commented Jan 6, 2017 at 11:36
  • 1
    But if you hadn't known the answer, you'd still have to include the code in order to be helped (otherwise the question would've been closed as 'no MCVE').
    – Glorfindel
    Commented Jan 6, 2017 at 11:38
  • Yes @Glorfindel. But that's precisely the problem I have here with self Q&A, that I wanted to discuss here. Because it's self Q&A, does really making up a wrong code make sense?
    – Basj
    Commented Jan 6, 2017 at 11:39
  • 5
    Writing self-answered questions is hard. And I have only N=1 experience with it.
    – Glorfindel
    Commented Jan 6, 2017 at 11:41
  • 4
    I would be okay with no voting on self-Q&A, to show that it's not to gain reputation The purpose of voting is to indicate/control the quality of posts on the site. If you don't want rep from self-Q&A that's one thing but we shouldn't remove the ability to vote on them.
    – BSMP
    Commented Jan 6, 2017 at 15:40
  • @Glorfindel I can understand that people disagree with this meta post. But I don't understand the massive downvote. Everything I did (the original SO question and this meta SO question) was done with the only goal of sharing information. Why such a result? There's sometimes something I don't understand about internet psychology.
    – Basj
    Commented Jan 6, 2017 at 20:26
  • 1
    IDK, I didn't downvote. Recommended reading: Why are votes on Meta so passionate
    – Glorfindel
    Commented Jan 6, 2017 at 20:27
  • @Glorfindel Good reading indeed.
    – Basj
    Commented Jan 6, 2017 at 20:38
  • 1
    @Basj You say: "you feel that the ... philosophy is generally not welcome on Stack Overflow.". Yet surely you're aware that this question references an anecdotal sample size of one. Furthermore, you're being selective in your sample because I see you have at least one other self-answered question which has upvotes on both question and answer. Commented Jan 7, 2017 at 8:45
  • @CraigYoung I have experienced the same another time, and I even deleted the question (IIRC?) because of the DV and the comments were really rude. Really, I do feel (ok it's opinion-based) that there is a presumption of culpability when self Q&A. According to these 2 examples, people react very fast, in a very agressive manner: very negative comments, DV, while my only interest was posting for future reference. Lesson learnt: I won't self Q&A again, and I will post my working question+solutions somewhere else (personal blog, instructables, etc.)
    – Basj
    Commented Jan 7, 2017 at 10:31

1 Answer 1

9

Because it's self Q&A, does really making up a wrong code make sense?

No, but you're not fabricating an MCVE solely for the sake of having an MCVE here. Most fabricated ones are pretty obvious and really should be edited out because they do serve as nothing more than a distraction — if it's not obvious and otherwise indistinguishable from a real MCVE that fully demonstrates and supports a real problem description, then it serves its purpose just as well as the real code example.

You had code that didn't work prior to finding your solution; why not leave it in for context? Remember that the question has to stand on its own regardless of whether it has a self-answer.

20
  • 1
    Aside from that, the supposition made in the question is that posting the non-working code would just create pointless noise/distraction. I don't think that's necessarily true. Often, seeing the process of transformation from non-working to working code can be very instructive, both in a purely educational sense and also in adapting a similar Q&A to a specific problem you're experiencing.
    – Cody Gray Mod
    Commented Jan 6, 2017 at 11:47
  • Thanks for your answer, which makes sense. What should I do with this now? All I wanted is to share the result of the time I spent, and now here's the result. This makes me a bit sad... Once again, if it was possible, I would be okay with no voting on self-Q&A, to show that it's not to gain reputation. Future reference (for myself and other people) was my only goal.
    – Basj
    Commented Jan 6, 2017 at 11:49
  • @Cody Gray: Yeah, non-working code isn't inherently a distraction. It's when said code is irrelevant to the problem at hand that it becomes a distraction. You know how some users resort to posting code blocks filled with gibberish or boilerplate code to trick the quality filter? That's basically what it amounts to. See also meta.stackoverflow.com/questions/286757/…
    – BoltClock Mod
    Commented Jan 6, 2017 at 11:49
  • 1
    @Basj: If you don't think it's too late to edit your question, do so.
    – BoltClock Mod
    Commented Jan 6, 2017 at 11:51
  • Look at this comment for example: it makes no sense at all, it's a criticism which is oviously wrong. It gets upvoted... My question+answer get downvoted...
    – Basj
    Commented Jan 6, 2017 at 11:52
  • Last thing: if you have ideas to share about More generally, I feel that the "Answer your own question – share your knowledge, Q&A-style" philosophy is generally not welcome on Stack Overflow. Why? I would be interested.
    – Basj
    Commented Jan 6, 2017 at 11:53
  • 4
    @Basj: Yes, because your question is nothing more than a one-liner with a direct question. Anyone posting that sort of question is going to come off as asking the community to write code for them. Regardless of whether there's a self-answer below.
    – BoltClock Mod
    Commented Jan 6, 2017 at 11:53
  • 2
    @Basj: Not welcome? Oh how I beg to differ.
    – BoltClock Mod
    Commented Jan 6, 2017 at 11:55
  • But but because it's self-answer, come off as asking the community to write code for them is obviously wrong. Why do such comments appear on self-Q&A and once, more, isn't there a philosophy problem about self Q&A on SO? (Presumption of culpability...)
    – Basj
    Commented Jan 6, 2017 at 11:55
  • 2
    @Basj: Because people have tunnel vision and insist on evaluating questions absent of context, making their comments seem out of place. Good theory, poor implementation.
    – BoltClock Mod
    Commented Jan 6, 2017 at 11:57
  • @BoltClock People are supposed to evaluate the question and the answer separately. We don't want them to vote on the question based on the quality of an answer it has. If the question merits a downvote when looked at in isolation then it's not a good question and the votes should reflect that. It's the people that go around upvoting extremely low quality questions just because the author posted an answer that are much more problematic.
    – Servy
    Commented Jan 6, 2017 at 18:09
  • 3
    @Servy: Yes (that's why I said good theory), but you can still avoid looking like an idiot by at least acknowledging the presence of a self-answer while still evaluating the question independently of it. Something like "Note that having a self-answer does not exempt your question from our quality standards."
    – BoltClock Mod
    Commented Jan 6, 2017 at 18:12
  • @Servy It seems that people don't evaluate question and answer separately. The answer I posted here is probably not the best answer in the world, but it doesn't deserve -2. 1) It states the source (so I don't claim authorship) 2) It contains code, originally coming from the blog, modified to make it work with nowadays versions and to show only the core of the problem (simplified code) 3) It contains a few comments. Obviously people downvoted it because of the question... It's a bit sad, because I really posted with the most positive attitude.
    – Basj
    Commented Jan 6, 2017 at 20:23
  • 2
    @Basj You feel that it's not a good answer, and are surprised that it's downvoted? If you think it's not a good answer you should expect it to be downvoted. If it's not a good answer we want it to be downvoted. You provided a low quality answer, two people indicated that it's not a quality answer. The system works, huzzah. And considering that the post even got comments explaining what was wrong, and that they said nothing about the question, there's pretty compelling evidence that they voted based on the answer, not the question.
    – Servy
    Commented Jan 6, 2017 at 20:25
  • 1
    @Basj The entirety of your explanation in v1 of your answer was: "Here is working solution, slightly modified to make it work (some function was deprecated)". Apart from the reference link, that explanation is wholly uninformative. You've made some small improvements, but still don't explain what function was deprecated. Still don't give any clear indications as to what solves the problem. The code has a bunch of magic numbers in it; presumably unimportant code that merely sets up a way to demonstrate the solution - but this emphasises the problem. Commented Jan 7, 2017 at 8:25

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