-5

Consider a question like:

Is it bad practice to do X?

Assume the intent of OP is asking for opinion, as I know, according to rules here, this type of question will be closed.

But after reading this , the real situation looks differ from I know before (sorry to bring it again! But to clarify something I need to do so :( ).

The linked question discusses about 2 questions which both are in 'is it practice to do X' form, which X are 'catch throwable' and 'use recursion in constructor'.

Currently the 'catch throwable' one is not closed and the 'use recursion in constructor' one is closed, according to the discussion I understand, the reason is 'catch throwable' has objective reason not to do so.

My question is, should we close a question for its intent or the actual answers? Or in other words, should the close vote decision be affected by the actual answers?

Assume I'm a beginner and know nothing about X, if I ask 'is it bad practice to do X', am I just GAMBLING if X has objective reason not to do so?

And if I see a user is asking a question which looks like finding opinions but the actual answer is not opinion based, should we close it anyway or just answer it and edit the question to become valid?

2
  • "And if I see a user is asking a question which looks like finding opinions but the actual answer is not opinion based" - then the answer can only have nothing to do with the question.
    – Gimby
    Commented Dec 23, 2015 at 9:19
  • 1
    Best practices? Best practices???
    – user1228
    Commented Dec 23, 2015 at 15:45

2 Answers 2

4

We close questions based on the answers they are likely to get, not usually the answers they already have, since closing does nothing to help with any mess already existing. However, all the close banners tell you that if the question can be edited to suit the site, it should be.

That's all there is to it. Edit if it will reasonably prevent bad answers. (Flag to) close otherwise.

3

You have to put your hardhat on and really start mining for context in those situations.

It can be tempting at first to dismiss any question that ends with, "...a good practice?", but there are nuances underneath what the intention is there.

Read those questions objectively and pretend that one wasn't asking about "best practices", or your trigger phrase of the week. Try to tease out the nuances of what is actually being asked, as opposed to being hung up on the trigger phrase.

Taking the two examples, that turns this particular question into:

Is it undesirable to catch Throwable?

For example, if we wrote something like this:

try {
    // Some code
} catch(Throwable e) {
    // handle the exception
}

What are the downsides to this? Should we be as specific as possible when catching Exceptions?

...which as previously established makes it firmly answerable and objective, as the intent was not to establish a broad goal of "best practices", but whether or not catching Throwable has ramifications associated with it.

That would then turn this particular question into:

I'm implementing van Emde Boas trees and I've come across a situation where using recursion in the constructor is incredibly useful.

When I create the root node in the tree, that node will have pointers to many other nodes, and those nodes will point to many other nodes, and so on. Even if these are intialized with null data, I still want them all there.

The code recursively creates new nodes until the full tree has been created. Is this a bad idea? If so is there a better way to do it in Java?

...which we've previously established to be considerably broad, as the question is more opinionated and open-ended; there's no concrete way to answer this, since answers both in favor of and against recursion in the constructor exist and can be applied here.


To sum up:

Always judge the question based on the merits of the question.

The answers can play a role, but you should be looking at the objectiveness of the question as a first port of call. If the answers are stellar and objective and the question just needs a little TLC, then edit the broad-sounding question into one that's more on-topic.

Otherwise, flag/vote to close.

You must log in to answer this question.

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