What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

What is the normal practice when you have a problem like this:

You have a snippet of code (small or big) and want to solve problems and improve it together with the community.

Normally you get answers, each suggesting solutions to special parts in the code or general things. When you implement the suggestions or improve the code the source to discuss changes and the old code is not that relevant anymore.

So how do you handle this?

  • Edit the code in your original post? Doesn't seem good, answers wouldn't match the question anymore.
  • Post a new question with the updated code, name this post like the original with a "#2" or sth. at the end, insert links in posts, pointing to the previous and next corresponding post.
  • Sth. better?

In consideration of the fact I am new, I want to make sure I am doing it right. To clarify what I mean, please look at my question. Assuming I implemented all aspects the first answer suggests, what to do? Would this example really be in better hands at Code Review?

share|improve this question
4  
If you have code that you want to "improve together with the community", you should post a question on Code Review, not Stack Overflow. (Aside from that, I don't understand this question.) –  Cody Gray Aug 23 '11 at 10:13

1 Answer 1

Generally, your question should reflect the current state of the problem you have. Any visitor should be able to read your question and post an answer that matches the question in its current state.

Also note that I am implying here that you have a problem that actually can be solved and there will ultimately be one answer that can be accepted. If you're just looking for a list of "How do I refine my code?" answers, you're doing it wrong.


Edit the code in your original post? Doesn't seem good, answers wouldn't match the question anymore.

Yes, they wouldn't match anymore, but the users answering should also update their answers to reflect the change. In the end we want matching questions and answers that are easy to read for others, without having to read through the whole comment exchange and history, even in a few months from now.

You can make use of "Update #1: ..." parts in your question, but they will decrease readability and don't make sense when you ultimately don't need older stuff in the question's body anyway.

If users fail to update their answers, these will also become outdated anyway and could be deleted by their respective owners, a moderator, or will eventually float at the bottom of the answer list if you choose to upvote and/or accept the best answer.

In any case, you will eventually have to accept the version of an answer that really helped you solve the problem. If it's lacking a few details, just ask the users if they could update their posts or suggest an edit that includes the missing information.

Post a new question with the updated code, name this post like the original with a "#2" or sth. at the end, insert links in posts, pointing to the previous and next corresponding post.

Definitely no. If you require users to look at multiple questions to get the whole picture, you're doing it wrong. Also think of passing-by visitors: They need to get the whole idea in one question only.

Apart from that, this would leave your old question in an undesired state of ... uhm ... nothing. A work in progress that isn't solved and can't be solved, because it depends on a newer question.

share|improve this answer

You must log in to answer this question.

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