You should use the example to understand the underlying problem, at which point you will be well-equipped to write your own one-liner.
If you can’t write it using your own understanding of the problem, you’re not an adequate programmer and need to improve your skill-set … which won’t happen if you just keep plagiarizing code you don’t understand.
You're basically just repeating that your opinion is the right opinion.
I don't agree that such example is plagiarism and I'm sure a lot of people also would disagree that that's plagiarism.
> You should use the example to understand the underlying problem, at which point you will be well-equipped to write your own one-liner.
> If you can’t write it using your own understanding of the problem, you’re not an adequate programmer and need to improve your skill-set … which won’t happen if you just keep plagiarizing code you don’t understand.
Who says you can't write it by your own, or you don't understand it? Stack overflow and tools such as copilot are often about saving time, not that you would be unable to figure it out by yourself.
And besides that, the point of those examples is that a lot of people without searching for those stack overflow posts, would type that exact same code character by character.
What constitutes as plagiarism and what doesn't, outside of what the law says, yes.
> Does a simple 2-ary function call of a well-defined API qualify as “taking someone else's work or ideas and passing them off as one's own.”?
So you agree that taking some code verbatim from SO is not plagiarism then?
What about this, would copy pasting this verbatim be plagiarism?
https://stackoverflow.com/a/959004
And this?
https://stackoverflow.com/a/45049763