14

StackOverflow has a policy about opinion-based questions. They are closed to improve the quality of the website, and that's OK.

But then, there are the perfectly valid questions with people answering, but inside their answer, they write down their opinion without it being requested at all.

For instance, the question "Multiple open and close curly brackets inside method. - Java" is totally acceptable and doesn't ask for opinion in any way. Yet the top 3 answers are clearly indicate the opinion of their poster.

Accepted answer:

[...] I wouldn't do it normally.

[...]

However, I wouldn't recommend doing this. IMO, it better to use different variable names [...]

Second answer:

[...] IMO it's bad style and should be avoided [...]

Third answer (even goes cynic to prove his point):

You can create scopes within functions, and some people think this organizes their code. These same people are currently unemployed.

So are these kind of answers tolerated? Should I edit them to remove the opinion-part? Should I simply downvote?

I personally don't think I should downvote because the answers actually do answer the questions. The opinion of their posters just appeared out of nowhere based on nothing.

31
  • 44
    If the question is "how do I do X?" then answering "this is how you do X, but it's a bad idea because..." is totally acceptable. Answers that only say "you shouldn't do X" tend to get downvoted - often unfairly, IMO
    – Pekka
    Commented Nov 30, 2015 at 14:13
  • 25
    Answers the question and gives recommendations on best practices/standards in that language (regarding the question asked)? Seems like a winner to me
    – codeMagic
    Commented Nov 30, 2015 at 14:23
  • 5
    The accepted answer attempts to explain why its not done, the second is barely an answer (imo) and the third deserves to be flagged as its a glorified comment. I don't mind seeing opinions in answers as long as they're backed up with factual information. I'd have written this as an answer but it seemed a bit ironic to give an opinionated answer here..
    – Sayse
    Commented Nov 30, 2015 at 15:08
  • 2
    @VinodMadyalkar It is an opinion. Saying that you don't think it's a good idea isn't an objective fact about the code, it's your subjective opinion of it. Whether or not something is a good/bad practice is an opinion.
    – Servy
    Commented Nov 30, 2015 at 15:36
  • 1
    @VinodMadyalkar I didn't say it's wrong to include it in the answer, I'm just saying that it is an opinion. Saying that you are okay with this opinion being added to the answer is one thing, saying that it's an objective fact (when it's not) is quite another.
    – Servy
    Commented Nov 30, 2015 at 16:39
  • 3
    I believe you've analyzed this question incorrectly. You say that it doesn't solicit an opinion in any way, and yet all of the answers are primarily opinion-based. The fact that the question has attracted primarily opinion-based answers suggests it's a good target for that close reason, since that's what it's intended to prevent. (In this case it didn't get swampy or spammy because the opinions are largely homogenous.) Even if the OP didn't know it, this was an implicit "Is this bad practice?" question, which is a solicitation of opinions. Commented Dec 1, 2015 at 16:09
  • 4
    @Pekka웃: I actually really want to downvote the hell out of answers that reply to "how do I X?" with "don't do X". If you know how to do something, and you're posting an answer, then you better be explaining how to do it. Or if it's impossible, you better be explaining why. Nothing is more irritating than an "answer" that dismisses your question because the person treats you like a child who can't possibly know better. Once you've answered their question then you can feel free to crucify them for even thinking of asking you, but you still need to include an answer in your answer regardless.
    – user541686
    Commented Dec 3, 2015 at 8:46
  • 1
    @Pekka웃: Who cares if some of the OPs are kids? A lot of them are also adults, i.e. not kids. It's bad because you're treating them as too dumb to judge things for themselves. It's basically a smug mark of your own superiority when you know the answer but you instead deny them the information. What makes you think you're any better or smarter than them for judging what the right action is for them? If you think doing something is wrong, then tell them, but at least answer their questions in your answer and let them think for themselves. OTOH if you don't want to answer it, then just ignore it.
    – user541686
    Commented Dec 3, 2015 at 9:07
  • 1
    you're treating them as too dumb to judge things for themselves well, people come here to learn, and that other people might know something that you don't is.... kind of a part of it, don't you think? And telling them that they have the wrong idea is actually treating them like adults. Some of the most meaningful learning experiences I've had on SO (if not all of them) were questions where I asked "How to do X" only to be told that it's a bad idea.
    – Pekka
    Commented Dec 3, 2015 at 9:12
  • 2
    @Pekka웃: No, I'd tell them it's provably impossible because HTML is not a regular language. If I'm in the mood then I'll prove it for them; if not then I'll try to find them a link. I didn't say you need to do the impossible; if it's impossible, then you just say so. If it's possible then you tell them how, and then you give your opinions on it.
    – user541686
    Commented Dec 3, 2015 at 9:13
  • 1
    @Mehrdad there's a trillion localized real-world pieces of HTML where it is both perfectly possible, and requires less code/effort than using a proper library. I've done it myself. It's just not a good idea in the long run. By requiring us to not say something when we see someone doing something stupid (and hence treating them like children instead of adults!) you're actively suppressing a huge part of why these sites are as great as they are.
    – Pekka
    Commented Dec 3, 2015 at 9:14
  • 2
    @Pekka웃: Well yes, in that case then I'd tell them how to do their localized version of it and then in big bold letters I'd tell them it's a bad idea. I don't know about you, but the most meaningful experiences I had here were those in which people didn't refuse to answer my question because they thought they knew better than me, but rather gave me the answer anyway and made me learn by trying. And yes, there were cases in which they were wrong, too. Nobody's saying you shouldn't teach them the right way to do things; I'm just saying you also need to answer their question in the process.
    – user541686
    Commented Dec 3, 2015 at 9:17
  • 3
    @FullyHumanProgrammer: Chill a little, this is the meta site...
    – user541686
    Commented Dec 3, 2015 at 9:17
  • 1
    @Pekka웃: I've self-taught myself a hell of a lot too, I'm saying this from experience. To give you an example that is now a classic for me, every damn time anyone asked a question about some undocumented native NtXxx Windows API, the first answer they got was a nicer version of "this is a undocumented; you will burn in hell if you use it". And then every mob that comes upvotes the answer, which results in the poor guy never solving his problem until some nice soul answers it 2 years later. I've seen these happen to others and experienced them myself, and they're irritating as hell.
    – user541686
    Commented Dec 3, 2015 at 9:42
  • 2
    i think giving an alternative solution is okay. Not giving a solution at all but just saying it's a "no no" - now that's crap. The best thing IMHO is to answer the question plus provide alternative solution with reasoning why it's better. Commented Dec 3, 2015 at 9:46

2 Answers 2

40

Provided that you answer the question in a manner that can be vetted independently of any opinions that you express, there's nothing wrong with expanding your answer based on what you've come to learn through experience. It's still something that you learned and probably want to share.

What makes it seem anecdotal is the fact that three people could go through the same experiences, yet take away three different things from it. That doesn't make the opinion of more or lesser value than anyone else's, it just makes it different.

They don't detract from the answer, some might find the additional coverage valuable, I don't see a problem with it. In my opinion, these extra bits help illustrate the real depth of collective experience we've got on the site.

We're already quite rigid when it comes to what we tell people not to type, I don't want to venture into territory where practical experience becomes taboo :)

4
  • 14
    Intentional irony was intentional.
    – user50049
    Commented Nov 30, 2015 at 15:37
  • 4
    Getting an expert's opinion is part of the beauty of Stack Overflow. But questions that actively solicit very opinionated responses tend not to get those, but rather opinions from every Tim, Dick, or Harry who has something to say. Commented Nov 30, 2015 at 16:18
  • @psubsee2003 I think Olivier addressed that pretty well in his question; when you get dozens of mostly opinion answers, the question is probably the problem. I think he's talking about cases where the question is pretty firmly in objective territory, so I didn't draw a distinction in my answer.
    – user50049
    Commented Nov 30, 2015 at 17:54
  • 7
    We're already quite rigid when it comes to what we tell people not to type, I don't want to venture into territory where practical experience becomes taboo . +1 for this. Practical experience plays a very important part in answers. There might be several different answers to a question but an experienced programmer can say which answers can cause problems Commented Dec 1, 2015 at 5:47
17

Answers don't have the same limitations as questions. The requirements for how to write an on-topic answer only include that it:

  • Answer the question
  • Provide context for links
  • Use correct spelling, punctuation, and grammar
  • Only be posted on well asked questions
  • Follows existing rules on behavior

For example: A question can not request recommendations for a tool to complete a task. However, answers to a question can include a recommendation for a tool, as long as it's not spam and isn't a link only answer.

1
  • +1 for the point I was going to make about the disparity in tool recs. Commented Nov 30, 2015 at 21:50

You must log in to answer this question.

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