Skip to main content
8 of 20
Added fourth suggestion: external hosting
200_success Mod
  • 145.7k
  • 4
  • 114
  • 284

You have several options for follow-ups:

  1. 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. The checkmark that you confer is the best way to show appreciation on this site, as it gives 15 reputation points and raises that answer to the top. Posting your revised code would be redundant.

  2. 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.

  3. 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. Selfie answers are acceptable on Stack Exchange sites, and even encouraged: there is a self-learner badge you can earn for that. Selfie answers can even be upvoted, downvoted, or commented on in their own right. However, your answer must meet the standards of a Code Review answer, just like any other answer:

  1. 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.) Add a link to it in a comment on the question or in a comment on the most helpful answer.

Although we disallow code in questions to be hosted on an external site, posting your revised code externally is fine, because:

  • The primary concern of the site is make justified suggestions for improving the code. The reviews are more valuable than the final product.
  • The "final" code is supplementary information that is not essential to the question-and-answer process.
  • Comments are considered disposable. If the link dies, we can just delete the obsolete comment.

You must not edit the code in the question, as that would violate the question-and-answer nature of this site. (An exception to that would be if a user wrote a comment saying that your code is completely broken, and needs to be fixed before it can be reviewed.)

You also should not append your revised code to the question. Posting improved code is an answering activity, not a questioning activity. An example of such a problematic edit is Revision 2 of Optimize vector rotation. While the addendum to the question does not necessarily invalidate existing answers, it muddles the question. What are late-coming reviewers supposed to do? Reviewing the original code would be silly, but reviewing the revised code could lead to version skew among the answers.

On the other hand, that improvement would have made a good answer, since it was prefaced with a good justification for the code change. A reviewer who spots a problem with the revised code could post a comment, and it would be clear that the comment pertains to that revision. You could even post multiple selfie answers without muddling the original question.

Here are a few more illustrations of how adding revised code to the question is poor practice:


To end on a positive note, here is an example of what I consider to be a fruitful iterative review:

  1. Python Port Scanner
  2. Python Port Scanner 2.0
  3. Python Port Scanner 2.1
200_success Mod
  • 145.7k
  • 4
  • 114
  • 284