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.

Possible Duplicate:
Which solution is better? Edit old answer or add new one?

I found some code in an answer and improved upon that code. I fixed some performance issues and also added functionality.

Should I edit the answer where I found the code and put in my code, and possibly also leave a comment on that answer indicating my edits, or should I add a new answer.

share|improve this question

marked as duplicate by amanaP lanaC A nalP A naM A, Al E., jonsca, Martijn Pieters, Pops Sep 4 '12 at 14:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
not duplicate. in that case he was asking if he could edit his own question –  mkoryak Aug 31 '12 at 15:52

2 Answers 2

up vote 3 down vote accepted

If you're going to make non-trivial changes to someone else's code you really shouldn't edit their answer. If they just left off a parenthesis or semicolon then feel free to edit it in, but if you're going to re-structure it, change the coding style, or "improve" it in any way that you feel is meaningful, (and the post isn't already community wiki) then an edit would be in appropriate. If you just want to point out that something won't work, or that it could be improved, then a comment would be fine. If the changes are significant enough that it couldn't reasonably fit into a comment, then chances are it's significant enough that you should be posting another answer. Make sure that if you're posting an answer that's based on someone else's code you link to that answer and attribute the original author as appropriate.

share|improve this answer

If the answer is completely different. aka new code added etc. Make a new answer.

Otherwise -- edit away!

share|improve this answer
    
its more than 50% different, but less than 75% ;) –  mkoryak Aug 31 '12 at 15:52

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