4
\$\begingroup\$

While the consensus is that it is not okay to add someone else's linked code to a question, there is a post that is off-topic where the OP added an answer with code that would make the question on-topic.

Can the code from the answer be used to update the code in the question, and then the answer deleted?

If this is the case, then can this be done by anyone or should it be the OP's responsibility?

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

Is it okay to update code of an off-topic question using code from an answer?

Yes

The answerer has provided the code under the current user contributions license, so no concern for the user being a copyright troll. And what harm is there to Code Review by fixing the problem for the user?

Can the code from the answer be used to update the code in the question, and then the answer deleted?

Yes I've done so before. My interpersonal skills can be somewhat lacking, so getting a user to edit the question can be challenging. As such I have chose to just edit the question, downvote the answer (with a comment) and then vote to delete the obsolete answer.

Forcing me and others to have to do something we're bad at, when we could otherwise clean up the question, seems like unneeded red tape.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks - I updated the code and VTD'd the answer. \$\endgroup\$ Mar 29, 2021 at 18:02
  • 3
    \$\begingroup\$ @SᴀᴍOnᴇᴌᴀ I've just double checked the linked question and answer. I've now noticed I've failed to do my due diligence of properly checking the linked post. I believe I've answered a similar but different question. I don't think the user wanted to make the question on-topic and mistook the answer box for a way to do so (what I answered) but the situation seems like the OP never has or will want a code review; where the proper course of action is to just leave the posts to be roombaed. I decided to comment because I'm not feeling 100% today. Sorry, I think I've answered the wrong question. \$\endgroup\$
    – Peilonrayz Mod
    Mar 29, 2021 at 18:17

You must log in to answer this question.

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