4

The question "Converting the “arguments” object to an array in javascript" is a very useful, frequently asked question. It asks a very precise, answerable question, and the answers are good and helpful. I see no reason that this should have been locked and closed as off-topic.

Why is this "not considered a good, on-topic question for this site"?

2
  • WTH did I just exactly now want to ask the very much same question?
    – Bergi
    Dec 16, 2014 at 4:17
  • @Bergi Probably because it was triggered by the same question in the javascript tag. ;) Dec 16, 2014 at 4:18

2 Answers 2

6

Because it is a code golfing question, and it is not on-topic here. He has working code, and he's merely asking for people to contribute other ways to do it. There is no real problem there and there are an infinite number of answers.

20
  • 2
    I disagree that it's a code golfing question. It asks for a good way to convert a JavaScript arguments object to an array. This is an extremely reasonable thing to want to do concisely, and the asker's version was clearly suboptimal. It's not the OP's fault that the "correct" solution is rather non-obvious. Dec 16, 2014 at 4:19
  • 5
    The fact that it used to be tagged with code-golf seems to contradict that.
    – animuson StaffMod
    Dec 16, 2014 at 4:20
  • 1
    A link to the original version may be helpful as the current version doesn't have that tag anymore.
    – user289086
    Dec 16, 2014 at 4:21
  • Hm, this seems to be a good canonical question candidate. Can't we instead edit the question to remove the "make this shorter" part and put "How to convert the arguments object to an array" instead?
    – Bergi
    Dec 16, 2014 at 4:21
  • I didn't realize it was previously tagged code-golf, but that doesn't make it a bad question once the tag was removed. It still stands on its own without the tag. Dec 16, 2014 at 4:21
  • 1
    OK, even if the question was off-topic, why was it locked down? To prevent it from deletion? To prevent reopen votes?
    – Bergi
    Dec 16, 2014 at 4:22
  • 1
    This question is basically asking a similar "how can I do this concisely" question. Would you call it a code golf question? Dec 16, 2014 at 4:23
  • 1
    @AlexisKing its still in the 'too broad' category. Look at the answers its getting... (poorly formatted) code dump, "To add to all the answers, printing the object as a JSON string is also an option.", "There's one additional way if your array is of type char[]:", "This does the job.". It has the possibility of a basically endless stream of answers.
    – user289086
    Dec 16, 2014 at 4:24
  • @Bergi As I was cleaning up the code-golf tag itself, many of them ones we kept got the historical lock. The locks were meant to tell people the question is not a good fit, not as much to prevent reopens/deletions.
    – animuson StaffMod
    Dec 16, 2014 at 4:25
  • @MichaelT The Java question I linked has 13 answers, and it's fine. Who cares? It wasn't like it was becoming a problem with people constantly answering this question. All popular questions inevitably get that kind of clutter in the answers. Dec 16, 2014 at 4:26
  • @AlexisKing clutter in answers is not a good thing. Poorly written answers are not a good thing either. Questions that encourage clutter or poorly written answers not good questions either.
    – user289086
    Dec 16, 2014 at 4:27
  • @MichaelT Some on-topic questions naturally encourage clutter in the answers. Just because some of the answers suck doesn't mean that the question isn't valid. Again, any question that's popular enough is going to attract lots of people to post trivial alternative answers. Dec 16, 2014 at 4:28
  • 1
    @AlexisKing I am sure they have more if you could see deleted answers. Up votes do not mean in scope or not too broad. They are an indication of popularity of a question or an answer. That is orthogonal to the issue of is it a good StackOverflow format question. Up votes do not measure "should it be closed".
    – user289086
    Dec 16, 2014 at 4:34
  • 1
    @Alexis I agree with you that this could possibly be transformed into a better question if you could establish an actual problem. The fact that he has working code and just wants a different way to do it makes it look very off-topic. Your Java example has an actual problem - they tried printing the Array object and it outputted gibberish. That's not the case here. There is no real problem other than his desire to have shorter code. That's the definition of code golfing.
    – animuson StaffMod
    Dec 16, 2014 at 4:35
  • 1
    @AlexisKing Make sure to flag answers that no longer match the modified question so that the mods can delete them (you might want to reference this meta post to make sure they are aware of the 'not just flagging things and there is reason to do it').
    – user289086
    Dec 16, 2014 at 4:41
1

When you ask the question "Why was this post closed," you should always ask the logically inferred question "Why should this post be reopened?"

Posts are reopened for three reasons:

  1. The close reason is clearly invalid, or
  2. The post needs more answers, and/or
  3. The question has been improved, making it on-topic.

Of the three, the third reason is the most valid: the post has been improved, making it on-topic.

Bad questions have an impact on their answerability. Certain questions have characteristics that make them spam or discussion magnets, so if a question is to be reopened (the principal purpose of which is to allow answering again), then question improvement is the best option, because it improves the chances of getting better answers.

Worth noting: The post you cited has attracted a number of poor answers. Since closing prevents answers from being posted, it also prevents bad answers and "me too" answers from being posted. Again, the remedy is question improvement.

You must log in to answer this question.

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