23

Suppose I ask a question whose gist is "How can I do A in scenario B?"

Now, it's possible that the solution involves some configuration, or use of standard system utilities - but it's possible the solution is "oh, you should install C and use that". I don't know in advance and I don't mind which of these is the case.

But then, someone asks me in a comment "Are you asking for a recommendation of a tool or of software?" ...

What do I do? It's not as though I want people to not recommend a tool or software - I want to solve my problem. On the other hand, if I say "Yes", the question will be closed as off-topic.

The motivating example:

How do I get a diff-like display of git merge conflicts?

12
  • 9
    The best way to not be "baited" is to refrain to use the phrase "how can I get some tool" in your question, like the commenter already pointed out.
    – user9420984
    Commented Jan 7, 2019 at 10:41
  • 10
    Bait is for fish, you don't have to bite. Editing was a good idea, next flag the comment as "no longer needed". Commented Jan 7, 2019 at 10:44
  • @Codeer: 1. That was a motivating example, not the entire question asked here. 2. I had said "how to get some tool to do X" does not mean "where do I get a tool to do X", but point taken.
    – einpoklum
    Commented Jan 7, 2019 at 10:45
  • 4
    Aside: once you feel this Meta thread has run its course, I suggest flagging the post on main and asking a mod to nuke the comment conversation there, since it has no lasting value to people interested in your question.
    – Mark Amery
    Commented Jan 7, 2019 at 11:20
  • 4
    I've always found this distinction frustrating, any code snippet can be packaged in a library and any library can be unpacked to give the code. If there is a complex problem that has been solved there should be a good tool for it and this would make a good answer. Many SO questions actually have high voted answers recommending tools but the questions must always not ask for this directly apparently Commented Jan 9, 2019 at 12:20
  • 3
    @Chris_Rands: That rule is there for a reason. Libraries need maintenance, release cycles, etc. They come and go as developer interest waxes and wanes. Short code snippets are forever (while long ones are off-topic as Too Broad).
    – Kevin
    Commented Jan 9, 2019 at 18:12
  • "What do I do?" Say no?
    – TylerH
    Commented Jan 9, 2019 at 20:03
  • @TylerH: like this you mean? :-)
    – einpoklum
    Commented Jan 9, 2019 at 20:32
  • @Kevin I see your point, but code snippets also degrade as languages change, for example many old Python answers offer Python 2 only solutions. An it remains that libraries are often used in answers, especially established ones like numpy and pandas (for Python) Commented Jan 9, 2019 at 21:27
  • @einpoklum, If you agree with the below answer, feel free to accept it so other users know. Otherwise, happy to clarify anything that's unclear.
    – jpp
    Commented Jan 15, 2019 at 18:56
  • @jpp: It's a fair answer, but I don't feel it is enough of a solution. Being specific can even help bait you in some cases.
    – einpoklum
    Commented Jan 15, 2019 at 20:03
  • @einpoklum, Fair enough. If you come up with an alternative solution, then do also post an answer!
    – jpp
    Commented Jan 15, 2019 at 23:34

2 Answers 2

29

Be specific

Edit your question to clarify, then flag the comment as "No longer required". So if you don't want to use external libraries or tools, say so. If possible, show what you've tried already and indicate where you got stuck.

If you are open to using external libraries or tools, say so. You can even qualify such a statement: "I'm open to using external libraries or tools if they provide benefits in terms of X or Y."

In either case, you aren't asking for library/tool recommendations, but are specifying the restrictions / boundaries which answers should respect. This is not only possible but recommended in cases where many solutions by a variety of paths are possible.

-7

I think the problem of some questions in the type of "How to do X?" is that you have a notion that this has been done before. Because of this you will want to search for it before having to write it yourself. Why reinventing the wheel? But without spending some effort to write the code, your question may not be well-perceived, despite your effort to make it specific.

I recently asked this question: How to parse a markdown file without having to convert it to HTML?. I did try to be specific, but the question still really looked like a lib or tool request. Because, what can I say, I did believe that ultimately there is a lib or tool for that. I would be a fool to write it from scratch. I would be a fool to just write some code, just to illustrate that I didn't want to be a vampire help. Yet, despite my best effort to be specific, it still really looked like a lib or tool request. I felt that that was fair and unfair at the same time.

I realized what I was looking for is a concept to describe the optimized/standard method of the task. I think that had I worded the question about my lack of knowledge to find out the resource I need, and emphasized that this had been done before, then the question would be more specific, and thus would be more welcomed:

  • What is the efficient or standard way to do X?
  • How is X usually done?
  • What are some important concepts when working on X?
  • In what subfields of computer science does X belong?

So, to be specific on the "be specific" advice, realize that what you are lacking is not a lib or tool, but a concept. Then word your question around that. In the question body you can list the keywords you have used to google, and why they fail to meet your expectation.

7
  • 2
    I don't think your alternatives are better. "What is the efficient or standard way ..." - usually performance focused questions must be very narrowly scoped to your specific use-case to be concretely answered. A "standard way" might be answerable if such a standard exists, but if not then any answers would be just answers to "how to do X". "How is X usually done" - this invites speculation on what is "usual" which doesn't help you solve X - "how to do X" is still superior. "What are some important concepts when working on X?" - this is way too subjective.
    – kmdreko
    Commented Aug 25 at 16:51
  • I can accept your objection. But what is your take on the premises of the idea? There are two: (1) it is reasonable to avoid spending effort and keep searching for better solutions if one has a notion that this must have been done before, and (2) the actual question behind is not how to do X, or to find a lib or tool to do X, but to understand X better.
    – Ooker
    Commented Aug 25 at 17:24
  • 2
    For (2), Stack Overflow is not a tutorial site - it is a question & answer site. So to enhance your understanding, you should ask specific questions about what you don't understand. Keep in mind though that there is an expectation that you've exhausted other resources to help in your understanding - both on-site and off - before posting here.
    – kmdreko
    Commented Aug 25 at 17:42
  • 2
    For (1), the existing answer here - "be specific" - still holds. Even if you suspect a JS markdown parser exists, you should ask questions specific to your problem - it is possible that no existing tool does what you want. Your particular question is to "extract specific sections from markdown files" but you don't clarify what those "sections" are or what criteria are used to select them. If you asked "how can I get the headers from a markdown file" preferably with an example markdown file and desired JS value (i.e. ["header 1", "header 2"]) then it would be much more appropriately focused.
    – kmdreko
    Commented Aug 25 at 17:42
  • "So to enhance your understanding, you should ask specific questions about what you don't understand" — that's why I think those alternatives will specify what I need: the name of a concept or the method. As for your reply on (1), I only see that it's about how to be specific in my particular question, not actually object the premise. My particular question can be made clearer/focused/more specific I agree, but that's just a problem of it being unclear, not a problem of it being a lib request. I'm not sure if you intend to object the premise?
    – Ooker
    Commented Aug 25 at 17:51
  • 2
    I have already elaborated why your proposed questions are inferior (your latest one is probably the least useful to you and other users). Please consult What topics can I ask about here? for more guidance. Again, Stack Overflow is not a tutorial site; ask about a specific problem. I brought up your particular question as an example since your own post brought it up as an example. The generalized answer is already here and in my comment - be specific - that is how you can best avoid a question being interpreted as a general library request.
    – kmdreko
    Commented Aug 25 at 18:02
  • 4
    "I did try to be specific" - Eh? What you did is being more generic. "I want to extract specific sections from markdown files." - What kind of sections? Paragraphs? Sentences? Do you want to extract every paragraph, or do you want to find it by some words? "... and I need to convert the texts into objects" - What kind of objects? The ones which accumulate only text? Or the ones which have its own markup for bold and italic? "but I may have to use a DOM lib if I'm doing this in the server" - JS is mostly about operating with html. What kind of js server has separate library for DOM?
    – Tsyvarev
    Commented Aug 25 at 18:27

You must log in to answer this question.

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