On which Stack Exchange site can someone share code with others, similar to CodeToad?

share|improve this question
write a blog if your code is great enough to share –  JoseK Apr 29 '11 at 11:10
That doesn't really fit with the theme of Q&A... –  Cody Gray Apr 29 '11 at 11:18
add comment

3 Answers

up vote 5 down vote accepted

There are three common methods for this, two appropriate for Stack Overflow, and one for Code Review:

Answer an existing question

Put it on Stack Overflow. The best place to put it is as an answer for an existing question. Search using the search box or google to see if there's a suitable question that your code would be a good answer for.

Convert it to a question

If you can't find a suitable existing question on Stack Overflow, you can ask the question for which your code would be a great answer, then submit the code as an answer. Let's assume your code is a QR code generator:

How do I generate QR codes?

I need a QR code generator. Where is the specification, and are there any pitfalls I should look out for when creating a QR code generator?

Tags: [somelanguage] [qrcode] [algorithm] [barcode]

Then you answer it yourself:

A simple, public domain implementation of this is:


Make sure to answer it quickly (in other words, compose the answer in another window so you can submit the question, then immediately submit the answer) so that other people don't spend a lot of time on it, or worse - close it. Although if it's closed as a duplicate, then you can simply post your answer to the question yours was marked a duplicate of.

Ask others to review it

Another place where it's suitable is http://Codereview.stackexchange.com - Post your code and ask others to critique it. I posted code to Stack Overflow long before Code Review existed in this manner, and it's been moved to codereview, so you can see an example of this here: CodeReview: Tiny Encryption Algorithm for arbitrary sized data

share|improve this answer
One caveat that should be noted is that large implementations (more than several dozen lines of code) may be better put on github or some other code sharing service, and a link from your answer to the repository provided. –  Adam Davis Apr 29 '11 at 11:57
If you choose the convert it to a question option I'd recommend that you get a mod to make it community wiki. Otherwise people may accuse you of writing these questions with the sole purpose of gaining rep. –  Belinda Apr 29 '11 at 14:45
@Belinda I recommend that users ignore people who complain about community wiki and rep whores. If the post is good, they deserve the rep. If it's bad they deserve the negative rep. –  Adam Davis Apr 29 '11 at 14:50
I'm more concerned about downvoting a good answer because it was posted by the OP within minutes of asking, but that may be picked up by the vote fraud script. –  Belinda Apr 29 '11 at 15:03
add comment

This isn't really appropriate for any of the Stack Exchange sites. If your code can help others solve a legitimate question that they have, then by all means, help them by answering their question. Otherwise, there are other sites for sharing code, such as CodeProject.

share|improve this answer
add comment

There is no Stack Exchange site for simply sharing code. Stack Exchange is a network for Q&A sites. If someone on www.stackoverflow.com has a question that you can answer, you can post appropriate and relevant parts of your code there.

share|improve this answer
add comment

You must log in to answer this question.

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