Is it okay to edit the question to include the improved code?
I would like to do so for the following reasons:
- To share the improved code with others
- To show the answering persons that I take their feedback seriously
- To make sure that I understood (and implement) the feedback in the right manner
I understand that the original code must remain untouched otherwise it would invalidate the question.
But how do I handle code review iterations? Do I have to create a new question for each new revision?
In my opinion, writing code is an iterative process. I ask for a review, I consider the feedback and implement it, and then what? Shall I open a new question for the next review round or is it okay to update the question with the improved code (like suggested here)?
This meta question belongs to this post.
Note: that this question has established a new/revised policy for how to edit posts after answers are received. Previous policies have been made obsolete as a result. The previous policy questions have been deleted, but, for those with enough rep, can be seen here:
- https://codereview.meta.stackexchange.com/questions/41/obsolete-iterative-code-reviews-how-can-they-happen-successfully-obsolete
- https://codereview.meta.stackexchange.com/questions/210/obsolete-how-are-reposts-handled-on-code-review-obsolete
- https://codereview.meta.stackexchange.com/questions/1482/obsolete-can-i-edit-my-own-question-to-include-suggested-changes-from-answers
Quick copy/paste link for comments:
[What you may and may not do after receiving answers](https://codereview.meta.stackexchange.com/a/1765)