If you are reading this article, you are probably here because someone told you to read this article. Don’t look at this as a bad thing, this article is here to help you, while also, at the same time, helping StackOverflow community. Let me guess one more thing, you already asked at least one question, it was downvoted and closed before you even got needed answer? If this is true, keep reading this article, I will try to help you learn how to ask a Stackoverflow question properly without been affected by “close-warriors”.
Before you ask who are “close-warrior” let me give you a short explanation. They are SO users aimed at removal of content deemed wrong to the person posting the question rather than the creation of useful content or the improvement of naturally arising low-quality content. This is the trend that was brewing last few years, and it finally exploded, sometime last year.
As Stackoverflow grew, its reputation grew exponentially. Where once it was a haven for professional and enthusiasts developers, today it’s a mainstream help-your-fellow-developer site. This state of affairs is making a lot of people mad and angry. Question/user quality is falling from year to year. Once, people would come to ask decent questions, now this site is full of mediocrity. I would like to rectify this as much as I can.
I will write this article from the perspective of jQuery Mobile but most of things I’m going to say here easily translates to any other topic. If you want to know my Stackoverflow nick is gajotres and I am mainly active in jQuery/jQuery Mobile tags.
Before you write a question
Search, search, search and research before you even open new question window. Stackoverflow is a several years old site; there’s a good chance this problem is already solved and answered. If you can’t google it, then open a topic specific tag and try looking for it by yourself. There’s a good chance your answer is somewhere out there. If you don’t do it yourself, someone else will, thus closing your question as a duplicate. Remember “close-warriors” don’t like previously asked questions. The only thing they want is to close your question; myself included. Nothing personal, every duplicate question will water down a particular topic.
Several things could happen if your question is closed as duplicate/on hold:
- Your question will get closed and linked to a similar question. This other issue may or may not hold an answer to your problem.
- There’s a good chance this linked question will have nothing to do with your question, and you will be left without a proper answer.
- You may want to open another (same) question trying to argue that last one was wrongfully closed. 99% of time someone will also close this question, additionally reporting you for spamming.
- A portion of Stackoverflow users will downvote your question that will severally affect your future questions. Stackoverflow users usually avoid answering questions from low reputation users. If a lot of your questions are deemed low quality, site will permanently close your account.
Before we go any further, make sure to bookmark every similar question/answer. You may use them while writing your future question. Just link them to something you looked but didn’t found useful. This will show that you have spent some time searching for your answer.
What not to ask
- Never ask someone to do your job or assignment, show at least some effort. Instead of asking as to do your job, try it yourself, stumble and ask how to solve your current problem.
- Never ask for opinions. This is one of the options when someone want to close your question. If you need advice, got to your relevant tag, look at the list of top tag contributors. Pick 2-3 of the list, send them an email and kindly as for the advice. People will usually respond, including me.
Now you are ready to ask your question. First write your title carefully, it should not be too long or too short. Usually, everything you want to know should be summarized in the question title.
For example, take a look at this purely written question title: How to click a div on jquery. If you want to understand why open this link and read mentioned the question. You will see that question title (no matter how much grammatically it was badly written) has nothing to do with the question itself. It had taken just 8 minutes before it was permanently closed.
On the other hand this is an example of correctly written title: how to pass parameter in jquery using .on?. It doesn’t matter if this question starts with lowercase letter and on keyword is not mentioned as a function. It’s perfectly clear what user wants to know.
Question content – What have you done so far
This is an important part of your question. Before you write anything, think carefully what you want to say. Imagine you’re asking someone directly about this question, write that down, and make sure it make sense. Don’t write to much, people don’t prefer to read a longer question, this is not a dissertation. At the same time don’t make it to short, everyone needs to understand a point of your question.
Next thing, especially if you are asking a code related question, make sure you add part of your code. I am talking about problematic code, don’t overdo it, add the only code you think it is relevant to your question, nothing else.
For example take a look at templates I’m using for my jQuery Mobile answers:
If you manage to create a working example, don’t forget to tell us how to recreate your problem. You would be amazed how many people forget to do that.
Here’s an example of very well written question. As you can see, everything you need to know is written
One last thing, don’t forget to tell us what you have done. Your question would get closed immediately if you asked your question without even trying to solve it by yourself. When you show us what you have already done, we can know where to look further plus you will show us that you spent some effort trying to solve mentioned the problem.
Question content – What have you expect from us
In the end, you should elaborate your problem, what’s happening and what do you expect from us. This is the most important part of your question. It doesn’t matter how well is your question written if you can your problem correctly. For example, here’s a almost well written question. You should notice that question owner never told what’s wrong with his code, error messages, missing data.
After question was asked
This is important, when you ask your question don’t immediately leave, stay at lease half an hour up to one hour looking at your question. Usually, people will leave you initial comments asking for more information, you need to be able to provide them. You will not get sanctioned because of this, but there’s a good chance other users will disregard your question and go further. Which is specially dangerous if your question is part of the heavily used tag, in a no time your question will end up on 2,3 or 4th page, forgotten and unsolved.
If you receive an answer that has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you’ve found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this. This will significantly improve chances of your question getting answered in the future.
Last but not least, never add follow-up questions to your initial question. The community doesn’t like this. Accept your answer (if it is correct) and open the new question.