Today I was answering two questions from new users. Both questions were downvoted, and then deleted by their author before I could post my answer.

LINQ does not support recursion. You can solve this client side or with a recursive CTE SQL query. Neither solution is trivial. I wrote an answer with a C# client side solution.

I wrote a quick answer but realized it was wrong. The question is not trivial but a variant of the "islands" problem. So I set up a test table and solved it with two subqueries.

Why are these questions downvoted?

  • 7
    They are both basically a "give me teh codez" question without any apparent effort by the OP. – Bart Feb 27 '13 at 10:29
  • 2
    @Bart: I would agree if the problems where trivial. But I don't think you can expect a new programmer to know where to start with recursion or the islands problem. – Andomar Feb 27 '13 at 10:34
  • 2
    That might be, but that doesn't excuse them from asking a good question. In any light the questions are very poor and will attract downvotes. – Bart Feb 27 '13 at 10:38
  • 6
    To the user voting to close this as "not constructive"....why? What is not constructive about this discussion? – Bart Feb 27 '13 at 10:57
  • The second one doesn't even have a description of what the OP wants. One can guess that he wants tuples consisting of a start value, followed by the length of the run for which the second value stays constant. But the OP never stated that. The problem isn't that he's a beginning programmer, but that he can't write a decent question. – CodesInChaos Feb 27 '13 at 13:40
  • @CodesInChaos: Why ask for long textual explanations, when a picture can say the same thing and be understood in seconds? I like short questions. – Andomar Feb 27 '13 at 13:44
  • @Andomar The questions essentially are "How do I map x to y". It's not possible to generalize from a single input/output pair to an algorithm reliably. For example "return y" (with hardcoded y) would be a valid answer to either question. It's a common problem that questions do not contain enough information to infer the desired result for edge cases. – CodesInChaos Feb 27 '13 at 14:32

These aren't good questions as they don't show any attempt to solve their own problem.

As @Bart has commented, they are basically just asking for the code for what they need. They aren't asking what is wrong with their code, or why it is erroring etc.

Matt Gemmell has written a good blog article explaining this:


The problem is that this person’s problem-solving technique is to ask for the solution. Not to seek advice on how to approach the task, or ask for the names of likely classes to look into, or a link to an example - but to just ask for the code, fully formed and ready to go. This is not problem solving, and software engineering is entirely about problem solving.

  • +1 You can't call yourself an engineer if you can't problem solve. I would say that is what makes the difference between a technician and an engineer. – Amicable Feb 27 '13 at 10:59
  • Both questions had example data and output. It's perfectly possible that a programmer has no idea how to start with either problem. – Andomar Feb 27 '13 at 11:03
  • 5
    @Andomar - Then its just a variation on Help vampirism. I cant understand the mindset of "Im a new programmer, so Im going to start with the most difficult, hard to define problem I could possibly conceive" instead of starting with the basics and working upwards from there. – Jamiec Feb 27 '13 at 11:07
  • 4
    @Andomar That does not excuse them from doing basic research and informing us about it. Stating "this is my data and this is the output I want" does not make it a good question. If you don't know what to try, at the very least share your research. Heck, even show me your pseudo-code/query demonstrating you've understood the problem but don't know how to transform that into actual code. – Bart Feb 27 '13 at 11:08
  • 1
    @Bart: The questions meet the requirements in the FAQ I'm not sure where the "must include basic research" requirement comes from. Classification (which is a prerequisite for further research) is often the hardest part. I would not require someone to solve the hardest part of their problem before they can ask questions. – Andomar Feb 27 '13 at 11:27
  • 3
    @Andomar stackoverflow.com/questions/how-to-ask In short "Do your homework and share your research". – Bart Feb 27 '13 at 11:28

The meta-problem is that as an experienced developer, you are easily able to tease out the problem from the presented question text - but that doesn't make it a good question! A question should have a text that doesn't require experience or, let's be honest, effort, in order to discern the actual problem. It should have, in essence:

  • This is what I am trying to do
  • This is what I have tried
  • This is what I get, which differs from what I want in this way

To take a reductio ad absurdum, would you like to see this hypothetical question on Stack Overflow? :

this table

   a     b
   5     Cat
   6     Dog

how i get just animals

In this example, the answer the asker seeks is:


but... well, do we want Stack Overflow to be a code-writing service? I don't.

  • Your example is a trivial problem. In the two examples I linked, it's entirely possible that a well-meaning programmer would be unable to classify the problem. If you can't classify it, you can't Google for it (and I suppose Googling is what programmers mean by reasearch.) – Andomar Feb 27 '13 at 12:29
  • 3
    Sure, hence the ad absurdum, but it's always possible for a well-meaning programmer to say more than just "input; desired output". I do not see any evidence of this well-meaning-ness in your two examples, nor in the countless others that have led to this community policy. – AakashM Feb 27 '13 at 13:39

First, if you haven't done it yet, visit stackoverflow how-to-ask page.

If i may quote the Stackoverflow Why should this question be closed? page, and add my take on it:

  • Duplicate

This question has been asked before and already has an answer.

You are expected to search SO to see if the same question was answered before. if there is a similar question but the answer doesn't work for you- mention it in the question and give a link to that question.

  • Off topic

Questions on Stack Overflow are expected to relate to programming or software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

SO if for programmers, not IT,DB and such. ask programming questions.

  • Not constructive

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

SO is not a place for questions like which is better, iPhone and Android?

  • Not a real question

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

Include code, explain whathaveyoutried, attach mock-ups and images, include a jsfiddle / pastebin / writecodeonline to help others to help you.

  • Too localized

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

This question will probably help only you, or even if other will have the same problem they won't find this question. for example- asking about failing ajax call when the issue was a typo the user made in the Apache configurations.

You must log in to answer this question.

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