I looked to see if this is a duplicate on Meta, seems like it isn't, so sorry if it is, but I have seen too many questions tonight asking "Can you write code for me that does ..." or "I require code that does this ...". I checked the Ask Question page and I don't see anything clear that tells users that Stack Overflow isn't a site where you ask others to write code for you. Is there any way we could get the message across that you should post what you tried (or try something) before asking for someone on Stack Overflow to just do it for you? Maybe a popup that appears when the question contains words that seem to be indicative of straight asking for code.
Were you signed in when you clicked "Ask Question"? If so, you won't see the same information that someone new to the community would see. Try logging out first, then click "Ask Question".
The fact is, Stack Exchange does put up lots of barriers, safety nets, FAQ links, guidelines, and other material designed to save the original poster from the embarrassment of posting something that is off topic, not constructive, or not a real question, long before that individual even has a chance to type the first keystroke in that question box.
New users who click Ask Question see a modified version of the How to Ask page prior to advancement to the question box.
Do your homework
Have you thoroughly searched for an answer before asking your question? Sharing your research helps everyone. Tell us what you found and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer!
New users are encouraged to search for the answer as well, and there is a search box on the page just for this purpose.
Additionally, there is information about the importance of being specific and relevant:
If you ask a vague question, you’ll get a vague answer. But if you give us details and context, we can provide a useful answer.
Make it relevant to others
We like to help as many people at a time as we can. Make it clear how your question is relevant to more people than just you, and more of us will be interested in your question and willing to look into it.
Additionally, there is a checkbox at the bottom that says
thanks, I will keep these tips in mind when asking as acknowledgement that he/she read and understand the guidelines prior to posting.
Therefore, I have to agree with Jeff. If you get past this page, you've read the FAQ, you've looked around the site at other questions, you see the enormity of the question box in comparison to your one or two line question, then you probably won't get a lot of sympathy from the community.
I try to be patient with newbies, as we all were new at one point, but the type of questions you describe are asked by people who take a lot of patience to deal with. My advice is to give them the benefit of the doubt, be polite, and simply ask for clarification. Sometimes it just takes someone asking for code for the original poster to realize the importance of including this material and responding appropriately.
Aside from that, if they don't respond in a timely manner, downvote, vote to close as Not a Real Question (not Not Constructive), and move on.