47

I’ve posted a question “Altering the state of a composed class by its composing classes. Is there any rule or principle for not doing so?” which people seem to find as an opinion-based question and decided to have it closed. I tried to improve the formulation such that it assumes that I would think that there might be a rule or a principle which I may not have discovered yet. Somebody who may have the knowledge about such a rule or principle would answer or somebody who dealt with this kind of situations would offer me reasons why not to adopt this approach, if the case suggest so.

I have received some downvotes after editing the question that way, but I don’t understand why. I assume that I may need some better understanding on what opinion-based actually means, because for me it’s quite vague and arbitrary.

My Reasoning

Take the following question as an example: “When should I use GC.SurpressFinalize()?”. Why is this question not opinion-based?

I assume because there is a documentation on which people can do research and find the “correct” answer. What if some people with different opinions write some articles related to this topic? The question responders would use them as a base for their answers. Wouldn’t this increase the range of “opinion-based” answers?

If there would be no such documentation, would that make the question opinion-based? If the inquirer knows that there is a documentation, why wouldn’t they search for it by themselves?

So, they placed the question because they assumed that there might be a documentation with the “correct” answer.


Why is my question different in terms of “opinion-based” classification?

Updates

This "Why is "Is this correct?" an off-topic question, and what should I ask instead?" doesn't answer the question because the discussion suggests that I should do testing whether the code works or not. The code works in both cases. My assumption was that one of the approaches could be standard while the other just a bad decision that I should later return to fix.

2
  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. If you have an opinion you'd like to share, post an answer. Aug 13, 2020 at 7:37
  • Adapting the answer to fit my question, by "testing" I should understand to foresee every possible scenario and compare advantages and disadvantages and then decide between evaluations. That kind of work would unveil the answer making me not having to ask anymore. Regarding my specific case, the answers given are sufficiently satisfying for me and the answer of @Alexei Levenkov covers the broader sense of this meta question.
    – Darius
    Aug 14, 2020 at 10:16

6 Answers 6

48

I have gold badge in C# and I agree with closure as opinion-based. So feel free to ignore this answer as it is clearly biased.

First of all, there is nothing wrong in asking an on-topic question that happens to be closed as opinion-based.

How one decides if a question is opinion-based is that they know that there is no definitive answer and as the question currently stated all variations are equally applicable. There is no requirement for the author of the question to know whether the question is indeed opinion-based and there is nothing particularly wrong about this type of closure for many cases.*

It is naturally hard to know in advance if a given question has a definitive answer (like the one you’ve linked about GC) or all known or suggested options are equally usable and the only criteria is one’s preferences.

About your particular question: generally asking about applying or picking particular design pattern or asking if code follows one of the “good practices” (SoC in your case) does not fare well. A question on Stack Overflow should generally be trying to solve a concrete problem to get a reasonable concrete answer. Trying to fit working code into some non-universally accepted style is essentially asking for opinions.

A way to recover such a question would be to ask about solving the actual problem you have: e.g. “I’m try to do X and I think I need to change my code to use [whatever pattern you want]. While it works, I expect there is a better solution which has [some very concrete criteria]”.

Note that if you don’t have an actual problem to solve, it is pretty much guaranteed to be an opinion-based question. Several other sites on the Stack Exchange network may be more suitable in such a case (check the rules and child meta of each one before asking there):

  • Software Engineering: Some design-level questions would be fine there.

    Very rough guidance:

    • Got a question while editing code? Use Stack Overflow.
    • Staring at a whiteboard? Use Software Engineering.
  • Code Review: Receive critiques of your working code; it’s possible to request feedback on particular patterns.

  • Computer Science: Pretty much never the case if the original question was asked on Stack Overflow, but some algorithm-level decisions may be on-topic there. Design patterns or general OOP questions are unlikely to fit.


*Indeed there are blatant “Do you prefer tabs or spaces” or “Is VS or Vim better for Go” questions simply asked to collect votes. Such questions are likely to collect downvotes in addition to getting closed instantly.

7
  • 2
    "Is this any good" is probably too broad/opinion based for SE.SE (they're going to say "good for whom?", "good for what?" and close it; I'm not sure if there's a way to adapt the OP's question for SE.SE, to be honest), and CR only accepts code that's working and complete, the OP's is neither working nor complete. I'd recommend adding more specific guidance on how to adapt their question to the sites.
    – jrh
    Aug 12, 2020 at 14:51
  • 3
    If the asker doesn't know in advance whether there's a definitive answer, then surely "there is no definitive answer" is itself a useful, non-opinion-based answer?
    – PMah
    Aug 13, 2020 at 11:19
  • 3
    @PMah Sure, just like "no" is a valid answer to "can I do this" questions. Except "there is no definitive answer" is more a response than an answer. So it's more appropriate as a comment accompanying question closure to prevent people from putting forth their opinion as the definitive answer.
    – TylerH
    Aug 13, 2020 at 15:21
  • 1
    "Note that if you don’t have an actual problem to solve, it is pretty much guaranteed to be an opinion-based question"... why? Why is that guaranteed to be opinion based? Sure, if there is no problem to solve it is probably off topic, but why go the opinion based route here when it has no bearing? Honestly, is it going to be pure opinion, because that is essentially the correct time to use primarily opinion based. Just having some inkling of opinion in an answer doesn't make the question off topic.
    – Travis J
    Aug 14, 2020 at 19:37
  • 1
    @TravisJ Many people (or at least once I've seen asking on SO) have hard time to come up with criteria for "better" when there is no concrete problem to solve, it is not impossible just unlikely on average. This leads to random chit-chat questions like "I just read GoF - is adapter better than proxy for me?"... Basically as the Cat said - goodreads.com/quotes/… Aug 14, 2020 at 20:00
  • 1
    @AlexeiLevenkov - The issue I am raising is an issue with giving outlook on the nature of opinions. I agree that without a problem to solve, then there is definitely the argument to be made that a question wasn't really asked. Your example clearly supports discussion and debate, which should be closed. While we don't need questions like that, pigeonholing any question that somehow relates to opinion is a serious issue the exchange is facing. We need to move past the notion that any reference to opinion is the same as asking for a discussion.
    – Travis J
    Aug 14, 2020 at 20:31
  • 1
    For example, preventing any question which includes some form of opinion would lead to questions asking about standard practices for specific instances to be closed. Currently, it is very hard to ask such a question, because so many people incorrectly interpret "primarily opinion based" as "including some form of opinion".
    – Travis J
    Aug 14, 2020 at 20:36
10

Let me explain it to you as an outstanding person even though I'm not familiar with C# and I'm not be able to answer your question in particular. But I am able to see why the close as opinion-based is appropriate in this case.

Basically, The emphasis (the wording) of your question is different than the one you linked.

You say:

"In other words, is it good to define the method that removes an element in a collection inside the class representing the element, considering a composition relationship?

"Is it good to" is a wording which clearly implies an opinion-based answer as the direct answer would be "It is good to..." or "It is not good to...".

Both are opinion-based answer possibilities and hence off-topic.

Also taking into the view: What is "good" exactly? It can stand for a variety of things. What makes one thing better than the other? How do you define "good"?

Should the answerers take a guess about that? As your question now is, they do.

Let's take a look at the exact description of the opinion-based close reason in the Help center:

This question is likely to be answered with opinions rather than facts and citations. It should be updated so it will lead to fact-based answers.

Therefore it makes sense to close your question as opinion-based.

It is just a matter of the exact wording which I wasn't aware of too as I came new to the site.

I recommend everyone who asks for whether one option is better than the other to choose the wording "What is the difference between X and Y?" or "What is the advantage of X/ disadvantage of Y?" than to say "Is X better than Y?".

Asking in this way is on-topic and no one can complain about what you are doing except to maybe provide more background and clarify your concern or show what you already understood or tried so far.

26
  • 4
    One counter to this is that, while I agree that your wording change indeed helps ("what's better" to "what's the difference"), there are absolutely "what's better"/ "is it good" questions that are factual in nature. Off the top of my head, I think security questions can often fall into this category; the main qualifier here is that "better" has clear and defined meaning (eg. more secure), which opinion-closed questions (should) always lack.
    – zcoop98
    Aug 13, 2020 at 15:10
  • 5
    Eg., If someone asks whether X is better than Y, but defines factual, measurable criteria for why one would be "better", that is no longer an opinion-based question.
    – zcoop98
    Aug 13, 2020 at 15:11
  • @zcoop98 I need to disagree. I don't think "better" is directly associated with "more secure" nor has a clear and defined meaning to that. If one wants to ask for whether an item is more secure than another, s/he shouldn't cover it behind the term "better". "Better" is always subjective and with that opinion-based. Such questions should always be closed doesn't matter whether someone provides additional information. Because it can lead to opinion-based answers and such are not suitable for Stack Overflow. Aug 13, 2020 at 15:20
  • How would clearly defined criterion behind "better" lead to opinion based answers?
    – zcoop98
    Aug 13, 2020 at 15:21
  • Wouldn't an answer deviating from the defined criterion into opinion be missing the point of the question?
    – zcoop98
    Aug 13, 2020 at 15:22
  • 1
    @zcoop98 Since when and where is "better" clearly defined to meaning "more secure"? Maybe in an explicit community like security.stackexchange.com but not on generic Stack Overflow. On Stack Overflow "better" can mean a lot of different things. For example, making code more efficient, making it faster, making it more secure, make it to less code. A variety of different things and thus it is to be avoided. Aug 13, 2020 at 15:24
  • 1
    @zcoop98 If someone has provided clear and defined criteria then they don't need (and shouldn't be using) such superfluous terms like "good" or "better". That's like if someone provides specific criteria for wanting code to be exactly 1000 LoC and then calling it "the most beautiful function ever" when someone else might think the same function in 50 LoC is far more beautiful. It's just complicating noise if you have specific, objective criteria.
    – TylerH
    Aug 13, 2020 at 15:26
  • 1
    I was describing a context where better might have a defined meaning within context, not that "better" always means more secure. I apologize if I wasn't clear enough
    – zcoop98
    Aug 13, 2020 at 15:26
  • @TylerH That's completely fair. "Better" is poorly suited to describe your goal if you do have a clear idea of what that is, be it "more secure" or "most efficient" or "best time complexity," etc.
    – zcoop98
    Aug 13, 2020 at 15:28
  • 3
    My intent was simply to say that I feel the appearance of the word "better" in a question is not a conclusive indicator of an opinion-based question, if and only if there's clarification for the intended goal and definition of "better". The lack of defined goal is what spawns opinion answers, not searching for a qualitatively best solution.
    – zcoop98
    Aug 13, 2020 at 15:34
  • 2
    @zcoop98 Well, perhaps in such rare cases where the OP clearly (really clearly) expressed what "better" should describe (and not in the title of course - that is absolutely horrible), it might be on-topic. Regardless, it is still kind of messy and bad practice. But coming back to the question asked, I can't see such clear definition for "better" in there. So the vote to close as opinion-based in this case is absolutely appropriate. Aug 13, 2020 at 15:47
  • 1
    To add a tiny bit, whenever someone says better and then defines better, he may as well leave better out and replaces it with the given definition. Better is as unnecessary as thanks. Editing "better" out can only improve questions. Aug 14, 2020 at 8:06
  • 1
    The question is definitely off topic, because it generates debate and extended discussion as the result of reviewing a code refactoring. However, the pedantic interpretation in this answer is a problem. ""Is it good to" is a wording which clearly implies an opinion-based answer". Who cares? The close reason states PRIMARILY OPINION BASED. PRIMARILY in case you missed it, as in almost all opinion. Not, hey there could be a hint of opinion in here, we better pedantically remove it because there is also the word opinion in the close reason.
    – Travis J
    Aug 14, 2020 at 19:32
  • @TravisJ I share your opinion that the question is opinion-based, no question about it. But I don't understand your complain. I just attempted to clarify why the question was closed as opinion-based as this is what OP ask for here on Meta. --- "Who cares" Obviously OP. --- "PRIMARILY in case you missed it, as in almost all opinion. Not, hey there could be a hint of opinion in here" - I didn't said that there would be only a hint for opinion-based in there. The application of the wording is the reason why the question is overall opinion-based. Hence my argumentation. Aug 15, 2020 at 7:47
  • @Robert - No, I said it is off topic, not that it is primarily opinion based. Simply using a few words to trigger the presence of opinion, and then using that a validation of closure is a huge problem right now. Nothing in your post addresses anything aside from that set of words. Asking "is it good" can lead to factually referenced, experiences based, answers; a trigger phrase shouldn't be a knee jerk reaction to close.
    – Travis J
    Aug 17, 2020 at 17:57
8

Unfortunately, your question was not a good fit for Stack Overflow.

The issue wasn't that the question was primarily opinion based though. The main problem here is that it is too discussion oriented, with many issues presented allowing for a back and forth, and also being extremely context dependent with regards to larger design decisions made outside of those classes (for example, is a DI container being used?). Discussion questions are off topic at SO main; we should refine our close reasons to be more descriptive so that it is clearer to the question asker.

Perhaps this would be a better fit with modification at Code Review (comparing refactored code) or Software Engineering (comparing design outlook).

The "opinion based" closed reason is often misused (often not taking into account that it is only for primarily opinion based posts), and needs refactoring. However, it is used in situations such as this because it seems like the closest fit. In all honesty, it is my most disliked close reason, so don't pay too much attention to the overall state of subjective questions on the exchange, and instead focus more on getting your questions to be capable of receiving answers that have more concrete solutions.

21
  • 4
    The main problem here is that it is too discussion oriented Doesn't that mean it will lead to opinion-based answers? Take discussion questions here on meta. Many of the answers are opinion based, aren't they? The point I'm trying to make is that questions that ask "Is it good to do [so and so]?" are usually closed as opinion based.
    – 10 Rep
    Aug 12, 2020 at 22:12
  • 7
    NOPE. See, that is the problem with "opinion based". Let's say there are two discussions: one between two world experts on how disease spreads and one between two ignorant people on how disease spreads. Are these simply going to be opinions that are shared during the course of discussion? Or, is one group going to have such a strong factual basis and fundamental understanding that what you get instead as a result is discourse? So no, many of the answers aren't going to be opinion based, they are going to be based in fact and expertise.
    – Travis J
    Aug 13, 2020 at 5:00
  • From my understanding, the action of closing the question on the basis that it is opinion-based is itself an answer to the question and the answer suggests that there is no rule, but only opinions. The difference is that this type of answer is definitive.
    – Darius
    Aug 13, 2020 at 6:59
  • 12
    SO is a Q&A format, it is not adequate for discussion between people and by extension neither for discourse nor factual discussion results. "Opinion based" in that regard means even a well-informed expert has to subjectively decide by themselves what the discussion is, what parts of it are relevant, and what is the correct result. For many broad question ("is it good", "what is best") there simply is no single objective answer, and even the most informed expert ultimately has to resolve to personal preference and bias. Aug 13, 2020 at 8:11
  • 2
    @TravisJ But StackOverflow is not for discussion, it is for simple facts. Even if the discussion is fact-oriented, there is no place for it here.
    – 10 Rep
    Aug 13, 2020 at 18:04
  • I never state SO is adequate for discussions, just that discussions are not mainly conducted solely with "opinions". Also of importance, Stack Overflow does not require one single objective answer, it requires that there is a solution which solves the OP's problem, while abiding by the scope of topics set by the site. In other words, while questions must be answerable, they do not need to have only one answer. "Opinion-based" as a close reason coincides with a transition away from quality at Stack Overflow, and prevents experts the opportunity to put forward fact-based, well cited, answers.
    – Travis J
    Aug 13, 2020 at 19:41
  • 2
    @TravisJ Many questions that ask "is x better than y?" are closed as "Needs more Focus".(That is if it is not a duplicate) Here is a filter to prove my point. In other words, while questions must be answerable, they do not need to have only one answer. There are many ways of doing different things, which is why many questions have multiple answers. If each answer said "I like to do this! It's better than [some other method]!", then that's just noise that we don't need, and don't want. Answers should
    – 10 Rep
    Aug 13, 2020 at 23:25
  • 2
    just state facts! Nobody needs someone's opinion about recursive functions, they just want a good answer about the usage of recursive functions.
    – 10 Rep
    Aug 13, 2020 at 23:26
  • Facts! LOVE IT. Love facts. Let's look at em. If the filter you link to (for those not wanting to click, its "which is better closed:yes") shows your point, then the inverse shows you are wrong. closed:no results in 200,000 posts, of which the topmost have several thousand votes.
    – Travis J
    Aug 14, 2020 at 6:22
  • 2
    Let's dig further, past the sort of naive point you made, and into some really interesting facts about Stack Overflow. Stack Overflow, when it is working properly, is relying heavily on experts to share their knowledge. RTFM trended for a long time because experts don't want to just regurgitate documentation, they want to show you how its done so you can be better. Often, they are trying to explain the best method to use. You will find this from famous book authors, to language authors, to renowned professors.
    – Travis J
    Aug 14, 2020 at 6:25
  • 2
    Closing that avenue as "opinion based" is just absurd. You can literally see the decline in expert participation here as a result. It is palpable.
    – Travis J
    Aug 14, 2020 at 6:26
  • Maybe we should replace "what's better" with "what's are best practices" or "what are commonly used approaches and pitfalls to ..."? The second problem is that everyone would be able to answer these questions, not only the experts whose informed opinion one would actually trust but also everyone else. You would also get lots of uninformed opinions. The community seems to be very much set against these questions, although they may be helpful. Maybe have a certain class of questions that only experts are allowed to answer? Aug 14, 2020 at 8:14
  • Or at the very least better guidance how to convert a strongly opinion-based question into a less so, ontopic question. Aug 14, 2020 at 8:19
  • Does it really matter how many people answer? It shouldn't. Where does it say to limit the number of answers? There is a reason that content is made to bubble up. The starting of those sentences shouldn't preclude action, they are irrelevant. What matters is what follows them. "What's better, Python or C++?" is a problem because of what follows. No matter how you phrase that, its off topic because it encourages extended discussion. "What's better, manually managing object lifetime or letting the GC handle it when I need to inject a connection" is not a problem question.
    – Travis J
    Aug 14, 2020 at 19:12
  • 1
    ...appropriate because the question, with its current wording, can lead to opinion-based answers. Whether one answer is more or less opinion-based doesn't matter. The question is on focus, not the answers. Aug 19, 2020 at 11:47
4

Here's what isn't opinion-based but sometimes claimed is: a question with multiple correct, but objective, answers. This question received 2 close votes by high rep users, reasoning the problem raised is "implementation based" - yes, it partly is, and that is a legitimate answer. If a question isn't allowed to have multiple addressable parts, then this and plethora of well-received questions like it need to go.

Going further, any sufficiently-described question isn't matter of "opinion" - surely many don't qualify, yet some that do end up as culprits. This isn't to say "if it's not opinion-based, it belongs in SO", however - another network might do.

3
  • 1
    meh, that's just the difference of whether or not it being primarily opinion based warrants it being closed. Sometimes... usefulness trumps logic.
    – Kevin B
    Aug 12, 2020 at 21:13
  • 1
    @MisterMiyagi Then another close reason must be used, e.g. "lacks clarity/focus", whereas "opinion" implies possible answers to be in subjective nature, which isn't at all the case for the cited question. Aug 13, 2020 at 10:27
  • 1
    It sounds like you have a different Meta question about your own question rather than a response to this Meta question.
    – TylerH
    Aug 13, 2020 at 15:31
-3

Almost every opinion about software can be restated as an objective fact. Opinions like "x is better" or "you shouldn't do y" can be restated as "x delivers these advantages" or "z expresses intent in a way that y does not."

This kind of knowledge is seldom covered in books and classes; rare gems like Effective Java are the exceptions that prove the rule. This kind of knowledge has an enormous quantifiable impact on development and maintenance costs. Therefore, these "opinion-based" Q&As are some of the most objectively valuable content on SO.

The "opinion-based" close reason should be removed. There are no opinion-based questions, only lazy opinion-based answers that can be restated as facts. Comments and downvotes are the mechanism for improving opinion-based answers.

-3

Matters that falls urgent for concretion and clarification in the early days of any discipline's lifetime are the first to be tackled by experts which then establish conventions and rules to stabilize progress. The rest, is to be said that the discipline is not yet sufficiently mature or they are simply not that crucial to be outlined as "required for clarification". Thinking it this way, we could rate the SO questions by counting how many participants are interested in. A question labeled "opinion-based" could be viewed as "there aren't sufficient concerns yet in order for this matter to be tackled and clarified".

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