When asking a programming question on SO, how much homework (i.e. searching both inside and outside SO, reading materials/books/papers, attempting hacks on own, etc.) should be done prior to posting the question?

The reason why I'm asking is that I asked a question and got a great answer, but at the bottom of the answer, the answerer cautioned me on doing my homework first (i.e. - attempting to find the answer on my own). I thought that SO would be a great place to start my learning curve. Should I not start with stackoverflow, or should I just use stackoverflow when I can't find the answer anywhere else?


13 Answers 13


You should do exactly as much homework as you think will save you time. For instance, if your question already exists then you'll get a much quicker answer by searching for it.

Beyond that, though, go ahead. Except for exact duplicates SO is intentionally designed to support and nourish questions that are very similar, so jump in.

You can largely ignore those that want you to "do your homework" because SO wants to become the primary resource for google searches, and your slightly different wording in the question will help that goal.

So don't worry about it - this is by design.



Item #1: make sofaq questions community owned.

No matter what site you use, when asking as question you should always start with a search for the same question. Since StackOverflow appears to be pretty well indexed by Google and the internal search itself isn't that great, Google is probably a better choice for that part of it.

Additionally, while stackoverflow is still young there's a strong movement to try and reduce duplicates. Over time this will become less and less practical, and the idealism will slip.


I find that many people here are turned off by questions that are very simple and can be resolved by a simple 10 second Google search.

For example how to open a file in .NET is very simple, and MSDN documentation answers it in 10 seconds. That would be something that I personally would say should be looked into a bit further before posting...but it depends.


I thought one of the goals for SO was to become an owner of all good bits, which means that it needs stupid questions as well as smart ones, because people will ask all kinds. Of course, this does work better if everybody tries to search SO for the answer before asking.

If not, then it should go by the rule for most technical forums: do at least a bit of Googling before asking, since incessant trivial questions tend to drive off the people who give the most useful answers.


Do enough research to show respect for those who might answer your question.

I'm pretty sure you're referring to me, and my answer on your JavaScript closures question. I stand by my answer: I don't think it's too much to ask that people asking fairly general questions at least put the keywords of their post into a search engine before posting. How long would that have taken? Significantly less time than asking the question.

All I had to do in order to find useful information was type two words into a search engine and hit "Search". It took much longer to copy the URLs and titles etc than to do the actual search. I personally think it's polite to do the most basic level of research before asking a question.

Put it in a different context: if someone were sitting next to you and had a dictionary in their lap, wouldn't you think it odd if they asked you the meaning of a word?

EDIT: Oh, the irony! I was about to ask the best way to deal with questions which are easily answered by Google posts, as clearly the OP was annoyed at what I thought was my pretty reasonable and moderately-stated request that he do simple searches before asking the question.

So of course, I searched SO to see if there's already an answer for how to deal with questions like this: and there is. Interesting reading indeed - even if it seems there's little consensus.

  • Downvoters - please explain your reasoning. Just downvoting without a comment isn't useful at all.
    – Jon Skeet
    Apr 12, 2009 at 21:56
  • You get an upvote from me (thanks to the ability to now see beyond 100 answers)
    – cletus
    Apr 12, 2009 at 23:41

if you at least google it and check a couple of the results and cant find it then come here


In general, the difference between people who ask questions and people who answer questions is their ability to research the topic. If you never practice your research skills, you'll always be dependent on other people. If you depend on other people too much, you'll find that those people start ignoring you as you leech off their time. Once you've alienated your only resource, you're pretty much out of the game.

If you want to be a better programmer, try to do as much of your own work as you can. Indeed, do more of your own work than you think you can. Be responsible for your own education. It might seem difficult at first, but as you develop the skills and the intestinal fortitude, it gets easier. You'll be more valuable as an employee and more productive on your own.

The answer depends on what sort of person you want to be and how you want other people to think about you.


I guess, if the exact answers to your questions that you are getting are links that people have dug up on the Internet by simple Google searches, it would mean that you didn't do enough research.

But, who cares. Sometimes you just want to pose a question (do some other work in the meantime) and come back for an answer a few minutes later.

I do this when I don't have the time to do research on my own. It is useful to have a lot of smart people available to answer your questions when you need it. Of course, I try my best not to get lazy this way.


I think you should always be able to research your question from multiple sources, not just SO, google and the likes of Wikipedia. Knowing how to dig deep and find answers to your own questions is an important skill, and while SO is excellent, it is not an excuse to being lazy. I have had some great answers here, but I have also had a number of questions unanswered.

(And yes, I will post the answers myself when I've figured them out)


To add what others have said, sometimes really simple looking questions can hide really subtle or complex issues or side effects that a 3 minute google search won't turn up. I think one of the other goals of SO is to have a central clearing ground for all those "gotcha" things - which SO won't get unless people ask the "simple" questions.

I think we'll be a much stronger site if we have more questions rather than less.


If I see a question that can be answered in 3 minutes of googling, I just don't click on it.

If others want to give you their time to answer that stuff for you, then why wouldn't you take advantage of it?


If I RTFM and then STFW for more than 20 minutes, it's time for SO. :)


The funny thing is, people really enjoy answering questions.

I'm not totally sure that even exact repeats are that much of a problem for most people since anyone answering them must be motivated to do so.

On the other hand, some people are extremely bothered by the concept of giving others the opportunity to answer the same question that has already been answered. I think it's the same part of our "programming brain" that forces us to refactor redundant code.

In this case, I think, we may at some point want to realize that answering a simple question is actually fun, and making someone feel bad for posting a simple (even trivial) question isn't really productive.

If we were flooded by the same question ten times a day, then I might have a different observation... currently I'm kinda meh about the whole thing.

I do think we should have a way to create our own long-form answers to certain questions (attached to our homepage) we are passionate about and be able to just reference them in an answer. With that we'd be able to save the time and let them know (rather subtly) that the answer has been there all along. I'm considering doing this through a blog on another site I can reference, but it would be nice if we could do it here.

You must log in to answer this question.