We know Stack Overflow has a high standard regarding plagiarism in the answers. However, I believe it falls short when it comes to the questions.
Every now and then I see a question where OP says "here is my code", but "their" code is just a verbatim copy of some original code (I often recognise the copied code or I know the author of the copied code). Because of my scientific/academic background those copies without attribution really annoy me.
What is the consensus here, if any? Should we:
- Leave a comment to OP, like "hey, mate, please reference the author";
- Edit the question with the due reference;
- Flag the question as plagiarism;
- Do nothing and move on.
It seems to me that as long as the question is on-topic the consensus is "do nothing and move on"... but I hope I'm wrong here.
EDIT: Since this question has gained considerable attention let me explain what I mean by “copy”: I’m not talking about one-liners or just a couple of methods, I’m talking about copying a full, working code: I’m active in the d3.js community, in which OP normally shares the entire code for creating a data visualisation. By entire I mean the whole thing, from the opening <script>
tag to the closing </script>
tag. Those codes are often copied ipsis litteris (comments included) from books or tutorials about D3.
To better put it, as brilliantly explained in a comment, this is not a "question about who technically owns the code, whether it's you or your employer. It's not just a semantic issue about the definition of 'my'. It's a rather clear-cut case of directly copy-pasting code that someone else has created, and failing to provide proper attribution, in flagrant violation of our rules" (Gray, 2019).
count[i++]++;
or something similarly minor), but that's not something we can in all cases hope to enforce.