Most of us on Stack Overflow expect the OP to have tried something before posting his / her question. Most times, especially in tags like "String" and "regex", people don't show the following things in the first version of their question:

  1. Sample input
  2. Expected output
  3. What they have tried.

Then we keep asking for sample input, output, sample code etc. in comments. Many times the OP doesn't respond immediately leading to people voting and closing such posts as unclear (no complaints here). Then the OP comes back later and (almost always) adds sample input, expected output and his effort in the comments.

Then people again start asking the OP to edit his / her question to add all above-mentioned points. The OP comes back later and then edits the question if someone hadn't done that already.

My observations:

  1. The OP knows whats the sample input and output
  2. The OP has "usually" tried something.
  3. The OP doesn't know that they have to put all the details in the question.

Note that the "How to Ask" part on the "Ask question" page doesn't help a lot in this case. I somehow feel that people just turn a blind eye towards the - "Provide details. Share your research." point on the "ask question" page.

What am I suggesting?

Add 2 checkboxes at least to String and regex tags which ask the OP two questions:

  1. Have you added sample input and expected output (if needed in the question)?
  2. Have you shown what you've tried.

Also provide a warning - Questions not showing sample input, expected output and your research / code can be considered poor and closed by the community. Too many "poor" questions could lead to your account being banned from asking questions". before the question is posted.

The OP has to explicitly check those boxes. This way, I think people posting questions will show proper input, output and add their code in the question. If we see a question where the OP "has checked the boxes" but has not provided input, output or sample code, then it definitely needs to be closed immediately.

I see a lot of questions which get closed as "unclear" because the OP has not shown his attempt (code) or sample input / output. The issue is most times people don't pay a lot of attention to what the "how to ask" part of the page. Yes, it is their mistake but from a different angle, closing such questions could lead to QBans. More QBans means more QBan evasion accounts (which do get caught) and more suspensions.

It is easy to say - If they haven't gone through the help center, their posts need to be closed, but considering the fact that we do close a decent number of questions because of lack of input, output and code, I think it is a problem that we (SO) need to fix by explicitly asking people if they have added certain details.

This will affect the user experience a little. But I think this will reduce the number of questions that get closed as "unclear". Yes, I am assuming that people will pay attention to the check boxes, and I might be wrong, but it is still worth trying IMO.

Update: I am not talking about showing these checkboxes to all users. They can be shown only to :

  1. New users
  2. Users with low rep
  3. Users whose questions have not been received well.
  • 25
    2 check boxes, 10 check boxes... I think all license agreement check boxes are checked before text even shows up and definitely before one can read it - I see no reasons why "people will pay attention to the check boxes" for these once. Maybe we just need buildMyRegex.stackexchange.com... – Alexei Levenkov Jan 22 '17 at 22:07
  • 27
    @AlexeiLevenkov - Well, the problem I see is some people are ready to add details. They just don't know that they need to add them in the initial version of their question. If they check the boxes and still post a question without input,output or code, then they deserve to be QBanned. Checkboxes won't help people who just want answers, they will definitely help people who don't know what to add in a question. Note that one poorly received question can get someone QBanned / rate-limited.. and QBans can be long. – TheLostMind Jan 23 '17 at 5:46
  • 5
    Or, as an alternative, only show these checkboxes for new users - i.e. below a certain reputation threshold or post count or such. That way only new posters get helped more to provide quality questions, while people who already know what to do are not hindered by it. – Carl Colijn Jan 23 '17 at 10:43
  • 1
    And maybe triggering a QBan automatically if people check the boxes and it still get closed with a high downvote score ? (-6 ?) (But this will probably increase complains on Meta about Qban..) – Tensibai Jan 23 '17 at 10:50
  • 12
    @AlexeiLevenkov There's a difference between: "Have you read the ridiculously long cryptic legal mumbo jumbo above? [..]" and "Have you included sample inputs and expected outputs? [..]" – Disillusioned Jan 23 '17 at 11:02
  • 5
    What I like about this is that it's proactive. Give new users some sort of warning when they submit a question (like compile-time errors) rather than let them get hit with a bunch of down and close votes (like run-time errors) later. Of course they're welcome to ignore the warnings in which case the "run-time" errors are well earned. – Disillusioned Jan 23 '17 at 11:21
  • 19
    Argh, no! To hell with the "What they have tried" requirement! We explicitly don't want users to mindlessly dump broken code into questions; making that mandatory means turning literally every question into a "debug my code" question, which are the least useful questions to future readers on all of Stack Overflow. Shog9 declared a popular crusade in 2013 against the mentality that users must include failed attempts in every question, and was entirely right to do so. Let's not reintroduce toxic rules that we successfully defeated years ago. – Mark Amery Jan 23 '17 at 11:21
  • 2
    @MarkAmery That could partly be remedied by vague wording on the checkbox, like: "My question includes a description of what I have tried so far". Or also just explicitly tell them in the same line that "(large code dumps are not appreciated)", using "large" here vaguely to allow for anything but to hint at problematic behavior. Or even include "... or add a minimal working sample" into it as well. Could that still be taken wrongly by a large percentage of new users? – Carl Colijn Jan 23 '17 at 12:43
  • 1
    @MarkAmery - I agree. We don't need to make the show us your code checkbox. But from what I've seen, a lot of questions do get closed because the OP didn't add his / her effort / code. So, I don't see it doing any harm – TheLostMind Jan 23 '17 at 13:26
  • 6
    This solution is too narrow. If you take as step back you will see that these checkboxes don't apply to all questions... but you have no idea what type of question the user is going to ask. A potential way to make it work would be some sort of interactive experience that guides a new user through asking a question. – aw04 Jan 23 '17 at 18:41
  • 1
    @aw04 - Yes, my solution isn't too good for questions that don't need sample input, output and code. I am open to suggestions :) – TheLostMind Jan 24 '17 at 5:06
  • 1
    Wait... I don't have to read the ridiculously long cryptic mumbo jumbo before clicking the checkbox? – user4639281 Jan 24 '17 at 16:58
  • 1
    @TheLostMind sorry, that was a tongue-in-cheek reference to Craig Young's comment above. Failed – user4639281 Jan 24 '17 at 17:02
  • 3
    On another note, we could have a select element with types of questions ("Debugging","How to", etc), then change the checkboxes based on that? Every type of question has a set of criteria which help make them better questions, why limit it to only debugging questions? – user4639281 Jan 24 '17 at 17:02
  • 1
    @bitsum It's only for new users or those with a low reputation, who would actually benefit from the guidance. Many new users's first experience is getting serially downvoted and don't come back. This guidance actually benefits them, besides benefiting the community as a whole by conserving resources spent in editing/reviewing/voting/closing poor questions asked by new users which would go towards improving other questions. – Zesty Jan 26 '17 at 7:07

My biggest concern with a proposal like this is that there's no real bite to guard against people that lie and/or like clicking through checkboxes as fast as they humanly can.

I'm not necessarily opposed to this sort of UX change, but it does have to come with some kind of detriment to the end user. Analogous to how I want reduced close votes for "why isn't this working", I would think that a few silver-badge holders who vote this question closed would trigger some kind of punishment; something like, "oh, you didn't actually do the steps you claimed to as determined by the community, so you can't ask new questions for a week or so."

The main issue that I see is that it could also lead to real inertia to asking questions, even those that are very, very good. Is it the case that it's worth fencing off questions to this degree? Are there any concrete numbers that suggest these kinds of questions are excessive to the point of needing new UX for them?

  • 1
    We can't get data about how many people didn't know that they were supposed to add sample input, sample output and some code. For example I will give you an example : Check this question. I see a lot of such questions each day. I kinda feel sad to see accounts getting QBanned because the OP didn't realize that it was important to add what he / she had tried – TheLostMind Jan 22 '17 at 19:21
  • 3
    Yes, I agree, this approach doesn't prevent people from just clicking through the boxes. I am targeting those people who don't know that they should add code and sample input/output. If they really want to ask decent questions, they will pay attention to what the checkboxes say. – TheLostMind Jan 22 '17 at 19:23
  • 2
    @TheLostMind: I may have misspoke; I meant, do you believe that there's some kind of correlation between the close reasons (like "why isn't this working" and "unclear what you're asking") and adding these checkboxes that would lead to a reduction to questions closed in that fashion? I totally respect that this information may not be possible to get cheaply or directly, but those sorts of questions would be closed with those two reasons. – Makoto Jan 22 '17 at 19:24
  • 2
    Yes. I see many questions which are closed as "unclear because the OP didn't add sample input / output. or "No MVCE" when the OP doesn't show his code. Many times, the OP doesn't know that he / she should add input, output and his effort in the question – TheLostMind Jan 22 '17 at 19:26
  • 2
    I think the detriment is there already (down-votes, question closure, eventual ban). This suggestion seems to be more about these being directed at those "deserving" it (by falsely checking checkboxes). – hyde Jan 23 '17 at 11:05
  • 2
    @TheLostMind - I checked the question you linked. What's the incentive for a new user to give an MCVE etc. in their question when a diamond mod will answer their "give regex" anyway? Practically speaking, that's already basically the best result such a user can hope for. – TigerhawkT3 Jan 24 '17 at 0:31
  • @TigerhawkT3 - If you look at the timeline of the post, my comments and my answer, you will see that I answered the question only after seeing what the OP had tried. I didn't answer the question until the OP showed his effort. I usually wait for the OP to show what he / she has tried. Note that it is not mandatory to show one's code although I personally prefer to answer questions that show effort – TheLostMind Jan 24 '17 at 7:37
  • @TheLostMind - Yes, but it was posted in a comment. Relevant information is supposed to be part of the question, and key stuff like this should ideally be in the original version. – TigerhawkT3 Jan 24 '17 at 7:47
  • @TigerhawkT3 - Agreed, relevant information should be part of the question. I dropped a comment asking the OP to add it in his question. I think relevant information would have been added in the post if the OP had been explicitly asked to add it when the question was being posted. – TheLostMind Jan 24 '17 at 7:50
  • 1
    Stackoverflow is the best place on the internet to get one's programming question answered. A new user is not going to be discouraged from asking a question if they have to check a box against each prerequisite - they would probably be reading those requirements for the first time, so that information would be useful. Beyond a limit, it would get tiring, so that's why it's important to exempt people who pass a certain reputation threshold. – Zesty Jan 25 '17 at 12:09

I think your suggestion is a good one.

But instead of conditional checkboxes based on tags, I'd recommend conditional checkboxes based on reputation on SO.

An user with a lot of reputation in the community is not going to ask a question without all the pertinent information, so there's no need to irritate them by making them declare that they're asking a good question by checking boxes.

For new users, this would be very helpful not only to the community but to the users' own experience. Very frequently, new users ask questions without all relevant information, and get voted down, which must be intimidating. The checkboxes would, thus, actually improve their experience.

This change would also significantly reduce the work of editors, so more questions can be improved with existing resources.

So, make it for new users, and as a privilege for reputation, remove the need to check the boxes.

  • 2
    With this I'd also have an intermediate stage for users with some but not a lot reputation. That they get shown the checkboxes if they have a history of no questions, 1 or 2 questions or a lot of bad ones – TheLethalCoder Jan 25 '17 at 9:28
  • Yes, I was not targeting people with high reputation. I will edit my post to state that explicitly – TheLostMind Jan 25 '17 at 10:39

If we want people to provide 'sample input', 'expected output' and 'what I tried', why don't we help them do that? Apple Bug Report, while not a wonder of usability, presents the user with three or four text boxes, with a label and an explanation what is expected.

There is no reason why SO can't do the same: Three text boxes, clearly labeled, with an info pop-up and the user asking a question has to enter something in each. The question can then be displayed with labels, which will, perhaps, also teach newbies how to structure a question. After all, what we want aren't zeros and ones, we want good questions.

------------UPDATE jan 23, 2018-----------------

This whole debate is still ongoing with no end in sight. SO'ers complain about the low quality of the questions, newbies post earnest questions that are immediately flagged for closing as "unclear what you're asking" and I'm even reading in articles that women won't register at StackOverflow because they are afraid to post anything (comments on Stack Overflow’s developer survey analysis hurts women).

I can't help but think that a lot of this angst is down to people simply not knowing how to ask a question properly. And, sorry, but the SO FAQ is not helping -- even after 3000+ slowly gathered reputation points, it still confuses me. My first questions were no doubt very, very low quality but I happened to send them to a maintainer at MacPorts named Eric Schmidt who happend to have the patience of a saint and who taught me a lot. Emboldened, I joined the Drupal forums and there I came across the best quide to asking a questions I've ever seen and which I'm going to share here:

Would you like your drupal questions answered by community experts? Then read this post - it'll tell you the best way to get answers.

  1. Firstly, if you really want good answers, learn how to ask good questions. I thought I knew how to ask good tech-related questions until I read this: http://catb.org/~esr/faqs/smart-questions.html Then I realised that I did know how to ask good questions, and now I knew how to ask much better questions. [...]*

You basically want to ask your question like this: "I'm trying to achieve [A]. I thought the best way to do this was to [B]. I read the documentation and it said to do [X]. I did it, I expected to see [Y] but actually saw [Z]. What am I doing wrong?"

Out there some drupal genius (like me! lol) reads this question. And immediately knows a few things:

1.1 The outcome that you're trying to achieve. Knowing this, we may have a better suggestion instead of [B] and thereby solve your problem.

1.2 You're already thinking - because of [B]. Whohoo! We know that you're someone who is thinking how to do something which will achieve your outcome. Tech geniuses would rather answer questions from people who are willing to do their own thinking.

1.3 You read documentation - double points. It means you're not asking someone else to do all the hard work. Plus you're learning new stuff. Both good pointers, and you're more likely to get helped.

1.4 When you did [X] you've told us what you expected to see when you tried [X]. That means you're thinking. Then you say that instead of [Y] you saw something else - [Z]. Awesome - that's valuable information.

  1. Read the documentation. Yes, RTFM applies - always. There's a reason documentation is written - and if it's out of date, update it yourself!
  2. Maybe someone else has already asked your question. Search [...]. If nothing shows up, search the internet. If nothing shows up, time to ask your question!
  3. Ask your question in the right channels. [...]
  4. Don't be a support leech. Play nicely! And learn how to be part of a community, particularly a self-organising one.
  5. Lastly, read this post and follow all of this advice! It will transform you into the kind of person whom other people enjoy helping, and take you one step closer to being Certified to Rock! And if someone does something which violates any of these guidelines, gently point them to this post.

Cited from How to get your drupal questions answered which was posted by burningdog on June 24, 2010.

  • I did some formatting (1.1 for the list within a list) and where the text got too specific I replaced it with [...].
  • 3
    "Apple Bug Report" …exactly. Stack Overflow is not a bug reporting service, nor is it a "debug my code" website. We want high quality programming questions, not bug reports. We should therefore optimize for the former, rather than the latter. Many good questions will not even have these components. We don't want to teach people that they must, and we certainly don't want to force people to enter all of them. – Cody Gray Jan 27 '17 at 14:25
  • Stack Overflow is not a bug reporting service? If only it were possible to take a concept and apply it somewhere else ... oh well. – Elise van Looij Jan 27 '17 at 14:35
  • 2
    You might be missing the point. We don't want to structure the "Ask Question" page to force a certain type of question because that's not the type of questions we even want to be asked on this site! – Cody Gray Jan 27 '17 at 14:36

Good idea in general although the practical gain may be lower than the questioner thinks. I think it's still worthwhile to try something there.

Motivation: Yes, there are tons of badly posed questions on StackOverflow. Any improvement we can make there will result in a huge gain because we won't need to comment and close vote. Yes, we do kind of ban users from questions if their questions get closed often, but that is after the fact and after we had the effort.

Drawback: These things get ignored pretty fast. The number of users where it would make a difference is probably limited, not zero though.

So, how to make it most effective and least intrusive for all others and what will be the gain? I vote for implementing a single checkbox/dismisable warning with different slightly text and then perform A/B testing to see the effect. If there is an effect and if it is deemed significant, the change stays, otherwise it's thrown out again.

My text proposal:

Have you added relevant context like example input, desired output and all other things you have tried?

In summary: It may not bring that much in the end but it's worth it and we can test the effectivity while the effort is not too high, so let's do it.

After seeing the good suggestion from Zesty. Yes, an additional reputation threshold above which the message is not shown makes absolut sense for this.

  • 1
    We will never know if it will bring some improvement unless we try it. I think this (or a similar ) approach would help us separate out people who can be "nudged" to add more details from the people who post give me the codez questions (which usually get closed) – TheLostMind Jan 25 '17 at 10:48

First, to restate the suggestion, and make sure my answer is on topic, I am hearing you say that certain tags should have additional hoops to jump through before the question is asked. You are suggesting these hoops be in the form of checkboxes. Short text should accompany the text boxes and their labels, to give explanation for the purpose of the 'hoops' and/or explanation of consequences of ignoring them.

The two implementation hurdles are, as I see it, technical and social.

For technical, there seems to be a new Hot Meta Question every week of someone asking to change the interface for asking a question. Maybe it can be done, maybe it can't, maybe it can be but it is too much work... I don't see the need to hash that out here again. If it can't or won't be done, all of these Meta questions are wasting all of our time. That said, the interface does now perform certain checks on tags, and certain actions based on the results of those checks (synonyms, meta bug/discussion/feature, etc.), so it is probably possible, at least.

For me, the more interesting aspect is social. Who decides which tags get checkboxes, who decides what the checkboxes say, and who decides who sees the checkboxes? I think that can be solved such that this suggestion can be socially viable.

What I am thinking is the following:

If 'a certain amount of rep points' exist for a certain tag, it would be 'eligible' to have a popup/annoying hoops/special set of checkboxes. The amount of rep would be summed from all users, for all non-closed questions, from the beginning of time. The threshold could be a certain number of points, or a certain number of gold/silver/bronze badges, as the community sees fit. I prefer absolute rep points. This threshold is to make sure that we don't waste our time on tags that aren't seen often. If it isn't seen often enough to have sufficient rep, it isn't enough of a problem to preemptively attack bad questions in it, beyond what SO is already doing.

Once eligible, those users with 'a certain amount of recent rep points' in said eligible tag will be permitted to discuss and decide (probably in a public forum such as a Meta question) if additional checkboxes for their certain tag would help, and if so what they might be. Recent is important because the type and number of questions in a tag change over time, and any checkboxes would need to change too. If someone isn't recently answering and gaining rep on any new RegEx questions, then they probably don't have the right to impose the limits on those questions (but could still be heard in the public forum). Certain limits on the number and type of checkboxes would be implemented system wide by employees or moderators, who would also have input/veto power in the decision of these high rep users. Badges may be an easy way to identify such high rep users, but those explicitly do not take recent rep gains into account. It would have to be low because it would be a rolling sum, and harder to maintain, yet high enough that only 10 or so interested Meta participants would be weighing in on the final vote.

This same group would also discuss the rep threshold for hiding these checkboxes. I am not an engineer, but I can't imagine that, if the suggestion of showing checkboxes for tags is technically possible, including a check for rep in a certain tag (sum since beginning of time, not recent) before showing the checkboxes, would be too difficult. Perhaps this figure would be a community wide rule, but it probably wouldn't be so hard to offer flexibility by having the rep points total check against a database instead of a hard coded figure that is in place for every tag. Some busy tags might have a higher threshold (Java: "If your question involves an exception, did you both include the exception text and search SO for the exception name?"), while other less busy ones may have a lower threshold (R: "Is your input data given in X format?").

Someone else will have to weigh in on UI, if this should be a red/yellow/maroon pop up, if the warning message accompanying the checkboxes would need to be the same for all tags or can be customizable by tag, how big and when the checkboxes should appear, etc. There are already heated discussions on Meta about the question UI, I assume we have sufficient experts here to be able to give a good UI if the suggestion itself gains traction.

By the way, if a new asker doesn't understand tags, and tags a [RegEx] question with the only tag being [internet] or some such nonsense, the OP suggestion won't help any of us. And the broader suggestion of making all questions have more hoops to jump through for everyone, including and especially a checkbox to tell people to dump all their broken code in the middle of the question for all types of questions and tags, probably isn't going to fly. How would we deal with retagging it later? Well... if this suggestion is implemented, perhaps only questions that meet criteria are retagged by those having editing privileges, and bad questions with bad tags are just downvoted into oblivion? I don't know, that would be a [discussion] for a later stage of this project, if it makes it that far.


I would prefer a watermark text instead of checkboxes. Something like

Please consider adding input samples and the expected output to your question.

Watermark text is used in a lot of places on SO:
In the "topic" and "tags" field, in the comment box and I'm sure in many more places.

They don't change the user experience at all and are an easy way to display additional information on the screen. Also I imagine it's fairly easy to have customized watermark texts for different tags.

  • 3
    The problem with watermark text is that it goes away as soon as you start typing something, which means it cannot serve as a reminder of things to include in your question (since you need the reminder after you've already started typing, not before). – Cody Gray Jan 25 '17 at 8:43
  • 1
    @CodyGray I have read the OPs text as if the checkboxes were not to remind but rather to inform users of what to add to their question. – Tim Pohlmann Jan 25 '17 at 9:10

You must log in to answer this question.

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