Hear me out:

  1. jsfiddle has awesome gist integration.
  2. Embedding snippets from gist would allow me to not repeat myself.
  3. Publicly editable gists with easy browsing of revision history makes collaborative answering painless.
  4. By including a link to the jsfiddle, anyone, on any platform, can test the code with one click; no trying to reproduce locally or guessing what is going wrong just by reading the code.

For example, I have included a magic link to a jsfiddle in the readme for this gist, check it out:


Wouldn't it be great to be able to embed that nicely formatted code into my question or answer? I understand that this is only really relavent to HTML/JS/CSS questions, but I think it's really cool and it could literally save MINUTES... I mean think about it! MINUTES!!! Aren't you getting excited by how many minutes you could save!?!?

I also think that more integration between Stack Overflow and Gist would create all kinds of awesome in many different scenarios. Am I taking crazy pills here or what?

  • 7
    "The Gist you were looking for has been deleted. Sorry about that!" which is kind of the problem, isn't it? Off-site resources that become critical to the meaning of the post, but are somehow divorced from it.. – Jeff Atwood Jun 7 '12 at 8:28
  • 6
    What badge do you get when Jeff Atwood tells you your idea is bad? – Parker Ault Jun 7 '12 at 12:34
  • 7
    @JeffAtwood but you allow remote image embedding that suffer the same problem? – K.-Michael Aye Dec 19 '12 at 9:24
  • +1. That's really good idea! – skywinder Dec 26 '19 at 8:02

Interesting idea, but SO already has decent code formatting. There is no immediate need for gist support. Additionally, consider how people might use this new tool. It could be used properly, but odds are that it it will likely be abused. What you are suggesting encourages "S3NDMeT3HC0D3Z, I've uploaded my version of the code to gist. Fix it. Now. Please. " type questions.

Once people have a code editor at thier disposal, they may start posting much longer code samples. The point of posting code is for people to give a short bit of background information. Gist integration would make it too easy to work around the SO editor and post enough code to make any experienced developers head **explode*. (Perhaps a slight exaggeration.)

I am intrigued by this idea but ultimately I think it will be harmful to the site.

|improve this answer|||||
  • 1
    Yeah, those are all issues that came to mind for me as well. There's also nothing to stop people from vandalizing your gists, if they were so inclined. Perhaps the ability to associate a gist with a question or answer, and giving the reader the option of fetching and displaying it inline would be more appropriate. That would solve the clutter issue, but not the lazy poster issue. I do, however, believe that the bad behavior you speak of would be severely punished by the community. So maybe a simple "show associated gist" button would be an improvement? – Parker Ault Feb 10 '11 at 13:15
  • 1
    Also, if this were implemented it would be a good idea to let people know that hiding all the code in a gist and requesting that people check it out is bad form, as they add the association. Placing a few relevant snippets in the message body and having the option of letting users view the whole package without leaving the site/page could be a pretty cool feature, in my opinion. – Parker Ault Feb 10 '11 at 13:20

You must log in to answer this question.

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