-20

Today I started to create a set of generic answers for most common SO questions.

The main reason I want this to be done (by my hands or not) is that it would make closing such questions very quick and simple.

When you see a question asked on SO for the third time in an hour and you have some spare time, please create a generic question and answer so that, in the future, such questions could be easily marked as duplicates.

Here's my first post of this sort:

https://stackoverflow.com/questions/18019523/how-to-sort-an-array-or-collection-in-java/

I know that many questions have such generic answers. But some don't, and I'd love to see the gaps filled.

So, once again, whenever you find a question which is trivial and can't find a valid duplicate to close it, please spend some time and create such question and answer.

13
  • 10
    Why? If it's not a duplicate, why make one? Just give a good answer to the question, problem solved. Aug 2, 2013 at 14:42
  • 2
    In the case of this particular question, plenty of dupe targets are available. Aug 2, 2013 at 14:44
  • @mikeTheLiar not really, because these questions tend to have very misleading topics which are difficult to find later on.
    – Dariusz
    Aug 2, 2013 at 14:44
  • Stack Overflow and sister sites network, AKA Stack Exchange in general; is not a forum, but simply a QnA site.
    – hjpotter92
    Aug 2, 2013 at 14:45
  • 5
    @Dariusz that's why we edit questions. Aug 2, 2013 at 14:45
  • @GeorgeCummins there is none for arrays
    – Dariusz
    Aug 2, 2013 at 14:45
  • 8
    Biggest problem is your "generic question" is just a "gimmie teh codez". Self answering is supposed to have the same burden of quality on both the question & the answer as if it were not a self answer. Aug 2, 2013 at 14:46
  • 9
    Disregarding what you're trying to do: if you post a self-answered question, make the question a good one. The example you've posted is just terrible.
    – Bart
    Aug 2, 2013 at 14:46
  • 2
    This is a good concept, but there will be lots of resistance to it. Aug 2, 2013 at 15:20
  • 4
    I think it's a great idea. The resistance is mostly coming from the fact that you posted a new (crappy) question just to post your answer. Instead, find an existing version of the oft-asked question, clean it up with some edits if appropriate, and post your awesome answer to that question. I'm all for canonical questions, they just have to be done right and in accordance with all of our other guidelines. Aug 2, 2013 at 15:24
  • 4
    Also worth noting that the C++ folks have been doing this, although they did create some brand new questions for it and consequently encountered some initial resistance. Most of that has died down now, as they've improved their questions and demonstrated their utility. If you want to embark on this path, please use what they've done as an example. Aug 2, 2013 at 15:25
  • I'm with @CodyGray & `@Lance on this. I think the concept of providing canonical answers is sound, but I just think the implementation needs work. Aug 2, 2013 at 17:07
  • Related: Canonical answers for repeated questions?
    – jscs
    Aug 2, 2013 at 19:10

3 Answers 3

8

Why? If there's not a duplicate question already, then it's a valid question. Give a good answer. If the question is misleading/confused about the real issue, edit it. Furthermore, if the question is misleading/confused, the asker wouldn't have been able to find the so-called "generic" answer anyway, because they don't know that's what they should be looking for. Stack Overflow is supposed to a repository of real-world programming problems, not a collection of generic programming algorithms - there's plenty of those already.

1
  • Reversal inbound, everyone take cover!
    – user98085
    Aug 2, 2013 at 14:51
6

So, once again, whenever you find a question which is trivial and can't find a valid duplicate to close it, please spend some time and create such question and answer.

I disagree about posting trivial questions. While answers - especially good ones - should contain example code, and sometimes amount to tutorials, questions should not simply be asking for those things. There are a couple problems with such questions, which I will tackle according to relevant close reasons:

  1. Too broad. Asking such basic questions is inviting all sorts of answers, and typically books - or at least a chapter of a book - could be written as a response. The answer you posted is very good, but it sort of illustrates the problem. The bigger problem is that such a question invites lots of such answers, and also debate about the answers, due to their wide-open nature.

  2. Off-topic->No research. Such questions, almost by definition, show no research effort. There is no example code, no attempt made; Just "please tell me how to do this".

Such questions were once quite fine around here, but that was before we were so popular, and got so many question. I'm good with flagging these as duplicates of those older questions, if they still remain.

5
  • 1
    totaly agree those questions can be easily answered using basic tutorials
    – Amine
    Aug 2, 2013 at 14:52
  • 6
    Sorta agree. I agree with your general point that "canonical"-style questions still need to be good, on-topic questions for the site. You can't just throw up crap for the question and let the answer serve as the sole justification for its existence. However, I disagree that we're not here to be a repository for tutorials and example code. I think we certainly are. Depending on the question being asked, really good answers often read as a tutorial. And often have example code. If we had tutorial-style answers to more questions, that would be a good thing, not a bad thing. Aug 2, 2013 at 14:55
  • @CodyGray I sorta agree, back ;) Example code certainly is fine, but I don't think questions should be asking for it, without also showing some effort first. As for general tutorials, sort of the same thought; There are some excellent answers which amount to tutorials. But I still think the question should show some specific problem and attempted solution - so, it shouldn't really be asking for a tutorial. Aug 2, 2013 at 14:59
  • 1
    Sure, that's the same thing I'm saying. :-) I was just quibbling over your wording here. Aug 2, 2013 at 15:06
  • @CodyGray Hmm... maybe that calls for an edit! Aug 2, 2013 at 15:18
1

The so-called generic answers are already taken. I mean, if question is so generic, it could have been posted on various blogs or tutorials. But since blogs can't solve specific problems one could face for implementing the given solution, this site comes to rescue.

However, there can be one valid use case, that you come to know any 'new' problem (chances are because of new/updated technologies). In that case only I think it could be justified to put in 'generic answers'.

2
  • could you elaborate -1 :)
    – Ankit
    Aug 2, 2013 at 14:58
  • 1
    I think generic answers can be fine, and helpful. Although they should be directed toward the problem expressed by the question. The problem here, in my opinion, is questions which ask for generic answers. You are right about the "new" problem thing, provided it is a real problem, and the question shows some effort. +1 because I think I agree with what you've said here. Aug 2, 2013 at 15:01

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