Skip to main content
replaced http://meta.codereview.stackexchange.com/ with https://codereview.meta.stackexchange.com/
Source Link

A new feature called Stack Snippets was introduced that allows users to embed runnable code snippets in their posts. According to the blog post:

If you feel that a particular site should have Stack Snippets, post a feature-request on that site’s meta – if there’s support from the community there, we’ll enable them.

Well, I think Stack Snippets would be pretty great here, for several reasons:

  • Other users can run and test submissions directly from their browser, without even having to click another link
  • Test cases can be embedded naturally into posts, to verify that the code works properly
  • We could hide very long ungolfed commentated snippets within collapsed Stack Snippet blocks, so that people who want to see how everything works could, while the answer wouldn't get too long

Finally, here's an example of Stack Snippets in action. (Note that you can make them non-collapsed by default, so you can still see the code.) Try it out here!Try it out here!

collapsed Stack Snippet

And when expanded:

expanded Stack Snippet

A new feature called Stack Snippets was introduced that allows users to embed runnable code snippets in their posts. According to the blog post:

If you feel that a particular site should have Stack Snippets, post a feature-request on that site’s meta – if there’s support from the community there, we’ll enable them.

Well, I think Stack Snippets would be pretty great here, for several reasons:

  • Other users can run and test submissions directly from their browser, without even having to click another link
  • Test cases can be embedded naturally into posts, to verify that the code works properly
  • We could hide very long ungolfed commentated snippets within collapsed Stack Snippet blocks, so that people who want to see how everything works could, while the answer wouldn't get too long

Finally, here's an example of Stack Snippets in action. (Note that you can make them non-collapsed by default, so you can still see the code.) Try it out here!

collapsed Stack Snippet

And when expanded:

expanded Stack Snippet

A new feature called Stack Snippets was introduced that allows users to embed runnable code snippets in their posts. According to the blog post:

If you feel that a particular site should have Stack Snippets, post a feature-request on that site’s meta – if there’s support from the community there, we’ll enable them.

Well, I think Stack Snippets would be pretty great here, for several reasons:

  • Other users can run and test submissions directly from their browser, without even having to click another link
  • Test cases can be embedded naturally into posts, to verify that the code works properly
  • We could hide very long ungolfed commentated snippets within collapsed Stack Snippet blocks, so that people who want to see how everything works could, while the answer wouldn't get too long

Finally, here's an example of Stack Snippets in action. (Note that you can make them non-collapsed by default, so you can still see the code.) Try it out here!

collapsed Stack Snippet

And when expanded:

expanded Stack Snippet

edited tags
Link
edited tags
Link
Tweeted twitter.com/#!/StackCodeGolf/status/512303039798337536
Source Link
Doorknob Mod
  • 72.1k
  • 2
  • 64
  • 138
Loading