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?


1 Answer 1


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. ;)

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