156

I've read the FAQs and prompts that coach on how to ask good questions and am careful to follow that advice. I make a good effort to research the problem before asking the question, both on Stack Overflow and elsewhere, and I'm also doing tutorials and reading resources to help improve my skills and understanding overall.

However, as I'm brand new to programming, I have a ton of questions, almost all of which would probably be boring/trivial/too-simple to someone with more experience. And really, if I were to go and study enough general resources for long enough, I could probably avoid having to ask anyone anything.

I don't want to flood Stack Overflow with questions, and I don't want to annoy the people who monitor certain topics, but asking spot questions as I wrestle with examples and concepts is such a powerful learning approach for me and far more efficient.

For those of us who are brand new to programming, how can we make use of this site without coming off as being annoying?

Return to FAQ index

Moderator's Note:

Good FAQ entries contain only one answer, or one answer split up into multiple answers if it is too long. This entry contains multiple answers with differing information that need to be combined into a single answer. Please feel free to combine and organize information in this entry so that it is easier to find and understand.

1

5 Answers 5

136

The amazing thing about the question box on Stack Overflow is that it's magic. That's right, it's magic. It can help you answer your question before you even submit it (see also Rubber Duck Problem Solving). I've probably not asked more questions on Stack Overflow after typing them than I've actually asked. When I found questions that were related to my problem, but for whatever reason the answers it drew did not help me, I cited the question in my question and explained clearly why I was still stuck.

Simply taking the time to step back and organize your problem into a coherent question can go a long way toward solving it yourself. With a system that starts suggesting possible duplicates and related questions as you type, the chances of you solving your own problem before asking increase exponentially. The suggested duplicate / related questions might not contain the exact answer that you need, but they very often show you what you should have been searching for all along.

I really am glad that Stack Exchange spent millions of dollars on building a better rubber duck, the world needed one. But new or beginner questions don't absolutely have to be a solitary experience. If you have a valid programming question and are certain that it hasn't been asked before, it would probably be welcome provided that:

  1. You clearly explain your problem while making every attempt to be as brief as possible. That's part of the rubber duck process that carries over into an actual question. By the time you submit the question, you've looked at many of the suggested duplicates and related links. It helps if you actually read your question out loud a couple of times to make sure it makes sense to someone that knows nothing about the problem you're having.

  2. You show some attempt on your part to solve your problem. If you have no debugging output because you're hopelessly lost on something that's happening as you debug, explain that clearly. Show us every step you've taken so far, why you took it and what happened when you did. If you don't know where to start debugging, keep talking to the duck. It'll come to you.

  3. Optimize your question for our time. Don't post your whole project if you've narrowed your problem down to a certain area. If you haven't at least partially located your problem, you need to keep talking to the rubber duck for a while longer. If you want up-votes and great answers, make good use of our time.

  4. Make sure that you aren't the only one that will benefit from the answers to your questions. Stack Overflow does not have a 'general reference' close reason that indicates the information you want is readily available in respected documentation, but some problems really are too localized. While we do enjoy answering valid programming questions, even simple ones, we don't want to duplicate standard library documentation in an interactive format. When in doubt, keep talking to the duck.

In other words, show us this programmer needs some help and not this programmer is too lazy to be bothered with their problem and wants us to do their work for them. A well written and refined question also shows that you care about the site and community, which goes a long way toward receiving a good response.

We don't frown on beginner questions, we just value our time and want to spend it helping people that will actually get better at what they do as a result. If you can demonstrate that in your question, you'll likely have a good experience.

The advice that you see here is good, but it's not a substitute for common sense. If you worry that your question would likely be inappropriate, keep talking to the duck until you figure it out, or come up with a question that you feel would be appropriate.

7
  • 1
    Thanks, Tim. This is a very helpful answer. As a secondary question, is there any etiquette about the volume of questions assuming each individual question is a good one? And what about reposting essentially a repeat of a question when the first attempt falls flat? Especially if I think I can ask it differently somehow that might give me better odds of getting help.
    – Charles W
    Commented Apr 29, 2012 at 18:41
  • 1
    I partially answered my own question after looking around some more here on meta: meta.stackexchange.com/questions/473/…
    – Charles W
    Commented Apr 29, 2012 at 21:37
  • 5
    @CharlesW Re-posting essentially the same question is very much frowned upon. We see people do that often, and just end up closing and merging everything into the original. This usually results in receiving a warning privately. The best thing to do is 1 - Make your best effort the first time, and 2 - edit aggressively if you see the question ill received.
    – user50049
    Commented Apr 30, 2012 at 7:24
  • @CharlesW Regarding frequency, it depends on your questions. If the community detects that someone is trying to crowd source a project one question at a time, then you'll receive a bad reaction. If the questions aren't really in succession to one another, it should be fine, but go with the 'common sense' thing. If you feel 'icky' about posting something, you probably shouldn't be posting it. Remember, you can take advantage of chat if you're having trouble figuring out what to search for, or just have a series of very basic questions.
    – user50049
    Commented Apr 30, 2012 at 7:26
  • 1
    :keep talking to the rubber duck: might prove fateful for some of us who are already very persistent in their approach, one thing that I have found difficult on SO the barrier of asking a question acceptable to the community, which pushes me to actually lookup my doubts and other facts about my doubts (recursively ...), and I do sometimes end up doing the complete research(taking 2-3 hours) I would do if SO hadn't existed. which to me, makes it a moot point to really ask any question for someone who is always capable of getting the solution by self research even if it takes him, like 4 hours.
    – Optimus
    Commented Jun 9, 2012 at 21:28
  • 3
    @Optimus And thus we have succeeded! Asking here is supposed to be something of a last resort. If you can find the answer yourself, you are going to learn so much better than if we just gave you the answer. Of course, if it isn't a duplicate, you can always self-answer to share the fruits of your labor with the community. Commented Nov 3, 2014 at 20:03
  • This is good advice. But it is not specific to novices, so it does not really answer the question.
    – Raedwald
    Commented May 7, 2016 at 11:37
61
  1. Ask a question on Stack Overflow as a last resort! The Internet is vast, and there are many ways of searching it for stuff. Put forth some reasonable effort to search for stuff before asking.

  2. Ask a question on Stack Overflow when you have a problem, not when you need help. "Help" means that you need someone to guide you through something— what you might get out of a book or a well-written tutorial; when you need to engage in a dialog with someone about the matter before you can understand it.

    Stack Overflow is ultimately for problems, not for getting "help" in this regard. Ask us a question when you have an actual problem in your source code. As a beginner, you're inclined towards needing help a lot more than problems. Ask us when you have actual code that isn't working, not when you need to "get started".

  3. Make a reasonable effort to debug your code before asking us about it. If you don't know how to debug code, make an attempt to learn. IDEs usually have integrated debugging environments. Learn how to use them.

  4. Search the site before you ask. This is a lot harder than it needs to be, because most people don't use the right search topics. They will often put a general overview of the problem in their question. That they're trying to, say, extract certain tags from HTML. When what they're really doing is trying to parse HTML with Regular Expressions, in order to extract tags from HTML. One explains method, which is a very common error people make (don't parse HTML with RegEx's), the other only explains their specific problem.

    So if searching for your problem doesn't yield any results, you need to try to search for the method you're using.

5
  • 13
    +1 for "using StackOverflow as a last resort". There are often too many questions that can be answered with the API or other SO answers.
    – Makoto
    Commented Apr 29, 2012 at 4:28
  • 30
    "Last resort" my arse! Stack Overflow is the first place I look anymore. But I did say look, not ask. Almost every time, I don't need to do the latter after an honest attempt at the former. Commented Apr 29, 2012 at 6:57
  • 1
    -1 for "Ask us a question when you have an actual problem in your source code", because this seems too restrictive. Pedantically, it's occasionally possible to ask a good, on-topic question that doesn't involve code at all. But it's also possible to write a good code-based question where you've made no attempt to solve the problem by writing code because you can't track down any functions in the API you're using that would even help with your problem. Demanding that the asker exhibit "code that isn't working" in this context can only result in an unhelpful dump of surrounding code.
    – Mark Amery
    Commented Nov 15, 2014 at 11:32
  • 9
    +1 for "Ask a question on Stack Overflow as a last resort!" (which is slightly different than using as a last resort.)
    – MadConan
    Commented Jun 25, 2015 at 18:20
21

Here at Stack Overflow, you want to ask practical, answerable questions based on actual problems that you face.

Things you should do when asking:

  • Make sure your question has the following qualities:
  • a specific programming problem
  • a software algorithm
  • software tools commonly used by programmers
  • practical, answerable problems that are unique to the programming profession
  • Do research on the question
  • Even more than doing research to find the answer first, this means do research to make sure that the question isn't already on Stack Overflow. You should make sure not to post duplicates, however, even information you already know is ok to ask about, and even answer yourself.
  • Here's a big one: Do not copy homework questions on to Stack Overflow!!!
  • You can ask about homework; however, do not directly copy your homework questions. Narrow it down to the issue you are facing (won't compile, output is wrong, etc) rather than asking for a complete solution to what you have been asked to do. There is in fact a proper way to ask a homework question, but be very careful if you do.
  • Retain proper etiquette at all times
  • Be nice: Treat others with the same respect you’d want them to treat you. We’re all here to learn together. Be tolerant of others who may not know everything you know. Bring your sense of humor.
  • Be honest: Above all, be honest. If you see misinformation, vote it down. Add comments indicating what, specifically, is wrong. Provide better answers of your own. Best of all — edit and improve the existing questions and answers!
  • Here is the most important: Try as hard as you can not to make the question too trivial, as that may end up causing the question to be down-voted for not being useful to others
  • Remember, all questions here are supposed to help your problem, however, they should still be able to be used by other people in the future. Asking "Why doesn't this program work" isn't acceptable. Subjectivity is also generally frowned upon "What is the best way to do this", is generally not allowed, as there can be multiple right answers. (Although Software Engineering Stack Exchange tends to be a little more lenient on that one than Stack Overflow is, but I think that's really the only one)

Beyond that, you just have to use your own judgment to see whether your question is worth while. Really, the biggest point, is the one in bold above. Make sure that all questions can be used by others in the future. What exactly this entails is up to your own personal judgment.

As long as you follow those general rules, you should be fine. People are only considered "obnoxious" when they repeatedly ask localized or subjective questions that don't help anyone else. Also, the higher reputation you are, the more respected you are in the Stack Exchange community. Answer questions as well as ask them, and try to build up your rep. I know that if I see someone with over 5k rep ask a question that I don't think is very good, I may let it go, where as if I see a user with only 50 rep, I will probably downvote it and/or flag it.

14

It is OK for programming novices to ask questions here. But beware that the format and style of Stack Overflow makes it unsuitable for some of the questions that a novice will have.

We want precise and succinct questions that have precise and succinct answers. When a novice it can be difficult to formulate a precise and succinct question, simply because precision and clarity requires mastery of the jargon and concepts that novices do not yet well understand. And any precise and succinct answer can similarly be incomprehensible to the novice because it employs jargon, concepts and API calls that the novice does not understand.

You might find consulting your teacher or text book more useful than asking a question here. Especially if you are finding it hard to express your problem.

13

Tips for Asking Good Questions

Read the Following Help Center Pages

Read them. Study them. Learn them inside and out, until you can recite them blindfolded from memory. Okay, maybe don't go that far, but seriously, you need to know this stuff really well:

  1. What topics can I ask about here?.

  2. What types of questions should I avoid asking?.

  3. How do I ask a good question?.

  4. How to create a Minimal, Complete, and Verifiable example.

Learn How to Use Google More Effectively

Google can accept special search operators. One of the most powerful is the site:<domain> operator, which limits search results to just the resources appearing in that particular domain. Some examples:

See the operator list for more useful operators.

Using the Built-in Elastic Search More Effectively

One thing that the built-in search can do that Google can't is return search results for literal operator symbols, like * and & instead of "asterisk" and "ampersand", respectively. This is because "most punctuation and special characters are ignored" by Google.

For example, if I search for "Ruby =>" on Google, these are the top results:

https://www.ruby-lang.org/
http://en.wikipedia.org/wiki/Ruby_(programming_language)
http://en.wikipedia.org/wiki/Ruby
http://rubyonrails.org/
http://ruby-doc.org/
http://www.codecademy.com/tracks/ruby
http://rubyinstaller.org/
http://rubyinstaller.org/downloads/
http://rubykoans.com/

None of those takes me directly to any relevant documentation about what the => symbol does in Ruby. However, using the query "=>" ruby with the built-in Elastic Search, the top result I get is:

The built-in search has other special search operators too, so check them out, it might help you find exactly the answer that you need!

Anticipate All the Possible Reasons Why Someone Might Close/Downvote Your Question, and Cover Yourself 100% for Each One

A common reason to downvote is because of lack of research. If you searched for something on Google but didn't find anything that helped you, don't just say

I looked on Google but didn't find anything.

give an example query that you used,

"discovery protocol"

and if the results pages are filled with items that might be a good match, then at least list the first few of them in your question with helpful explanations as to why they weren't helpful.

If you're not going to do the above research, then someone else has to, so you can help everyone out by doing a little research first.

5
  • @RichardPascual I'm sorry, I don't understand what you mean, can you please clarify?
    – user456814
    Commented Jun 18, 2014 at 19:52
  • @cupcake! I liked your emphasis on using search-engine query skills to research answers. My praise was for the reminder in your post to "Show all results, but to also note which ones were helpful... as well as which ones were NOT". There are a lot of for-profit help sites and expert/Q&A blogs that are like landmines in search results... it is doubtful that Google will ever block them all. That's why its helpful if SO folks like us leave subtle sticky-notes wherever we go to flag the content (and their owners) who were truly helpful. Commented Jun 18, 2014 at 20:36
  • @Cupcake The link http://stackoverflow.com/help/off-topicmentioned under point 1 does longer exist. Commented Dec 22, 2015 at 10:51
  • This is good advice, but it is not specific for novices, and so does not really answer the question.
    – Raedwald
    Commented May 7, 2016 at 12:38
  • Google has been getting worse over the years in searches for technical information, now frequently not returning any useful search results when other engines do. For example, when I searched for information on LL(1) parsing and parser table construction, I found far higher quality results from Bing than from Google and the top 7 search engines. Commented Jul 20, 2020 at 11:29

You must log in to answer this question.

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