Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicates:
Can I post a question with an answer?
Posting and answering questions you have already found the answer to
Should I not answer my own questions?
Should I ask questions I already know the answer to and answer them myself?
Can I answer my own questions, even if I knew the answer before asking?

I would like to share on StackOverflow code I have written to solve a problem.
After searching the Internet in vain for a solution, I solved it myself, and want to help others who might have the same problem.
What is the best way to do this? Should I ask a question and answer it myself?

share|improve this question

marked as duplicate by Michael Mrozek, Dori Jun 12 '11 at 7:17

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.

I want a lot of people to do this instead of writing blogs. It will be easier for google to search it and you get precious rep, if people find it useful. – Reno Jun 12 '11 at 7:17

Write it as a question anyway. For example, write a question for "How do I do XYZ?", where XYZ is whatever your library does. Then answer it yourself with the code.

Note however that posting it means you're basically giving up license rights to your code because everything here is under a creative commons license.

Also note that others may write solutions as answers that are better than yours. ;)

share|improve this answer

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