-3

I posted this question - Compare two strings (similar to how GNU diff does), asking if anyone knows about an open-source solution of a fairly difficult problem - comparing two strings for differences.

I don't think my question was vague, rhetorical, or broad. I also got a very reasonable and helpful answer pointing to google-diff-match-patch, which does just what I need.

Was it because I was asking if there already exists an open-source solution to my problem? I want to know if those kinds of questions are not welcome on Stack Overflow. If not, why?

The first user to vote to close my question, obviously doesn't believe in code reuse, because he also posted a comment suggesting that I reinvent the wheel and write it on my own (just follow the link in his comment and you'll see).

7
  • 8
    No, such questions are not welcomed. They are essentially recommendation questions (often referred to as shopping questions as well) which we don't do. I would have perhaps gone for "not constructive" instead, but that's besides the point.
    – Bart
    Commented Feb 16, 2013 at 9:13
  • But my question wasn't about recommendations. I really couldn't find anything at all googling. I didn't care which is better than which, I needed to know if such a thing exists at all, and where, so I can use it.
    – sashoalm
    Commented Feb 16, 2013 at 9:16
  • 8
    Still, you're asking for someone to recommend a library/product with certain features. And those questions are not considered to be on-topic. The question already attracted 2 different answers recommending different libraries. We don't want a whole list of those.
    – Bart
    Commented Feb 16, 2013 at 9:17
  • But don't programmers have a legitimate need to try and locate already tried-and-tested code before making a (probably buggier) version on their own? If not here, where? Googling doesn't always help, try to give me a good query for Google from my question.
    – sashoalm
    Commented Feb 16, 2013 at 9:57
  • 19
    Not everything programmers have a need for is on-topic on Stack Overflow.
    – Bart
    Commented Feb 16, 2013 at 10:12
  • In the past I have argued for a limited exception to the general rule against those kind of questions, but I don't think what your particular request would qualify because there are a lot of different difference finders out there and the problem have been thoroughly investigated by the computer science academia. If you are failing on Google you might ask (on chat, perhaps) for pointers to the algorithmic choices and then work from there. Commented Feb 16, 2013 at 15:06
  • Searching on "algorithm difference finding" yields a number of promising results. Commented Feb 16, 2013 at 15:09

2 Answers 2

6

TL; DR

Don't ask search questions. Reframe your question as a concrete how-to question instead.

Shopping vs. Solutions

You asked a shopping question about a hypothetical problem. In general, any time you ask "is there a..." you're asking something that should be researched or Googled, rather than a concrete, detailed question as described in the Get answers to practical, detailed questions section of the About page.

That page explicitly says not to ask:

  • Questions you haven't tried to find an answer for (show your work!)
  • Product or service recommendations or comparisons
  • Requests for lists of things, polls, opinions, discussions, etc.
  • Anything not directly related to writing computer programs

While I sympathize with the notion that it's sometimes hard to search for solutions when you don't know the right keywords, "hard to find on the Internet" doesn't inherently make something a good fit for Q&A on Stack Exchange.

Ask "How" Instead

If you have an actual, concrete problem you're trying to solve, showing your work and asking how to solve it would probably be on-topic. For example, had you asked:

Here's my code so far:

    [non-hypothetical code goes here]

However, I need to compare the strings in memory rather than using temporary files. I've already considered X, Y, and Z as solutions, but they don't fit my needs because [insert research effort here].

How can I compare the strings using memory buffers instead?

With a question like this, you'd have a concrete question attempting to solve a real coding problem. In addition, you'd be asking for a solution, rather than the entire statistical universe of potential tools you might apply to your problem.

A how-to question may get some answers that refer you to a library or tool. However, the core of an on-topic answer will be more likely to solve your actual programming problem, and not just the X/Y shopping problem that you've created for yourself.

5

It shouldn't have been closed as "Not a Real Question", but it should have been closed as "not constructive".

On StackExchange, recommendation questions are off topic. They have a history of causing problems, so (except for very specific ones) they get closed.

In this particular case, one can easily envision a truckload of answers coming in for that question. That's pretty much the embodiment of "not constructive". (In cases where one has narrowed down the criteria enough, recommendation questions can become off topic. But not this one)

Besides, as Bart mentioned above, we don't cater to every need.

You must log in to answer this question.

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