What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

Possible Duplicate:
Discourage code dumps

When perusing questions to answer, I frequently see questions that don't appear to be too complicated, but am greeted by a venerable wall of code after clicking the question. Immediately I think, "wow this is too much effort."

Some questions can be trimmed considerably if the OP gives it some additional thought. (Realizing of course, that some questions are necessarily long.)

Should Stackoverflow (or any SE site for that matter) provide a helpful cautionary notice if the question exceeds a certain limit? Perhaps a message like this:

Your question contains a code sample longer than x characters. You might want to consider revising it to the bare essentials.

Edit:

I am referring mostly to code samples, not the body of the question. Edited to reflect this.

share|improve this question

marked as duplicate by JYelton, animuson, Toon Krijthe, Martijn Pieters, John Saunders Dec 4 '12 at 2:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3  
No. If anything, our biggest problem is overly short questions. –  SLaks Dec 3 '12 at 20:57
3  
Maybe we should just start generating questions automatically instead of having humans ask them. I'll get started on a Prolog script... –  Josh Caswell Dec 3 '12 at 20:59
    
I think something like this could be useful for code. Might help users that just copy-paste their entire program into the box. –  animuson Dec 3 '12 at 20:59
1  
That's what I am referring to mostly. I agree with @SLaks that questions are frequently too short, but code samples can sometimes be overwhelmingly verbose and don't focus on the proper issue. I'll edit to be more precise. –  JYelton Dec 3 '12 at 21:04
    
(closely?) related: How much code is too much?, Discourage code dumps –  Josh Caswell Dec 3 '12 at 21:08
    
@Josh I see, meta.stackexchange.com/q/88842/134987 is precisely what I was thinking of. I wasn't able to find it before I posted. –  JYelton Dec 3 '12 at 21:12
    
@SLaks That one has an undelete vote??? –  Daniel Fischer Dec 4 '12 at 0:55
add comment

1 Answer

If I open a question and see a code snippet 20 lines long, I sigh and roll up my sleeves. Probably a typo somewhere, but maybe there is a more interesting underlying issue.

If I open a question and see a wall of text 20 lines long, I press the back button as quickly as I can. There is almost never anything to be gained from these questions.

Bottom line, we need more code in our questions, not less.

Besides, all this will do is prevent new users from formatting their code as code, and who wants that?

They will paste it there anyway, and you won't even be able to do a quick drag select -> Ctrl+K. You'll have to sift through that mess and decide which part to cull before you can format it.

share|improve this answer
    
Prime example at: stackoverflow.com/q/13691882/161052. I'm not sure. –  JYelton Dec 3 '12 at 21:21
2  
And when you see a hundred or more lines of code instead of just 20 (because, to be honest, 20 isn't all that much)? –  Servy Dec 3 '12 at 21:22
    
Just for reference, the question JYelton linked has 276 lines of code. –  Servy Dec 3 '12 at 21:23
    
@Servy A hundred lines of anything (code or otherwise) is a guarantee that the question is nothing more than a time sink. –  Asad Dec 3 '12 at 21:23
    
@Asad I'm just trying to gauge you're tolerance for code. Also keep in mind some of the very best questions/answers aren't all that short. (Although those very good posts are indeed time sinks.) –  Servy Dec 3 '12 at 21:24
    
@Servy To be clear, the code to text ratio of questions needs to go up (as far as sweeping generalisations go), and the overall length of questions needs to go down –  Asad Dec 3 '12 at 21:25
    
@Asad Agreed, and the exact reverse of that needs to happen for answers. –  Servy Dec 3 '12 at 21:26
    
@JYelton stackoverflow.com/questions/13697209/… –  Asad Dec 4 '12 at 6:24
add comment

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