48

Is it a good idea to improve on answers to your own question, once you know more about the topic?

For example: I am new to Stack Overflow, and I asked a simple question. User TylerH gave me a simple answer. A little bit of research on his answer made it so I was now knowledgeable enough on the subject that I could improve on his answer. Would that be acceptable, or should I just write my own answer to my question using my own research based on his answer.

What is the right way to go about something like that? Or should I even go about something like that at all?

4 Answers 4

50

The rule of thumb is that it is acceptable to edit an answer as long as you don't change the meaning and respect the author.

If you want to show exactly how you implemented it and you think that it would be helpful to others then you should probably post a new answer while giving credit to the answer that helped you find your solution. Which one you accept is entirely up to you.

If you have something to add from your research and you are unsure, then adding a comment to the original answer may be better, assuming that it is short.

Other than that, it's hard to say without knowing what type of editing you plan on doing to the other answer.

1
  • 5
    Sometimes, I will put a line at the bottom of the answer, then add more details making it clear I added them. Commented May 19, 2014 at 20:51
19

If you're editing another persons answer it should be to improve the presentation of the answer, not to radically change the actual content itself.

If you have found additional information on the subject and want a more detailed answer, you should write your own. If you simply feel that a given point is correct, but unclear, not well phased, has spelling/grammar/formatting issues, etc. then that is what editing is for.

4
  • Also restrict edits to the presentation if there are (small) factual errors, which might not even be important to the question itself? Commented May 16, 2014 at 3:39
  • 4
    Perhaps with the exception of Community Wiki posts.
    – Joe
    Commented May 16, 2014 at 13:08
  • 2
    @Deduplicator If the author clearly meant one thing and wrote something else by accident, you can fix it. If the authors intentions are clear, and you simply think that their statement is wrong, you should not change it, you should use comments/votes/another answer to indicate that you feel someone else's answer is factually incorrect.
    – Servy
    Commented May 16, 2014 at 13:44
  • @Joe That is correct.
    – Servy
    Commented May 16, 2014 at 13:46
5

The essence of your question is, I think, how to create an answer that combines the knowledge of two people. I suggest that is what the Community Wiki option is for. You could create a new answer that combines information from the original answer and what you have learned, and mark it as Community Wiki.

1

Is it a good idea to improve on answers to your own question, once you know more about the topic?

I think, no.
If you asked a question and got the answer, it's fine.

If it's just a small change, it's outside of this this site to update the answer to fit some specific requirements which are not important for the others reading this answer.

If the change is significant, it's incorrect to make an edit anyway. You need to post a new answer.


And an answer to a bit different question

I've raised a question getting and accepting an answer.

Making my own tests I've found a couple of cases where the code does not work as expected and corrected it.

My solution is the accepted answer with a couple of modifications and I want to give the rep to user that posted it. But also, if someone find the answer in the future, will have a buggie code...

You should write it in comments to answer first.
If comments are ignored and you can and need to correct the answer, you can do it.

code will be so long to be a comment

In this case you can temporary place the code somewhere else (patsebin, for example).

or will make answerer to rewrite itself the code when I already did it....

I don't know anything about you skills level, but anyway, this is meta so the answer should be considered correct for all case, so let's assume following situation:

  • How to calculate number of trailing zeroes in factorial of n?
  • That's the code [and this code calculates wrong for all powers of 5]
  • There is smth wrong, and that's the fix: if (n==5) return 1;

Whould you like to see such edit of your post without any comments?
As the fix really hides the original error without fixing it, such fix makes answer worth, not better.
So I think, the correct way is to inform first. If you fill fix will take a lot of efforts, just show your version.

PS: By the way, the example with factorial incorrect for powers of 5 except if (n==5) return 1; is taken from some book - it was published as a correct solution.

You must log in to answer this question.

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