What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 139 Stack Exchange communities.

This question already has an answer here:

I know this has been asked several times. I've read the responses. I'm still very confused.

What are the legal requirements for using samples from SO in other projects? If there are requirements, how should we go about removing them?

Case in point: a user who's question I answered was concerned about the cc license. I had to email him the solution to remove his fears of licensing. That's stupid, I don't want to give out my email address to work around legal issues.

So can someone at this organization clarify this is the intent? If so, what is a legally sufficient means of bypassing the license? One related answer suggested a profile message that source posted would be considered public domain and free of licensing. Is this sufficient?

Regardless of the answer above I'd like to make a recommendation that a 'Public Domain Content' checkbox be added for answers. Since I may pull code from an already public domain source the license does not apply anyway.


http://creativecommons.org/licenses/by-sa/2.5/ that actually clears it up a little, my apologies for being a twit and finding this first. Most of my confusion comes from this question where the basic consent was to 'consult an attorney' which is IMO counter productive.

PS: I still think a "License Free" option for posts would be an ideal solution.

share|improve this question

marked as duplicate by gnat, Martijn Pieters Sep 9 '14 at 16:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

"Public domain" is legally questionable in some countries. IANAL, but I thought copyright/CC fit into more countries legal systems than PD. –  Craig Stuntz Oct 15 '09 at 4:01
License mess?! Everything is CC-BY-SA. Isn't that clear enough? –  LeakyCode Oct 15 '09 at 7:57
CC-BY-SA is horribly restrictive and only slightly less worse than the GPL!! It should be Public Domain or BSDL only. –  Theodore R. Smith Jan 18 '12 at 18:42
"License Free" isn't an option. It would equal granting no specific rights to anybody. –  Kos Jan 7 '14 at 15:29
The license that's closest to what you want ("License Free") is the Unlicense. –  bukzor Mar 10 '14 at 18:10
+1 for adding an "unlicense" checkbox on answers. That would alleviate a lot of my concerns. –  djhaskin987 Mar 12 '14 at 19:16

5 Answers 5

up vote 35 down vote accepted

I had to email him the solution to remove his fears of licensing

Maybe he's afraid of the monsters under his or her bed, too? Is this one user representative of the majority? Or any sizable contingent of the audience?

It's not a license mess, some people are a mess.

The footer says:

user contributed content licensed under cc-wiki with attribution required

The cc-wiki license seems pretty clear to me on this point: free to remix and reuse, as long as you attribute and use a similar license.

That said, a snippet of code falls under excerpt category and thus should be free to use under fair use. Heck, we don't even support giant masses of code being posted, so to me, by definition, everything would be an excerpt. We're not sourceforge, github, or codeplex.

I am not sure this is really a practical ongoing concern except for the truly paranoid.

Of course, just because you're not paranoid doesn't mean they're not out to get ... your code.

share|improve this answer
All your code are belong to us? –  alex Oct 15 '09 at 4:46
I added some simple (and not quite complete) jQuery code to www.civpro.ca to show the user the proper citation if they want to use the information in the questions/answers on that page. –  Brian M. Hunt Oct 15 '09 at 12:50
What if said user wanted to incorporate the code into a commercial application? The cc-wiki license doesn't have exemptions for small snippets--thus the possibility exists of a lawsuit. –  NickAldwin Oct 15 '09 at 19:00
This answer is wrong, and should be revised. Fair use doctrine does not apply to embedding excerpts of copyrighted work into source code. –  Geoff Oxberry Mar 17 '13 at 4:28
Even the Creative Commons suggests you shouldn't use CC for code. SO should probably start building out something now to ask posters if they don't mind dual licensing to avoid anyone telling a lawyer "But Jeff Atwood told me..." ;) Then you can mark legacy un-dual licensed answers with a quick warning. What a mess. –  ruffin Nov 30 '13 at 17:18
Jeff: The question is about removing the copy-left requirements of the CC-BY-SA. Corporate management and even open-source project leaders have a duty to be paranoid about legal troubles. The answer to Do I have to worry about copyright issues for code posted on Stack Overflow? is, in essence, "yes". –  bukzor Mar 10 '14 at 18:32
Full marks, @NickAldwin. This isn't paranoia. This is for real. People take other people to court over stuff like this. –  djhaskin987 Mar 12 '14 at 19:17
@djhaskin987 interesting, can you show us any examples of this happening? URLs? –  Jeff Atwood Mar 13 '14 at 7:11
@JeffAtwood Corporate lawyers are, by nature, paranoid - just because nobody HAS done so doesn't mean it can't happen. And to the aforementioned corporate attourney "We can't be sued" is the only acceptable answer - "It's very unlikely that we would be sued" doesn't cut it –  JRaymond Apr 4 '14 at 18:16
@JRaymond no examples, then? Interesting. Fear, uncertainty, and doubt.. –  Jeff Atwood Apr 6 '14 at 6:56
@JeffAtwood such is the joy of working at an "Old Guard" company - Culture change is nigh to impossible and the strictures are many. Unfortunately this makes things difficult for the lowly developer who just wants to use a code snippet –  JRaymond Apr 7 '14 at 16:23
"everything would be an excerpt": While this might be true for most (?) posts on SO, this is not the case for sites like Code Review (which might include the full source code of small programs). –  unor May 12 '14 at 0:17

Stack Overflow answers simply aren't big enough to be concerned about licensing. Here's how you (I'm using the general "you" here) can deal with it:

  1. Read the answer.
  2. Understand the answer.
  3. Implement a corresponding solution in your own words code.

Or, if you would prefer to copy the code verbatim and comply with the cc-wiki license, include a link to the answer in a comment in your source code.

share|improve this answer
..include a link to the answer asking them to up vote it :) –  Amarghosh Oct 15 '09 at 13:52

CC-BY-SA is not an all-permissive license like the modern BSD type. It's much closer to the GPL, in that derivations have to be under a share-alike license.

For some programmers, this is fine. I work on internal software, so it really doesn't matter what Free/Open Source licenses we use. All we need is permission to use, modify, and distribute internally, and that's what we do.

On the other hand, some of us make money by selling software in the traditional sense, and CC-BY-SA isn't compatible with that business model. (I've had a couple of jobs like that.) Some of us work for companies with lawyers or managers who don't "get" free/open source software. (I've had some clueless managers.) In this case, anything short of a BSD-type license might frighten them.

Nor does the "excerpt" idea necessarily help. There is, as far as I know, no official lower bound of what is copyrightable, and there is not necessarily a right to use excerpts. In the US, "fair use" is in the copyright law, but again there's no actual definition: it's a judgment call that should consider several things. There's legal dangers with rewriting snippets also, in that it isn't clear what's a derivative work. All of these would potentially have to be decided in a court of law, and that's expensive.

So, there is a very real problem for individuals or companies that sell proprietary software and don't want to be in the position of having to defend what they include in court.

I think it would help if we had a handy BSD-type license we could slap onto code snippets as we wished.

share|improve this answer
It could be argued that an excerpt is a small amount of code that is showing a concept, which means that it's enough of a common structure as not to be either patentable nor copyrighted. You can't copyright the opening Dear sir or maddame, for the same reason. I'm still waiting someone to patent for(;;){} –  perbert Oct 15 '09 at 14:53
However, "it could be argued" is not good enough for a lawsuit-averse company, since the place where it would be argued is a courtroom. There's a saying that the only thing worse than winning a lawsuit is losing one. Much better to make sure everything is legally clear without resorting to anything subjective that could wind up in court. –  David Thornley Oct 15 '09 at 15:48
BSD still requires attribution, which can be icky. The absolutely permissive license is the Unlicense. –  bukzor Mar 10 '14 at 18:37
You'll likely be interested to know: Fair use doctrine does not apply to embedding excerpts of copyrighted work into source code.. –  bukzor Mar 10 '14 at 18:50
MIT is OK. Anything else means to see the idea and then write your own code in too many cases. –  akostadinov Jun 9 '14 at 21:13
@bukzor says one random unqualified dude, citing his own logically questionable interpretation of statute and not offering any supporting case law. I'll care when he shows us where his legal theory has been tested in court. –  Mark Amery Feb 20 at 22:31
@MarkAmery: Yea... I've changed my stance on the unlicense. It's a crayon license. The ISC license is the best we've done so far, but I still wish we had an MIT-like that didn't require attribution. –  bukzor Feb 21 at 0:12
@bukzor just to clarify, my response above was to your comment about fair use as it applies to source code. I honestly hadn't noticed that you were the author of another comment here as well. –  Mark Amery Feb 21 at 0:14

See Re-using ideas or small pieces of code from stackoverflow.com also.

Furthermore, in regards "fair use", see http://en.wikipedia.org/wiki/Fair_use#Fair_use_under_United_States_law and some other interesting documents from the Australian government: http://www.copyright.org.au/find-an-answer/browse-by-letter/i/page-1/ - in Australia the term is not "fair use" but "fair dealing" btw: http://en.wikipedia.org/wiki/Fair_dealing#Australia

share|improve this answer
A “fair use” concept does not exist in many countries; the highest German court, for example, has recently ruled on direct quotes and limited them massively (to the effect that there definitely is not something like “fair use” in Germany). That's why I added a blurb into my SO profile dual-licencing my content and urge everyone else to do so, too. –  mirabilos Sep 17 '13 at 18:12

Anything you produce, you own the copyright to. You can release that to the public under whichever license(s) you wish. (Note the plural.) By posting it on SO, you release it under the CC-BY-SA 3.0 license. There's nothing stopping you also releasing it under CC0 or WTFPL (or both).

Wikipedia has a template for “public domain” images: PD-Self:

I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

This seems reasonable. And I don’t see why you’d need to host it elsewhere, or send it over e-mail, to put such a license on it. There’s nothing stopping you putting some code here with a comment at the top:

// License: WTFPL (http://www.wtfpl.net)

That'd be sufficient.

(This answer is licensed under both CC0 and WTFPL.)

share|improve this answer

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