Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I found that sometimes people ask broad questions where I provide only some high level description how to solve the problem. Sometimes the OP is skilled and he knows how to deal with the description but sometimes the OP posts a comment like "Can you provide an example?"

I'm providing examples as much as possible - either small snippets which I believe that they work or modified parts of code from my projects, tests or learning applications. In these situations I feel like providing a valid example requires to write it myself which in most cases mean doing a job of the OP. The OP probably doesn't understand the technology so much to be able to convert my description into working code or the question is about architecture / design of the application.

How to handle such situations? Should I simply leave a question and let it be? Perhaps somebody else will answer it with example but in the same time questions with answer (even not accepted) attracts less attention so should I delete the answer if I don't want to continue? Or perhaps I should not answer the question at all if I can't (or don't want) to provide an example.

share|improve this question
Can you provide an example of what you mean? – Mehrdad Apr 12 '11 at 2:08
up vote 2 down vote accepted

In my previous experience, unless the user can actually provide specific detail about a specific problem, no answer will be satisfactory for this type of question.

And now, an example question on how these things usually seem to go:

I need to make a sandwich, but I've never done this before. Can anyone provide me with an example of sandwich making?

There are a thousand possible starting points here. Do you have bread? Utensils? What toppings do you have available?

I have bread. I need to make a sandwich. Can you provide me a complete example of sandwich making?

What kind of bread do you have? What kind of toppings do you need?

I need to make a peanut butter and banana sandwich. Can you provide me a complete example of how to make a peanut butter and banana sandwich?

Do you have peanut butter? Do you have bananas? They're ripe bananas, right?

How can I tell when a banana is ripe? Can you provide me a complete example of how to make a deep-fried peanut butter and banana sandwich?

You do realize that you are very likely going to kill yourself in the deep-fry attempt, right? Have you thought about ordering out? There are are lots of people smarter than both you and me that have come up with some excellent libraries restaurants...

Can you provide me a complete example of how to make a deep-fried peanut butter, honey and banana sandwich?

There is no hope in helping this person. The question is not worth any further time or effort, as the user does not understand the scope of the problem or how to solve it, and isn't engaging in an active problem-solving exercise.

There seem to be three types of these questions.

  1. "Give me the codes."
  2. "I don't understand the problem, so I can't break it down into solvable steps."
  3. "I don't understand how to break down the problem into solvable steps."

Let's ignore #1 here, we all know how those play out.

Our deep-fried peanut-butter, honey and banana sandwich is an example of #2 and #3. Unfortunately, SO is a downright awful place to teach critical thinking and problem solving skills, even if we can sometimes at least take a stab at trying to help.

tl;dr / conclusion: I usually find myself throwing a downvote or a closevote at these questions when it becomes obvious that the user isn't going to help us help him/her.

share|improve this answer

I hope I'm not oversimplifying your question but I think it is as simple as if it is a "give meh teh codez" request, just let it go.

I you think the OP is honestly asking for some code to fully understand the answer (not out of laziness), and you think code will help, go ahead. It might even gain you some extra rep I guess.

share|improve this answer

It depends.

Ideally, most answers on Stack Overflow and other technical Stack Exchange sites would contain working sample code, so that the site can serve as a self-contained reference. But sample code is not appropriate to every question — you're not expected to write the asker's program for him.

If the asker just comments “Can you provide an example?”, chances is he just wants his work done for him (plzsendmetehcodez). That's well beyond your duty as an answerer. I'd generally just reply with “what did you try?” — and for repeated offenders simply ignore such a comment. If the asker is not capable of at least making a first attempt, he's in way over his head, and you may tell him so (politely, and ignore any angry reply).

If the question was very general to begin with, sample code belongs in a separate, more focused question, preferably containing the asker's first attempt.

share|improve this answer

You must log in to answer this question.

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