33

I think I'm not getting the distinction between opinion based questions well.

  • Currently this question is not closed

  • Currently this question is closed

They both ask if a thing is a bad practice, but what makes these 2 questions live differently? I think the questions have the same nature, even their answers are different.

Is the actual answer count a factor to determine if a question is opinion based?

11
  • 1
    One could make it (sound) less opinion-based by asking "Why is it bad practise…?"
    – Bergi
    Commented Nov 4, 2015 at 13:43
  • 13
    Meta effect: Now they're both closed. Commented Nov 4, 2015 at 15:09
  • @Two-BitAlchemist: Is [On-Hold] same as [Closed]? I can still see the first one only [On-Hold] while second is [Closed]. Commented Nov 4, 2015 at 15:57
  • 1
    @displayName I think the difference is the description of the close reason has been changed. It says "on hold" on the one that was closed 1 hour ago (it has two "reopen" votes now). The "closed" one has been closed since 2014 and has no reopen votes. In both cases the question was moderated by 5 people with sufficient rep casting "close" votes. Commented Nov 4, 2015 at 16:16
  • 6
    @displayName Really, [On-Hold] is the same function wise as [Closed] for the most part. A question is "On-Hold" when it's first closed, and after a few days (I think three?) it becomes "Closed" instead. It's really mostly just a wording thing, to try to make closure of questions seem less like a dead-end for new users.
    – Kendra
    Commented Nov 4, 2015 at 17:52
  • 5
    @Kendra: Five days; once a question is marked Closed edits no longer automatically push it back into Reopen. Commented Nov 4, 2015 at 18:06
  • @NathanTuggy Thanks! I knew there was something slightly different between them, just couldn't remember what.
    – Kendra
    Commented Nov 4, 2015 at 18:14
  • Relevant: meta.stackoverflow.com/q/302628/1394393. Dunno if it's a dupe or not.
    – jpmc26
    Commented Nov 4, 2015 at 21:54
  • 2
    I suppose the first question could be edited to say, "What are the problems I might encounter if I catch Throwable?" instead.
    – doubleDown
    Commented Nov 5, 2015 at 2:23
  • Instead of asking "Is X bad practice?", ask "In my use case, is it correct/safe/etc to do X?". It may or may not be opinion-based, but you'll get much better answers. Commented Nov 5, 2015 at 17:11
  • @JeffreyBosboom - If the question can provide an objective measure for "correct/safe/etc" or if it was worded as "In my use case, would X cause Y", it would not be opinion based.
    – BSMP
    Commented Nov 5, 2015 at 19:20

6 Answers 6

26

What sets these two questions apart is the specificity of the question that is being asked.

First, in Java land, catching Exception is frowned upon. Catching Error is both frowned upon and outright dangerous. Catching Throwable is often considered a fireable offense and one of the worst things you can do unless you have good reason to do so. Then, you get into the Spring Framework's innards and discover catch(Throwable e) strewn about the framework, so the logical question is "WTF?".

Whether or not you should catch Throwable is objective and can be objectively answered. I would prefer if any of the linked answers could have explained when doing so would be practical, since I'm left with the lingering question, "But why would Spring do it and ignore the doggone thing!?"

The second question - if it's bad practice to use recursion in a constructor - fails on two counts:

  • The question is open-ended; there's no logical explanation as to why you'd want to recurse on that specific problem
  • The problem suffers from the halting problem flaw; you have the potential to new up so many instances that it doesn't make a lick of sense to do any of this logic in a constructor at all

The latter point is the stronger one; we've already moved away from the problem posed at hand and arrived at another: why would you do this?? Why does this make sense to do? What are you trying to accomplish?

That makes the question subjective, and it can't be objectively answered, since the better solution would be, "Don't do that, use a factory method instead if you insist on recursion." But hey, that's a subjective answer.

19
  • 15
    So you're saying that an opinion based question isn't opinion based if lots of people share the same opinion? Sorry, but that's not how that works. That one opinion is much more common than another doesn't make the question any less opinion based.
    – Servy
    Commented Nov 4, 2015 at 4:59
  • 7
    @Servy: There really is an objective answer as to why catching Throwable is discouraged. There's no opinions to be had here; there's straight talk about why doing this is bad in practice. There's also room to explain why one might want to do this in practice as well. I see no opinion here.
    – Makoto
    Commented Nov 4, 2015 at 5:08
  • 1
    Yes, you can objectively state what people's opinions on the subject are. The fact that it's an fact that you (or even lots of people) hold a given opinion doesn't make the question not opinion based. It's the opposite in fact; it's what makes it opinion based. If someone asks, "What's better, apples or oranges?" you don't say that it's not opinion based just because you can objectively say that you like apples better.
    – Servy
    Commented Nov 4, 2015 at 5:15
  • 7
    @Servy: I maintain that there are clear and concise consequences from writing such code. Everyone may have an opinion on how to deal with the result, but the question itself isn't opinionated. There are very clear and legitimate reasons why you mustn't, and there are certain times when it makes sense to. Teasing that nuance out in an answer is important for someone that may be writing the next big Java framework who is suddenly forced to catch Throwable. Locking that knowledge up because it seems opinionated really defeats a lot of the purpose here.
    – Makoto
    Commented Nov 4, 2015 at 5:22
  • Again, you're not saying that it's not opinion based, you're saying that it's an opinion that you just want to share even though it's an opinion. If you think that opinion based questions should be on topic, you can propose a polity change to that effect (just realize that it's been proposed hundreds of times, you should be prepared to bring something new to the table). But saying that this question isn't opinion based because you enjoy sharing your opinions on this topic, and another question is opinion based because you find the opinions uninteresting is completely inappropriate.
    – Servy
    Commented Nov 4, 2015 at 5:26
  • 3
    @Servy: Help me understand then; what's the specific opinions being held about catching Throwable? I've perused that question and I don't see anything in it (or the other questions just like it) that is entirely based in opinion.
    – Makoto
    Commented Nov 4, 2015 at 5:29
  • 1
    The opinion is whether or not it's actually a good idea to catch Throwable. You can list all sorts of facts about what happens when you do it, but to conclude whether or not its a "good idea" is purely an opinion. And, as I said in my answer, if you choose to read the question as, "tell me every good and bad thing about catching Throwable", as you're pretending the question reads by ignoring the fact that it's only asking for an opinion, then that just makes it, "Too Broad".
    – Servy
    Commented Nov 4, 2015 at 5:33
  • 5
    @Servy: Perhaps this is a case of Good Subjective, Bad Subjective. I still say that there are objective and clear reasons why catching it is a good idea, but I'd rather not mire either of us any further this evening.
    – Makoto
    Commented Nov 4, 2015 at 5:38
  • 15
    I vote to close this discussion since it is opinion based.
    – Keppil
    Commented Nov 4, 2015 at 14:12
  • 2
    I think this answer is fascinating in light of the specific question at hand, but does little to answer the general nature of the OP's inquiry. Commented Nov 4, 2015 at 15:00
  • 1
    @Two-BitAlchemist: My intent was to draw attention to the actual question matter as opposed to the phrasing. I can make that more explicit when I have a bit of time later.
    – Makoto
    Commented Nov 4, 2015 at 16:39
  • 4
    @Servy: Looks like there's a link to the same blog post here on SO. It's network-wide guidance. Commented Nov 4, 2015 at 18:09
  • 3
    The answer you just posted is highly useful, and almost certainly the type of answer the poster is seeking. The site would be better off with that answer than with the question closed. What is "subjective" is the line between "objectivity" and "subjectivity." Rather than deny this fact and live in mortal fear of "opinion," moderators should accept that sometimes judgment is involved in the distinction. Neither of these questions is likely to generate fruitless debate. They are likely to generate answers like yours. They should both remain open.
    – Jonah
    Commented Nov 4, 2015 at 22:42
  • 1
    @Makoto, Your certainty, imo, stems from thorough indoctrination in the absurd rules of SO moderation. I am questioning the rule itself, not arguing about whether the close is correct application of SO mod law. A foolish consistency is the hobgoblin of little minds -- this should be motto of SO meta, and incorporated into the logo.
    – Jonah
    Commented Nov 4, 2015 at 22:48
  • 2
    A question can still have an objective set of right answers, even if it lacks a convenient single one line answer. Neither of the example questions above should be closed, because they are seeking objective answers to real technical problems. Asking if it's bad practice to use recursion in a constructor can be answered objectively by explaining, in detail, the technical implications of using recursion in a constructor. If that's objectively a bad idea, then instead of closing the question, comments should be used to clarify the question, then answer based on the use case. Commented Nov 5, 2015 at 10:09
16

The only difference here is that people enjoy debating the first opinion based topic, and apparently they don't enjoy debating the second. Of course, the fact that people love to debate these opinions is exactly why we don't want these opinion based questions in the first place.

Questions in this form are virtually always Too Broad as well, particularly when people try to be clever and phrase the question something along the lines of, "What are the pros/cons of doing X?" in a futile attempt at hiding the fact that the question is opinion based. Such refactors just make it clear that describing everything about a particular pattern (or whatever) is just not an appropriate scope for an SO question.

5
  • 11
    To the letter of the law, I think you're right. However, I suspect there's some pragmatic close-voting going on. We might not close, "Is it bad practice to ignore variable scope and declare everything global?" because the community expectation would be a swift and resounding "NO" without too much disagreement. It's the questions with a long list of 25 overlapping and somewhat contradictory answers 'opinion-based' is supposed to avoid. Commented Nov 4, 2015 at 15:08
  • 9
    @Two-BitAlchemist "NO"? Oh man, I've got a lot of scoping changes to make to all my code.
    – Rich
    Commented Nov 4, 2015 at 16:42
  • @Rich, no leave them as globals, that way you don't need to change function signatures when you have changing requirements. Everyone knows globals are better!
    – dave
    Commented Nov 4, 2015 at 23:17
  • I find most practical questions about a specific implementation detail of a language or library do not create opinion-based arguments despite their potential too. The whole point of the Too Broad and opinion rules on SA was to remove fanboy which sports team is better type questions. But lately these rules now stifle productive, pertinent questions where right (but nuanced) answers exists. Eg. asking how to think in Angular vs jQuery is subjective, but the answer it produced is useful: stackoverflow.com/questions/14994391/… Commented Nov 5, 2015 at 10:32
  • @Kelseydh If you want to propose that the "primarily opinion based" and "too broad" close reasons be removed because you think that it's useful to have those kinds of questions, then go ahead and propose that. This question is asking why two questions that are both equally opinion based weren't treated the same way, and the answer is, "they shouldn't be". If you think that the close reason should be removed/changed so that it doesn't apply to either, then make that proposal.
    – Servy
    Commented Nov 5, 2015 at 13:56
8

Whether they're too opinion based or not, they don't seem like they belong on Stack Overflow. From the Help Center:

What topics can I ask about here?

Stack Overflow is for professional and enthusiast programmers, people who write code because they love it. We feel the best Stack Overflow questions have a bit of source code in them, but if your question generally covers…

  • a specific programming problem, or
  • a software algorithm, or
  • software tools commonly used by programmers; AND is
  • a practical, answerable problem that is unique to software development

If a question isn't about an algorithm or a tool, then it's supposed to be a problem. What problem is in the question, "Is X best practice"?

Meanwhile, Code Review specifically states that, "Does this code follow common best practices?" is on topic on their site. Granted, they don't want general questions about best practices there but if you have working code that you want checked for best practices, there is a site where that is unambiguously on-topic.

3
  • "What problem is in the question, 'Is X best practice'?" The problem is in not knowing whether X is best practice for their use case. Of course, few of these questions actually state the use case.
    – BoltClock Mod
    Commented Nov 5, 2015 at 2:18
  • As far as I'm concerned, many best practices questions, when narrowly targeted by subject, actually do fall under the definition of being "a practical, answerable problem that is unique to software development." When the question asked invites a debate more akin to which sports team is better, then it's fair to call it opinion based. But if a question very clearly targets a specific subject/language related to programming, and asks with clear intent what objective facts about the practice they should be aware about, then the question shouldn't be closed for being broad or "opinion based." Commented Nov 5, 2015 at 9:45
  • 2
    @Kelseydh In the latter case, what prevents the person asking from actually proposing a use case to narrow the scope to something more appropriate? I don't think "because a consensus will be easily found" should excuse a low-quality question.
    – millimoose
    Commented Nov 5, 2015 at 14:50
7

You may not find a sharp, clear line here. The topic of good and bad practice is by definition fraught with opinion, and whether it is truly 'too opinion-based' (keyword highlighted) comes down to whether or not there is concensus. In other words, you have to know the answer to make the determination.

While this is hard for questioners, there is an optimistic side of this. Namely, if your question about good/bad practice is swiftly closed as opinion-based with loads of comments, that may well be your answer. There is no settled opinion on the topic. Of course, it may also be that several people StackOverflow is not the place for such a discussion. As the close reasons and help files note, such discussions just don't fit our format well. They may be better left to traditional fora and mailing lists with more specific interest in the topic.

2
  • So what does a questioner see when their question is closed like this? I imagine it could be quite demoralising. Maybe an explanation like your answer would be a good thing to show.
    – z0r
    Commented Nov 4, 2015 at 22:39
  • @z0r You can see the message on the first question in the OP. It reads: "put on hold as primarily opinion-based by [list of 5 close-voters & timestamp] Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question." Commented Nov 5, 2015 at 3:30
4

It always is. Why? This is why

enter image description here

4
  • 1
    If that's the case, and there are questions which are still objectively good that are phrased poorly, would a change in wording suffice enough to bring it back to standards?
    – Makoto
    Commented Nov 4, 2015 at 22:32
  • 2
    Best practices aren't closed on SO because they give people an excuse to not think. They cause a lot of harm in the world because they cause people not to think. They're closed because they're opinion based (even when being discussed by people trying to use the space between their ears). The fact that they're usually used so poorly and don't result in useful content is why they often should be (but never are) downvoted.
    – Servy
    Commented Nov 5, 2015 at 1:12
  • @Servy I'm sorry but that's a little pretentious if you ask me. In almost every single profession, whether that be engineering, medicine or policing, you will find people with senior talent who excel by developing useful, mental heuristics about what patterns and thought processes should be used in approach to a given problem that produces for them good results. No human can ever learn everything there is to know, so by necessity "best practices" and heuristics are needed for people to make up that gap. Commented Nov 5, 2015 at 10:40
  • @Kelseydh I said they're often used poorly, not exclusively used poorly.
    – Servy
    Commented Nov 5, 2015 at 13:52
1

Closing questions as opinion-based is something you should be careful about. There are many perfectly valid questions regarding best practice, which are of great interest to a lot of people.

Even if something may seem subjective, usually there is an "industry de facto" way of doing something. So even if a question can yield subjective answers, there is usually one correct de facto way which is widely regarded as correct.

A question which yields an answer describing the "de facto" standard way of doing something is valuable and objective.

Been forever since I coded anything in Java, but it seems to me that the "catch throwable" question is a perfect example of the above. The correct answer in this case seems to be "never do that, because...".

Now if someone feels like they should come up with a different answer, then the problem isn't really with the question, but the answer. If there is a good question and a good "de facto standard" answer, and then someone else comes in and posts a crap answer, then where is the actual problem?

There are always SO fundamentalists who are eager to close the question when this happens. Don't be so eager to jump on that bandwagon. Consider simply down-voting obscure answers and up-vote good ones instead.

Here is another example of a question which in itself seems terribly subjective, yet has ended up as one of the canonical duplicates for C and C++. It is a question of interest to pretty much every single programmer, and there is a de facto standard answer (always avoid global variables unless you have very good reasons). The question has yielded some nice canonical answers, but also a lot of crap answers. The problem is not with the question, it is with the crap answers.

Overall, I think such questions would benefit from getting turned into community wiki and then have the answers cleaned up.

8
  • The fact that an opinion is common in no way makes the question "not opinion based". And the fact that a question tend to attract lots of crap answers is in fact a strong indication that it's a crap question. That it doesn't exclusively attract crap answers doesn't change that. Yes, discussing opinions can be a helpful thing to do; that doesn't mean it belongs on SO.
    – Servy
    Commented Nov 4, 2015 at 15:29
  • I only consider best practice questions ok if they can be edited to become a good "How do i do X?" question.
    – Kevin B
    Commented Nov 4, 2015 at 15:37
  • @Servy So if I pick any random question on SO and go post 10 crap answers to it, the question automatically turns bad?
    – Lundin
    Commented Nov 4, 2015 at 16:05
  • @ServyThe whole point I'm making here is that what you might consider as opinion-based, could actually be a question to which there is just one best practice. Lets say we recruit a bunch of philosophers as diamond mods. They would take your line of argumentation to the extreme and say that everything you experience with your senses is subjective, because there is no way for you to know if your senses are correct or inaccurate. And therefore insist that every single post on SO gets closed as subjective. Which isn't very helpful. -->
    – Lundin
    Commented Nov 4, 2015 at 16:06
  • For each post you have to measure the practical use of the question/answers versus subjectiveness. If the practical use for the programming community greatly outweigh subjectiveness, then don't close the question.
    – Lundin
    Commented Nov 4, 2015 at 16:06
  • 2
    I didn't say that. I said that having a lot of crap answers is a strong indication that it's a bad question.
    – Servy
    Commented Nov 4, 2015 at 16:07
  • The fact that a lot of people share a given opinion doesn't make it "not an opinion". Your analogy is also simply false; plenty of SO question can be objectively answered, even considering that human senses aren't reliable. Whether the objective answers to those questions actually solve real world problems is what you can't prove. But you can say, objectively, and conclusively, that 1+1=2, regardless of how reliable your senses are, because it's a statement that's true by definition.
    – Servy
    Commented Nov 4, 2015 at 16:10
  • This is particularly true in framework communities like Ruby on Rails, where even in their own documentation it is stressed that programmers should follow the opinions of others.. ie. convention over configuration. The hardest part of mastering any profession is understanding the unwritten knowledge that comes with it. Many opinion laden posts on Best Practices help people to bridge this very crucial gap in their career. I rarely ever see opinion flame wars break out on these type of questions either, which was the original intent behind the rule against opinions in the first place. Commented Nov 5, 2015 at 10:43

You must log in to answer this question.

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