Why I downvoted your question on Stack Overflow

If you reached this page you probably posted a poorly written question to Stack Overflow. I, and many with me, expect questions on programming forums to be clear and show some sort of troubleshooting effort on your part. Your question got a -1 for one or more of these reasons:

Unclear question
It is not clear what you are asking. You may have a very clear question on your mind but forgot to include it in your post. I am not going to guess what your problem is. Hint: Ensure that at least one sentence ends with a question mark.
Describe your goal
Sometimes there is a better solution than you think. Include your goal and I may be able to help you find a better solution. The goal may also make it easier to understand your question.
What did you try?
Try to solve the problem yourself before asking for help. Explain briefly what you tried, what results you got and in what way they differ from what you expect. Basic troubleshooting includes outputting the value of important variables, reading the sourcecode one line at a time, setting up a simple test case and so on.
Include source code
Stack Overflow is about programming problems so most questions should include some code. It is often impossible to say where you are doing something wrong without seeing the code. Make sure to describe what the code is supposed to be doing.
Too much source code
Please don't post hundreds of lines of code. Post only the lines causing your problem, not the entire file.
Lack of research
Have you tried googling? Did you read the manual? Did you do some searches for similar questions on SO? Include your findings in your post (for example: I read that ... but it didn't help me because ...).
Do you know the language?
Have you completed a tutorial on the language or did you read an introduction book on the topic? If you are new to the language, please say so in your post. This helps in giving you an answer you can understand.

All these concerns are very real. I do not require a certain style, and I am not picky about spelling and grammatical errors. This is stuff you must include in your post because they are important to give you a good answer, and because they show me and fellow Stack Overflow members that you are prepared to put some effort yourself into solving the problem.

Read more

If you want to read more on this topic and become a Master Asker, head over to Eric S. Raymond's How To Ask Questions The Smart Way and How to Ask - Stack Overflow.

Sincerely,

Emil Vikström
CS undergraduate student