Often you have a question, you can't find the answer on stack overflow so you google (or think a bit more). Having found the answer you'd like to keep a record so you can find it again later.

Before Stack Overflow I would write a blog post so I could google for it later. Jeff and Joel I think specifically said SO is a good place to replace these blog posts. So what is the best etiquette for adding your answer?

  1. Just ask the question, then post your answer immediately and let voting sort the answers out. This is ok, but it looks like you are just trying to generate reputation, and other people often don't vote or answer, and a lot of the SO information is lost.

  2. Provide the answer in the question and ask the question phrased as "is there a better answer". This allows others to gain reputation, and doesn't look so greedy but makes your answer harder to vote on.

  3. Post your question, let others answer it. If no-one puts the answer you already found, then add it an hour or so later. If someone else gets it then accept their answer (or the best one). This is more selfless with reputation, but makes other people do work you have already done which feels a bit lazy and a waste of everyone's time.

Or maybe there is another way?