I've written some nice and well commented code snippets I would like to publish on Stackoverflow for the others. Nevertheless I wasn't able to find out if there is even this possibility. Does anybody know, if SO has some service for posting code snippets?

  • 1
    I put a blog together of my best Stack Overflow answers. I've seen other people on Stack Overflow do the same. I've kept my writing skills up by writing for the blog. Maybe you could publish a blog with your code interests? May 3, 2013 at 14:00
  • Seems like a nice idea to me :) thx for a tip May 4, 2013 at 10:24

2 Answers 2


No, there's no such feature. Stack Overflow isn't a blog service or a code hosting service.

You can use the "About Me" box in your profile for this though. Post a few links to your favorite snippets or to your snippet repository.

The other thing you can do is "disguise" your snippets in self-answered Q&A pairs. But if you go this route, please keep in mind that self-answered questions are subject to the same rules as all others. You must have a real question, with a concrete problem that your code snippet would address. (And the snippet would need to be included in the answer, not just linked to.)

  • thanks... I just have a few snippets on my HDD, I've written a few months ago so I just wanted to post them somewhere :] May 3, 2013 at 7:52
  • 2
    You can use things like gist.github.com to share your snippets easily (and post links to those in your profile) for example.
    – Mat
    May 3, 2013 at 7:55

If you're able to come up with a valid interesting question for each of the snippets so that the snippet answers the question, then feel free to post the questions and post the snippets as answers (with comments and explanations).

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