-8

I answered this question recently but didn't provide an example usage of the method I provided in my answer. A user then added another answer to the question (bringing new elements). Instead of editing my answer, at the end of their answer they mentioned my answer and provided the example usage for the method in my answer.

What should I do in this case? Is it ok to edit both answers to move their example use of my answer's method from their answer to mine?

2
  • 2
    It's fine to include answers in other answers. That's ok. Anyway, it's just like quoting a source (in this case, your answer). There is nothing wrong with this, and you don't need to worry. Two answers with similar information, as long as they aren't exactly the same, are absolutely fine here. Feb 23, 2021 at 19:52
  • @cornonthecob The thing is, his answer is nowhere related to mine besides this text that I think should've been an edit on my answer. That's why I don't really think it's some kind of quoting
    – nalka
    Feb 23, 2021 at 20:06

1 Answer 1

12

No, code should not be added with an edit: When should I make edits to code?

Author of the other answer correctly did not add code to your answer - adding new code to existing answers is essentially prohibited for edits that require review and frowned upon for all other edits. The only real option they had is to post new answer that includes the sample. Fortunately they also had something else to say on the topic so they got real answer where second alternative based on your question was mentioned.

Your options:

  • be happy and do nothing (because you really did not think sample was of any use before that second post anyway)
  • write your own sample without looking at code in the second answer
  • refer to the second answer for the sample.
  • copy the sample with detailed attribution (this is very questionable approach as basically you can't have summary of the link and had to paste whole code, plus it will look like reputation grab)
2

You must log in to answer this question.

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