To help reduce the number of questions that consist of "write this program for me" or asking for help without any code samples, should Stack Overflow force any question that has a tag that's code related to include code before submitting? Non-code related tags such as or would not require code.

Do you think this will help improve the quality of questions here? Will it make the interface less usable?

  • 3
    What's a code-related tag?
    – Rob W
    Dec 12, 2012 at 16:42
  • 2
    Forcing users to do stuff is a horrible thing. Prompting them with "Hey, you haven't added any code, what's the deal?" would be better approach IMHO, but I regardless, I'm not sure the issue is large enough to need such radical changes. Users are now forced to not-use "Problem" in titles, and I stick by my thoughts at the time that it's the single worst change Stack Exchange has ever made.
    – Matt
    Dec 12, 2012 at 16:43
  • Any tag involving a name of a programming language such C or C++ should require code. For tags that are not programming languages such as uml or oop, they won't require code. Dec 12, 2012 at 16:43
  • To be honest Matt I think your idea is better. Have a prompt ask are you sure if you don't post code. Dec 12, 2012 at 16:44
  • You'll likely just start seeing people not tagging their questions properly if you do this. They'll tack on the OOP tag just so they don't need to add code, or remove the code related tags, etc. Or you'll just start seeing plain text formatted as code to get the error to go away (it's annoying to see this done as often as it is already).
    – Servy
    Dec 12, 2012 at 16:51

2 Answers 2


Here are some questions that I've written with no code:

Do you think that those questions need more code? and if so, what would be the nature of said code?

  • Your second question does actually have code...not that your point isn't valid.
    – Servy
    Dec 12, 2012 at 16:51
  • @Servy fixed... Dec 12, 2012 at 16:52
  • Your new question had code, it just wasn't formatted as code. I fixed that for you =p
    – Servy
    Dec 12, 2012 at 16:53
  • See also stackoverflow.com/questions/13604013/…
    – Kibbee
    Dec 12, 2012 at 16:53
  • Why do you have the same question listed twice (first and third bullet points)?
    – RobH
    Dec 12, 2012 at 17:01
  • @RobH was an accident Dec 12, 2012 at 17:03
  • 4
    This isn't an answer, it's two questions.
    – vascowhite
    Dec 12, 2012 at 17:11

"Force"? Absolutely not. There are plenty of good code-related questions that don't show code. Granted - by 'plenty', I don't necessarily mean a majority; but it is quite possible to ask good code questions in some cases without code.

As for a 'reminder', I'm not so sure about that. I wouldn't object horribly to the idea, but I'm just not sure it would have enough effect to make it worthwhile doing. I think that many people would just ignore it, and it would just be an annoyance to those whose question does not really need code. It could also prompt some people to post huge blocks of unnecessary code.

I think - as imperfect as it is - the best solution for this is for people reading a question to leave a comment when it seems code is required but was not posted.

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