Skip to main content

Writing a good question on Stack Overflow

If you’re new to asking questions on Stack Overflow and frustrated by having your questions downvoted and closed, don’t be discouraged. There are practices you can apply to improve the chance that someone will be able to help. This is not just good for you - it also helps the community build up shared knowledge that’s good for everyone.

The single most important piece of advice we have for you is this:

Make it as easy as possible for someone to answer your question.

That is essentially the sum of this entire section of the site. You’re probably well aware that anything that’s easy to use attracts people and becomes popular. By extension, anything that’s hard to use is sure to frustrate and drive people away, or be returned by negative reactions. A question on Stack Overflow is no different.

If you put more effort into making your question easier to read and understand, it will be answered more quickly.

Asking a good question takes effort, but that effort drastically increases the chance that you will resolve the problem at hand. Additionally, what many people don’t realize is this:

The effort of constructing a good question for Stack Overflow often leads you to discover the answer on your own.

By putting in the effort outlined in this site, we feel that you will almost certainly get a solution faster, even if you didn’t actually have to post the question at all! And if you do find the answer on your own, know that it’s encouraged to post the question anyway, and post your solution along with it. It’s completely OK to answer your own question, and it helps build the body of knowledge for others to use in the future.