5

Content posted on Stack Exchange sites like Stack Overflow or Electrical Engineering are CC-BY-SA 3.0 licensed.

User contributions licensed under cc-by-sa 3.0

See the footer of any SE site:

enter image description here

As far as I can see this has two implications for me and many other users:

  1. If I post code snippets from my Apache 2.0 licensed project, I loose the permissiveness of my own license, because Stack Exchange is overruling this by the chosen Share-Alike license.

    I need to always point to my own sources on e.g. GitHub to give users a chance to use my code snippets and solutions under a permissive license policy like Apache 2.0, BSD-3, MIT, ...

  2. I cannot use any of the posted code snippets in my projects, because the chosen Share-Alike license is not compatible with Apache 2.0

Any thought from Stack Exchange regarding these facts?

If an admin feels it's a meta question, please move it. But since SE has an open source site, we should discuss it openly and not hidden behind the meta walls.


Similar discussions:

1
  • Asking for input from the Stack Exchange team (or about their motivation) is off-topic here (such questions would indeed have to be asked on the Meta Stack Exchange site). But you can keep your question like this and just ask us (the community here on Open Source) if you two implications are correct :)
    – unor
    Commented Jun 18, 2018 at 23:25

2 Answers 2

8

In brief, item #1 is incorrect, and item #2 is broadly correct, with possible exceptions.

You may release a copyrighted work under any number of licenses independently and simultaneously. The fact that you offer some of your code under a CC BY-SA in no way impedes your ability to also offer it under the Apache 2 license, and vice versa. You are the copyright holder; you have the power to offer any sets of nonexclusive permissions in any number of licenses grants. (If you grant someone exclusive rights to some copyright right, then obviously you can't offer it to anyone else.)

If you want to include someone else's CC BY-SA work into your work, the ShareAlike requirements apply, and your work as a whole must by under CC BY-SA. You may offer your own copyrighted parts simultaneously under Apache 2, so if the CC-licensed are removed later, the ShareAlike obligations go away. If you want to spare other people this complication, you may simultaneously license your Stack Overflow posts under a permissive license (some people do this by a blanket statement in their user profile) so others can use your code under more permissive terms.

Depending on the triviality of the CC BY-SA code, or the degree to which there is only one way to do it (i.e., it doesn't possess any creativity whatsoever, per the merger doctrine), it might be that the snippet isn't copyrighted, or its use is defensible under de minimis or fair use/dealing in your jurisdiction. Otherwise, you need permission from the copyright holder to use it without abiding by the ShareAlike terms.

Note that the management of Stack Overflow held extensive debate about licensing code from Stack Overflow posts under the MIT license in 2015-16, with the decision ultimately being "postponed indefinitely."

0

If posting a code snippet is an issue for you, you could explain your solution in the answer and only add a link to your code.

For example you could post longer code pieces using gist.github or link to a specific line in a github repo file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.