I have reviewed/read this page: http://blog.stackoverflow.com/2009/06/attribution-required/

Which is linked from the bottom of every stackoverflow.com page.

How does it work when I want to use a small piece of code, or a [small] idea contributed by someone to stackoverflow, but only in code?

I.e. not "republishing" the content, but simply using the content as a starting point/idea, and maybe re-using the same classes etc.

Would it be ok to do so without attributing every detail?

Thanks!

share|improve this question

migrated from stackoverflow.com Jul 13 '12 at 15:04

1 Answer

up vote 14 down vote accepted

All content contributed by users on Stack Overflow is released under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license. That page and the Attribution Required blog post cover what you need to do when you're republishing content from a Stack Exchange site somewhere else.

If you're reading code snippets from Stack Overflow and using them to make your software work, then you're using the site as it was meant to be used. (I'm assuming you're not just copy/pasting large chunks of code verbatim. I doubt that would work for 99% of the code on here anyway.) You don't have to disclose this in the user interface or documentation of your product, but it would be a good idea (mostly for your own benefit) to document where that code came from in a source code comment. That way, when you come back to that code for maintenance, you can go back to the original source for any additional information you may need.

share|improve this answer
1  
+1 for but it would be a good idea (mostly for your own benefit) to document where that code came from in a source code comment – JimmyPena Jul 13 '12 at 18:08
Bill, thank you - that clarifies. So I assume the "Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one." part of the CC BY-SA 3.0 license does not apply to the limited use ("reading code snippets from Stack Overflow and using them to make your software work") we discussed here? – Roel Jul 18 '12 at 3:32
3  
@Roel I don't think so. I think that only applies when you're republishing the code or someone's explanation of some code on a blog, in a book, etc. Using code you find here as a guide to getting your own software to work shouldn't require you to release your software itself under the same license. If it did, most of us would be in violation. – Bill the Lizard Jul 18 '12 at 11:06
2  
@Roel, you asked for a company confirmation, so here it is: While it's not legally necessary, to be on the really safe side, I'd encourage you to include some kind of attribution of the source in a source code comment, as Bill suggests. But yes, you may absolutely use code snippets (excerpts) in your code without public attribution, as long as you aren't publishing it somewhere. – Jaydles Jul 31 '12 at 21:11
@Roel, you asked for further clarification that you wouldn't have to release your software under the "share alike" clause. I'd reiterate that it sounds like the type of excerpting you're describing would be fair use of a quote or excerpt, which would not require that, but it's impossible to say for sure, as it's an interpretation of what constitutes legitimate excerpting. – Jaydles Aug 2 '12 at 20:51
Fair use doctrine states that length is not a factor. If you plan on sharing or distributing your code at all, the viral nature of the CC-BY-SA license dictates that the entire work falls under that license. If you want to share your work, but don't want it to fall under that license, you should not use code from SO directly. Ideas and concepts aren't covered under the license, so presumably, if you understand what code does, you can reimplement it yourself. – Geoff Oxberry Mar 17 at 5:21

You must log in to answer this question.

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