What should I do when someone answers my question?

The first thing you should do after reading someone's answer to your question is vote on the answer, like any user with sufficient reputation does. Vote up answers that are helpful, and vote down answers that give poor advice. Other users will also vote on answers to your question.

As the author of the question, you have an additional option: accepting the answer that gives you the most helpful advice. To mark an answer as accepted, click on the check mark beside the answer to toggle it from greyed out to filled in. You may change which answer is accepted, or simply un-accept the accepted answer, at any time.

Accepting an answer is not mandatory; do not feel compelled to accept the first answer you receive. Wait until you receive an answer that answers your question well.

What should I not do?

Do not change the code in the question after receiving an answer. Incorporating advice from an answer into the question violates the question-and-answer nature of this site.

Do not add an improved version of the code after receiving an answer. Including revised versions of the code makes the question confusing, especially if someone later reviews the newer code.

Please refrain from posting a comment that merely says "thank you." Voting and accepting are the preferred ways of saying "thank you" on this site, as they confer reputation points. Comments are meant for requesting clarification, leaving constructive criticism, or adding relevant but minor additional information—not for socializing.

I improved my code based on the reviews. What next?

First of all, consider accepting one of the answers. If one of the answers gives you good advice with clear directions for improving your code, just accept the best answer and upvote any other answers you feel were helpful. We don't necessarily have to see exactly how you applied the advice to your code.

If you'd like to share the revised version of your code, the following are acceptable (and by no means mandatory) options:

  1. Posting a new question. If you incorporate advice from one or more answers, but are still unsure that the code is as good as it should be, then post a new question with your revised code. For the benefit of other users, add mutual links: mention the previous question in the new question, and add a comment on the old question linking to the follow-up question.

  2. Posting a self-answer. If you want to show everyone how you improved your code, but don't want to ask another question, then post an answer to your own question. Self-answers are acceptable on Stack Exchange sites, and even encouraged: there is a Self-Learner badge you can earn for that. Please note:

  • Your answer must meet the standards of a Code Review answer, just like any other answer. Describe what you changed, and why. Code-only answers that don't actually review the code are insufficient and are subject to deletion.
  • Give credit to any other users who may have helped you. Posting a selfie that merely reiterates an existing answer without adding new insight would deprive another user of well deserved reputation. Also consider making your selfie community wiki if you feel that earning reputation from it would be unfair. Moderators may also activate community wiki status on self-answers at their discretion.
  1. Sharing your code on an external site. If you are unwilling to write a sufficient explanation to constitute a good Code Review answer, then it would be best to refrain from posting your follow-up on Code Review at all. Instead, you may host your revised code on an external site (e.g. GitHub, GitHub Gist, Pastebin, JSBin, JSFiddle, Ideone, SQLFiddle, your personal blog, etc.) If your off-site host has revision capabilities, then include a link to the revision that was posted in the question. Format the edit as if it was always part of the question, and not as if it is an "Update." Something like the following:

This code and updates are available at: [this repository](...some revision...)

You could alternatively link to it in a comment on the question or in a comment on the most helpful answer.