Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Came across this today how can i check the time and date are available using sql in jsp? cry

Can a check not be added so that questions are not allowed to be asked if they start with code and/or must have x amount of text before code can be added?

This would encourage people to explain their problem rather than just code dump and waffle. AND, It would reduce the amount of flagging needed on poor quality questions (and save the time of mods).

share|improve this question
Is scrolling past the code to the question difficult? What's the difference between codedump-waffle and waffle-codedump? The position of the codedump doesn't affect the quality of the question. – Igby Largeman Feb 12 '12 at 1:11
@IgbyLargeman: Oh really? Do you have any data, because the questions I can remember, that started with code, were worse. (They're so bad that I can't find any besides the OP's good example, since (1) They've all been deleted or edited and (2) I can't think of any good way to find these in the SEDE.) I'm confident that questions that start this way will be deleted more and scored lower, and for good reason. It shows a lack of effort and a lack of thought to crystallize the problem. – Awesome Poodles Feb 12 '12 at 3:53
We should be thankful there is any code. – Wesley Murch Feb 12 '12 at 7:45
It may act as somewhat of an "early warning system" to the person asking the question, but it's also a bit low-level. If someone posts a question that's poorly constructed, putting code at the top of it is the least of our worries. – Jared Farrish Feb 12 '12 at 9:41
@IgbyLargeman No, but as Brock points out, it is usually questions that start with code that don't go on to give much of an explanation. – Relequestual Feb 12 '12 at 10:22
@BrockAdams You are right, questions that start with code are much more likely to be badly worded and in need of a reminder to explain their situation first. – Relequestual Feb 12 '12 at 10:23
@Madmartigan A block of code with just "It doesn't do x, don't know why" is just as worthless as no code imo. – Relequestual Feb 12 '12 at 10:24
@JaredFarrish True, however I think by reminding them that they need to explain what they are trying to do, clearly and objectively, will reduce the amount of chaff. – Relequestual Feb 12 '12 at 10:25
5 down votes!? Seriously? If you downvote, please explain why... – Relequestual Feb 12 '12 at 10:26
Yeah, but there's so many ways to "nanny" people. Why stop there? (Note, I feel you on the downvotes; it just happened to me. I haven't done so, but I guess it's people voting they don't agree with the idea.) – Jared Farrish Feb 12 '12 at 10:28
@JaredFarrish It's the one I see most often, and usually results in the question in need of flagging or being deleted. What other problems do you see so often that have so easy a fix? – Relequestual Feb 12 '12 at 10:30
Just posted.. I don't know, is that ironic? – Jared Farrish Feb 12 '12 at 10:30
@JaredFarrish, Yes. One more anecdotal proof that this feature request has merit. I wonder if someone can produce a counter example with non-trivial code -- EG more than a couple words worth? – Awesome Poodles Feb 13 '12 at 4:02
up vote 1 down vote accepted

If the problem can be explained well enough in the title, there might be no need for any body text other than the code.

For example

  • "How do you write a semaphore in X", with example code in another language.
  • "Why doesn't $foo change in the outer scope", with Bash code showing a grep | while loop.
share|improve this answer

I don't see what the advantage will be when people first explain their question. I don't think it is a quality issue when people first write their code as long as they do explain it.

The only (minor) advantage I see of first explaining it is that it will be displayed in the excerpt (or intro) on an overview page. Instead of seeing code without formatting in the overview.

share|improve this answer
I think this is more than a minor advantage, but no, not enough to introduce a check on "code-first". – Gert Arnold Feb 12 '12 at 11:44

You must log in to answer this question.

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