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

Maybe I am not the first one who got this idea.

There are many programming questions asked and answered on these sites. My idea is when the question or answer consists of a lot of code and the user wants it, he must copy-paste it. So how about providing a download button which will download the code as a file?

share|improve this question

marked as duplicate by Martijn Pieters, Tim Post Dec 13 '13 at 18:12

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.

    
You could install Select Code Block Buttons Script –  Martijn Pieters Dec 13 '13 at 17:44
2  
If you download the file then you need to open it again... I don't see how it's a significant improvement on copy and paste... "a lot" of code really isn't that much, there's only 30KB in total allowed so it's always a small size (that much code is a bad question though). –  ben is uǝq backwards Dec 13 '13 at 17:44
    
Martijn's suggestion to just implement this using a user script would be your best bet here - but really, look out for questions that contain that much code. It's very rare that so much code would be warranted, and you might get sucked into walking someone through the entire debugging process, which can be as exhausting as it is exhaustive. Some folks can just suck the blood right out of you when it comes to that. –  Tim Post Dec 13 '13 at 18:14
1  
Large blocks of code are generally not encouraged on SO - neither in questions, nor in answers. –  Pëkka Dec 13 '13 at 18:42

1 Answer 1

We don't want to encourage users to be posting very large blocks of code, to the point that they would need to leverage a feature like this. If you are coming across questions with this much code then the solution is to remove the unnecessary code, or encourage the author to do so.

If answers are containing that much code then it's a sign that the questions are too broad, and should be narrowed in scope.

share|improve this answer

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