I've seen a few posts discussing "what have you tried" comments here, but I thought I'd throw a suggestion out there after recently noticing quite a few of these comments on SO.

If the user has less than x reputation points, posts a question with a programming language tag (e.g. C#), and hasn't used the code tags in their question, then a pop up or alternative page could be shown explicitly asking the user what they have tried. They can leave this blank, but it ensures that they have purposely avoided showing code and, therefore, have not misunderstood that SO isn't for writing your code. This also helps avoid questions being closed when the user is genuinely unaware that this isn't considered a good question.

I understand not every question will be suited to this, but it might be an idea for users posting their first question or have a rep level below 15, for example.


2 Answers 2


Stack Exchange already does a good job of using algorithms to detect problems in posts. I assume detecting code, or the lack of code, is very doable.

However, I don't think it's necessary to redirect the user to a completely separate page. We already show them all kinds of documentation and put up enough roadblocks to let them know what we expect in terms of question quality.

Instead, I propose showing a message that appears, after clicking "Submit", either above or below the post, suggesting that they add code. If they click "Submit Anyway", then the post will go through.

Most questions really should include code. However, not all of them will need it. Thus, such an approach would be helpful, possibly slightly annoying, but would give users an opportunity to add important details that, in most cases, they'll need to add.

  • 1
    I agree with your suggestion of keeping things on the same page, it's a much nicer experience.
    – keyboardP
    Oct 14, 2012 at 23:07

If you're going to change something then I suggest adding some wording to the Ask Question page.

My intuition is that many (although not all) newbies who should be adding code but aren't are actually under some time pressure to get their question answered (client wants it done today or the assignment is due in an hour). To better motivate those OP's I suggest adding wording to effect of: "Here's how to get your answer as quickly as possible". Include tips on proper formatting, clear statement of the problem, a description or code for what the OP has already tried.

Maybe you only show this list to users with less than a certain amount of rep.

  • Have you read the iTunes EULA? Oct 15, 2012 at 2:26
  • @yoda: and that's related to this question how? Oct 15, 2012 at 2:49
  • 4
    Nobody reads the Ask Question page, just like the iTunes EULA. The only time anyone reads it is to quote a sentence to be a jerk to someone who hasn't. Oct 15, 2012 at 2:50
  • Damned if you do, damned if you don't. No matter what you do there's gonna be a jerk telling some guy he should have posted his code. That jerk aside, I say we help those OP's who do actually read the Ask Question page to avoid being hassled by the jerks. Oct 15, 2012 at 3:03
  • I don't disagree; all I'm saying is that the OP has a point... we have no dearth of question askers, so gently nagging those that don't post any code (which will probably be closed as NARQ/NC) might help improve the quality of questions for people to answer. Placing it in the Ask Questions page might be too subtle for most. Oct 15, 2012 at 3:06
  • 5
    How does telling someone that they need to post code make one a jerk?
    – user102937
    Oct 15, 2012 at 4:23

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