DEV Community

Discussion on: Do you copy and paste code from Stack Overflow?

Collapse
 
stealthmusic profile image
Jan Wedel • Edited

No I use the concepts.

And actually, if you do so, you violating copyright laws. If there is no explicit licence mentioned, the code is actually simply posted under a personal copyright of the author.
This is important if you use that code somewhere in production...

Collapse
 
moopet profile image
Ben Sinclair

From every StackOverflow page (bottom right):

user contributions licensed under cc by-sa 3.0 with attribution required.

See also the accepted answer for Do I have to worry about copyright issues for code posted on Stack Overflow? on the meta.

Collapse
 
stealthmusic profile image
Jan Wedel

Huh, ich just read the license:
BY -> Attribution required (This is actually not that easy, license material is created automatically in our company, you would need to store and use that information)
SA -> Share alike when modified (This seems to be an issue)

Correct me if I am wrong, but doesn't it actually prevents commercial usage in a proprietary piece of software?

Thread Thread
 
moopet profile image
Ben Sinclair

I think it depends where you use it. Anything trivial (a line or two) I think is basically fair game (notwithstanding things like the true binary farce, etc.)
If it's a function and you're doing more than change variable names then you should credit the author and share changes, but you don't have to open source your whole application.

I think, anyway.

Collapse
 
stealthmusic profile image
Jan Wedel

Wow, I actually searched the page once for license information a couple of years ago. Did that change (I guess not)? Plus, we had some OSS legal consultant that told us, SO falls under copyright laws and we must not copy/paste anything because of legal issues...
So, thanks a lot for correcting my statement, that’s very important!

Thread Thread
 
moopet profile image
Ben Sinclair

Sebastian Baltes has a couple of links about this below that I thought were interesting:

You may find our article about Stack Overflow code snippets in GitHub projects interesting, which has recently been published in Springer's Empirical Software Engineering journal [1]. Beside some information about Stack Overflow's license, we report on an online survey with developers about their awareness regarding Stack Overflow's licensing and its implications (spoiler: they are often not aware of the implications). I also wrote a blog post [2] summarizing some of the results.

[1] rdcu.be/8irZ
[2] empirical-software.engineering/blo...