12

On StackOverflow, there are lots of questions being asked in the form "Is there a way to do X? What library/tool can I use?"

Such questions usually have certain common traits:

  • they don't contain code;
  • they don't contain any indication of the research done by the asker (they may write "I've searched for that on Google with no luck", but even this is usually not the case);
  • sometimes, the asker doesn't even care to specify the language to be used;
  • obviously, the asker hasn't tried anything (because they don't know how to start).

A lot of such questions seem to deserve a close vote (especially when the 3rd point is present). I'd like some guidance here, though.

  1. Are such questions on topic? I.e., do they qualify as "related to a specific programming problem"?
  2. Am I right in my feeling that if no language is specified, then it's probably not a real question?

To sum up, how do I decide if I should vote to close, and what reason should I specify?


Additional considerations:

There basically are two ways to answer such questions:

  1. Post a name of/link to a library/function/tool that solves the problem (basically, a link-only answer that, as such, is subject to deletion)
  2. Post a full solution. This is fine, but looks like doing all the work for the OP.

Clarification: I know that I shouldn't vote-to-close all such questions. The decision has to depend on the question quality. I'm asking how I can evaluate the quality of such questions.

From the answers given so far I gather the following:


All right, my first attempt at generalization of the thoughts from the answers and comments would be the following:

When in doubt, think about how a hypothetical answer to the question would look, or what answer does the OP expect, or maybe what answer would help the OP the most. If the OP's question can be fully answered in a post of reasonable length, it probably can live. If one can either post a whole computer science course or a link only, then it's not a suitable question.

This may be helpful, and it also agrees quite well with the general approach to closing, I think. Can anyone comment on this interpretation or add anything?

I can say that I know of at least a couple of exceptions, i.e. questions that are a basically a collection of links (with very brief descriptions) that gain a lot of views and upvotes and generally very useful for people. I guess it's because they are non-trivial. Here's an example. The question is not that short and obviously shows that some research has been done, though.

5
  • These questions have always been a grey area for me that I've never really been 100% sure what to do with them. Generally if it's only "Is there a way to do X?" I'll leave it alone, but if it includes the "What library/tool can I use?" part I'll vote to close it.
    – animuson StaffMod
    Commented Nov 13, 2012 at 16:53
  • 1
    @animuson I wouldn't mind a clarification of your point (as an answer, maybe?) It's not obvious to me that there's any difference whether the second phrase is present or not. I mean, depending on the nature of the problem it can either be solved with standard libraries/functions or third-party tools. Does it make a difference? Commented Nov 13, 2012 at 16:56
  • "Is there a way to do X?" doesn't necessarily mean that the problem requires a tool or library. It could just be a three-line code sample. The problem with the question in itself is it's asking a yes/no question, and could technically be answered with one word.
    – animuson StaffMod
    Commented Nov 13, 2012 at 17:00
  • 1
    @animuson Well, a one-word answer will almost never satisfy the OP (this is not math, where the sole existence of a solution could matter). So they basically need the problem solved and don't even know how to start. Of course, most often it can be solved, and if it only requires a three-line code sample, it doesn't make the question any better, IMO. And what is the formal reason you specify when closing? Commented Nov 13, 2012 at 17:19
  • related: Question closed because yes/no answer
    – gnat
    Commented May 31, 2014 at 21:29

5 Answers 5

7

I see absolutely no problem with questions asking "Is there a way to do X? What library/tool can I use?" providing X is clearly defined.

Asking if there is a way to do something, or for a specific library/tool that accomplishes a specific task is very different from asking a "shopping question". A "shopping question" is usually a very broad request with no parameters given, and it ends up generating a big list of everyone's favorite X with no reasons as to why (since the parameters are unknown), and every answer is equally valid.

To address your concern about having no code or language specified, let me quote the FAQ:

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
  • a software algorithm
  • software tools commonly used by programmers
  • practical, answerable problems that are unique to the programming profession

… then you’re in the right place to ask your question!

Per the first sentence, its best if your question's have some code in them, but its not mandatory. Bullet points 2 and 3 often don't have code as well, and may not even specify a language.

That's not to say you shouldn't vote to close these questions at all. If the question is overly broad with no parameters given (such as "What library/tool should I use to build a website?"), or fails other quality standards, don't hesitate to vote to close it and/or leave a constructive comment guiding the user to improve their question.

But don't decide to vote to close just because there's no code or language specified, or because the title sounds a bit similar to one of the many shopping questions you see getting closed.

Also as a side note for answering these kinds of questions, be sure to say why your tool/library is the solution to the problem. Don't just post a link going to the library, or it is likely to get deleted.

4
  • I have always interpreted the part of the FAQ you cite as "a specific programming problem; a specific algorithm; specific programming tools ..." The word's not there, but I see it there. Do you think I'm right about this? Commented Nov 13, 2012 at 20:25
  • 1
    @LevLevitsky I try and use my brain when evaluating a question instead of just following a checklist :) I've seen many good questions that are not about a specific item, but that are detailed enough to stay open and get good answers. Also keep in mind those are guidelines, not rules. Even things like shopping questions can get such stellar answers that they're left open even though the question style is not one that is recommended. So to answer your question, no I don't see the word "specific" there, and don't presume it's there. I just try to help SE make the internet a better place :)
    – Rachel
    Commented Nov 13, 2012 at 21:10
  • I was also asking about guidelines, not rules. If it sounds like I want to overly simplify the issue, it's only because I'm having trouble getting anything more than "It depends" or "Use your brain" as an answer. I know there's no definite answer, but I wanted some input. Your answer doesn't help me, unfortunately. I already know I shouldn't close all such questions. But the valuable (for me) part of your message is somewhere deep in the "other quality standards" phrase, and I can't read it from here. Commented Nov 13, 2012 at 21:21
  • @LevLevitsky For example, if you would answer with your favorite library/tool but couldn't explain why it's the best answer to the question, its likely that the question is too broad because the user didn't supply enough details about what sort of solution they're looking for. The "other quality standards" would also include questions where you can't actually tell what's being asked, or the answer is so broad that the best answer would be to direct the OP to a book, or all the answers are part of one big comprehensive answer. As always though, there may be exceptions, so use your brain :)
    – Rachel
    Commented Nov 14, 2012 at 13:19
4

Questions that meet most of those criteria can actually be very good.

consider This (voted 4) question I've asked recently

I'm trying to write a surface tablet app that often can go multiple minutes between receiving
input.

The problem is, that if i don't keep touching the screen, the power saver will activate, and
the screen will automatically go black, and it disrupts the user of the app.

Is there a way that my app can prevent the power saver from activating, or at least extend
the time it takes for the power saver to activate.  

It has 3 of your 4 bullet points

  • no code
  • no indication of reasearch
  • no information on what I tried

But would you consider that to be a bad or off-topic question?

1
  • I probably wouldn't close or downvote your question because it's well-explained. But I haven't found a way to convert the gut feeling about questions into a set of simple criteria to check against. That's the aim of this Meta question. Commented Nov 13, 2012 at 17:26
3

Depends on what the author want to do in my opinion.

I would only post a full solution, if the language is specified. Without I think it's not wrong to give some hints what might help the problem.

I've got to add: a lot of stackoverflow users are new to this kind of community here. As for instance I am. So in the beginning a lot of people aren't even aware of how they should ask correctly so that they will get an appropriate answer. So in my opinion as I said above, its better to ask the author for a more precise question before finally closing a question.

5
  • Your last point is true, but we still close questions that don't fit the SO format. Yes, sometimes we comment first. After all, closing is not a death penalty: a lot of questions are reopened, especially after introducing a Reopen queue in /review. Commented Nov 13, 2012 at 17:29
  • Yep, I didn't want to say that the question has no chance at all. But at least giving the advice what could have been better is important before closing. So that the next question will fit the format and is easier understandable and easier to answer.
    – Paul Lich
    Commented Nov 13, 2012 at 17:44
  • Right, but now we're going off the topic of this question :) How do I decide if the question is suitable or not? Commented Nov 13, 2012 at 17:46
  • I would say it much depends on if you see some effort of the author to solve the problem himself.
    – Paul Lich
    Commented Nov 13, 2012 at 18:05
  • When you recognize he didn't even search for solutions or hardly even tried to solve it, it's ok to close the answer imediately. If it's only a matter of unknowing how to ask clearly it just might need some correction...
    – Paul Lich
    Commented Nov 13, 2012 at 18:50
0

It depends. Sometimes the OP is asking for the name, package, class or some other reference to an API or a class and is obviously capable of moving forward with that one jumpstart. I'm happy to answer these questions and will always vote to keep open. Other OP's, by their questions, appear to be incapable to building the solution themselves, whether it's because they don't know the language or don't know how to program. I put most homework questioners in this category. I'm eager to close these questions as being not appropriate or not a question.

5
  • Link only answers aren't acceptable answers. Questions that can only be answers should be closed, since it's not possible to answer them.
    – Servy
    Commented Nov 13, 2012 at 17:19
  • 1
    @Servy: Did I say that link-only answers are acceptable? No, I did not. The question is about questions, not answers. Commented Nov 13, 2012 at 17:22
  • "Sometimes the OP is asking for a pointer to an API or class" If they're just asking for a link to a page in the API, and you plan to answer it with just a link to that class in the API, then it's asking for and getting a link only answer.
    – Servy
    Commented Nov 13, 2012 at 17:24
  • @Servy: Oh come on. Get off my case. Read what I said (I edited it for the benefit of those like yourself who jump to conclusions). Commented Nov 13, 2012 at 17:32
  • I understood your question to mean just what you edited it to mean. Posting a link to a class in the API, the name of a class, etc. aren't high quality answers, and questions that are answered in that manor are therefore low quality questions. I'm not misunderstanding you, I'm simply disagreeing with you.
    – Servy
    Commented Nov 13, 2012 at 17:34
-4

A question shouldn't just ask for a tool/API. That is functionally identical to a shopping question (or at least all of the negative points apply equally to such questions). So if someone asks, "what API/tool can I use to do X" the question would need to be rephrased as "how can I do X" to not be closed as "not constructive". Now, an acceptable answer might be, "you could use tool Y to do X, here is an example of how it can be used to solve your problem, this is why it's helpful and what it does, [...]".

Phrasing the question as just asking how to do X may be too broad, or it may not be. It will vary based on the specifics. It doesn't need to have code, but it would be best to have some demonstration of effort. The scope of the problem also matters; if there's no way that a solution could be acceptable with several paragraphs as an answer then the question is too broad.

4
  • 3
    This so so incorrect. Languages like Java and C are basically just huge libraries of function and many time even the best programmer needs to ask where a particular set of behavior can be found. Commented Nov 13, 2012 at 17:34
  • @ChrisGerken It's a matter of phrasing the question. Rather than saying, "can you link me to the library class that does X" they should ask, "I need to do X, how can I go about doing so". If the answer happens to be, "there is a library class that does just that" then that's fine. If there isn't, then another type of answer may need to be given.
    – Servy
    Commented Nov 13, 2012 at 17:36
  • 1
    @Servy Being so fussy about how users phrase their question is a great way to drive users away. The user obviously wants to do X and thinks a library already exists for that, so is asking about it. Requiring them to change the format of their question in order for it to stay open, even though the base question is essentially the same, seems like a really bad idea, and would be practically impossible to maintain on such a large site. Besides who knows, it could be they're limited on time or something and don't have time to actually code X, so just want a pre-built library or nothing.
    – Rachel
    Commented Nov 14, 2012 at 13:27
  • @Rachel Phrasing a question in such a way that it's not possible to answer with the quality that SO demands of it's answers shouldn't make an acceptable question. If it did, then it would need to go unanswered as any answer to such a question would need to be deleted as not an answer.
    – Servy
    Commented Nov 14, 2012 at 14:41

You must log in to answer this question.

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