7

In questions that are asking:

"Which is better option A or option B?"

It seems that several close reasons immediately come to mind:

  • Primarily Opinion Based.

    In many cases the choice between A and B is simply a personal preference, a "6 vs. half dozen", either approach will work just as well and answers to this type of question will be almost entirely opinion based.

  • Too Broad.

    In some cases A is better and in others B is better, to go through every possible use case would lead to too many possible answers or one answer that reads like a short text book.

  • Off-topic, Minimal Understanding, include attempted solutions.

    This is perhaps the the most important one. If the OP needs to know "Which is better", they should probably have tried both and decided which is better, based on a practical trial.

Yet another option would be to downvote and/or comment with a "Try it and find out".

So...

Are there cases when these questions are permissible?

Could we add some more specific guidance in the help center?

Or should we continue to handle these case by case and just downvote/close appropriately when they pop up?

Strongly related, but hopefully not a duplicate of: Strategy for dealing with "which is faster?" questions "Which is faster" isn't the only case where these pop up.

3
  • 2
    Without a point of comparison ("better for X"), these are meaningless questions. These can normally be edited into a "I am trying to achieve X and tried approaches Y and Z. I have constraints A, B and C. How can I achieve X, given these constraints, seeing that Y has shortfalls in N and Z has shortfalls in M?"
    – Oded
    Nov 6 '13 at 17:44
  • 2
    @Oded: You always assume the point of comparison is performance. Everything is about performance. Nov 6 '13 at 17:45
  • 2
    In the past, we would just close as not constructive, and everything would be fine.
    – user215114
    Nov 6 '13 at 17:54
12

These can work if you drop the 'B' in many cases. Take for instance:

Which is better, libfoo or libfoobar? I'm processing 3 million flobs so I want the fastest one

The obvious answer is to, you know, try both with some tests and benchmark them to see which one fits your problem the best. However ...

I'm processing 3 million flobs with libfoo using the following calls, below is my sort, how can I scale this to 5 million without worrying about starvation?

The answer to that might just be, use libfoobar instead. Then you've got a question that leaves people with every take away that the first would, plus more. We know that:

  • libfoo seems to handle 3 million flobs without issue, and we've got some code for that
  • libfoo might not be the best solution for 5 million flobs
  • libfoobar seems to be able to handle more, and makes concurrency suck less
  • We'll probably learn about other libraries beyond libfoobar, too.

Read a bit more on the gorilla vs. shark problem on the blog, and these should be evaluated on a case by case basis. However, it's pretty easy to identify which questions could be reworded to be a better fit, as they name some kind of practical problem to be solved.

Questions that just compare things for the sake of comparing them are fundamentally too broad, or too opinion based, depending. I'd use opinion based when the answer is really just a matter of preference, and too broad otherwise.

5

So the key to making these questions good is to have some criteria to which to compare the options. When the criteria is nothing more than "better" then yes, that is often subjective and opinion based, and is generally too broad because answers could interpret it in any number of ways.

If you give very specific criteria though then those problems may not apply. If the criteria is very objective and to which each option can be clearly, factually, and demonstrably the one that is better given that criteria, then it's not opinion based. It's also [potentially] not "too broad" as you don't need to compare the options on every single possible criteria, but merely "that one".

A question that asks, "which of these algorithm has a lower asymptotic complexity with respect to [...]" or "which program is going to have the higher maximum memory memory footprint" are possible ways of restricting the scope of the question.

As you referenced in the question, another option to consider is which is faster. Now, that's an example of a constraint that has some legs, but generally isn't quite "done yet". Often knowing which program is faster is dependent on other factors; what is the size of each of these various data sets, what is the makeup of the data, what are the details of the hardware running the program, etc. In some circumstances the author can provide enough information to answer the question of "which is faster" without it being either subjective or too broad, in some cases information may be missing, in which case it may need to be closed until enough additional information can be provided.

4

After some research, the best way I have found to reframe these types of questions is to ask responders to create a semantic feature analysis of the things you want compared. A semantic feature analysis, especially in the form of a chart, is a formalized way of asking "compare and contrast" type questions; almost everyone has seen one, even if they don't know the official term for it.

  • Helpful tutorial on how to make a semantic feature analysis chart, here.
  • Cute Youtube video on the same thing, here.

It even makes sense out of a worst-case scenario:

enter image description here

You must log in to answer this question.

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