Hacker News new | ask | show | jobs
by bfLives 362 days ago
> There is a well settled practice in computing that you just don't plagiarize code. Even a small snippet.

I think way many developers use StackOverflow suggests otherwise.

1 comments

In the first place, in order to post to StackOverflow, you are required to have the copyright over the code, and be able to grant them a perpetual license.

They redistribute the material under the CC BY-SA 4.0 license. https://creativecommons.org/licenses/by-sa/4.0/

This allows visitors to use the material, with attribution. One can, of course, use the ideas in a SO answer to develop one's own solution.

> you are required to have the copyright over the code, and be able to grant them a perpetual license.

Which Stack Overflow cannot verify. It might be pulled from a code base, or generated by AI (I would bet a lot is now).

Show me the professional code base with the attribution to stack overflow and I'll eat my hat.
Obviously I cannot show the code base, but when I pick a pre-existing solution from Stackoverflow or elsewhere—though it is quite rare—I do add a comment linking to the source: after all, in case of SA the discussion there might be interesting for the future maintainers of the function.

I just checked, though, and the code base I'm now working with has eight stackoverflow links. Not all are even written by me, according to quick check with git blame and git log -S..

I always do to, for exactly the same reason.