Update (Dec. 22, 2015): Thanks, everyone, for your feedback to this proposal. We're going to digest this one over the holidays and should have a follow-up announcement answering your questions and addressing your concerns after the new year. We won't be making any hurried decisions on this topic, and certainly not without ample opportunity to integrate your ideas into the final decision. So continue letting us know what you think. You'll hear again from us soon.
Update (Jan. 14, 2016): The promised follow-up is here, requiring attribution and postponing the change to March 1, 2016.
CC-BY-SA is an ideal license for a crowdsourced knowledge base. We’ve benefited immensely from it, our community has gained protection through it, and we look forward to CC-BY-SA continuing to cover prose contributions to Stack Overflow and across the network for all of eternity.
But code is a bit different (pun intended), and it’s always been a little ambiguous how CC-BY-SA covers code. This has led to uncertainty among conscientious developers as they've struggled to understand what (if anything) the license requires of them when grabbing a few lines of code from a post on Stack Exchange. Uncertainty is a drag on productivity, for you and for us, and we feel obligated to make code use more clear.
Starting Feb 1, 2016, all new code contributions to Stack Overflow and Stack Exchange will be covered by the MIT License.
We’ve been working on this problem for a little while now. We’ve consulted with the OSI, enlisted the help of a real-life lawyer, and discussed it exhaustively internally. We’ve come up with a solution that we think is a major improvement upon the status quo.
The new license terms, in brief:
Starting February 1, 2016, contributions across the network will be licensed to the public under the following terms:
- Non-code contributions will continue to be available for use under the terms of CC-BY-SA
- Code contributions will be available for use under the terms of the MIT License
- You don’t have to include the full MIT License in your code base. Contributors agree to give code users permission to ignore the MIT License’s notice preservation requirement, as long as users give reasonable attribution upon request of the copyright holder (or Stack Exchange on behalf of the contributor). This optional exception to the MIT License will live in our terms of service.
That last bullet makes using Stack Exchange easy, and provides added protection to code contributors and users.
For the vast majority of developers, the above is Too Much Information. The new licensing terms don’t change anything. You can do everything you did before and maybe more when you visit Stack Overflow: copy code, tinker, fiddle, put it in your project, and keep building.
But to future-proof your work, we recommend you do one of these 2 things, or both:
- A) Add a comment to your code that links back to the post where you found it, or
- B) Comply with the MIT as it’s typically used, by including the full license text in your source
You’re doing option A already, right? This is just standard operating procedure when it comes to finding code on the internet – a hyperlink comment ensures you’ll be able to debug down the line. But under the new terms a hyperlink comment is more than just pragmatic, it’s a hat-tip, and it’s a tit-for-tat that ensures you’ve complied with a contributor’s terms.
We want to know what you think about the terms described above. Before you let us know, a few anticipated questions answered in brief:
Is it really that simple?
It’s pretty simple. We’re optimizing for ease of compliance and clarity. This scheme lets you be compliant even if you don’t do a thing. You just have to do a thing – provide credit – when and if the original poster asks for it.
My project is Open Source, can't I just include the MIT License?
Yes. Taking advantage of the notice preservation exception is completely optional. When the new terms launch, we'll have easy to follow guidelines in the help center on how to be compliant for a variety of use cases.
What about code contributed before February 1, 2016?
This is just a first step in alleviating licensing ambiguity for users of Stack Overflow and other Stack Exchange sites. Code that was contributed prior to February 1, 2016 will be available for use as it has always been, under the terms of CC-BY-SA. We are looking into ways we might allow users to opt-in old code contributions to the new scheme.
What about other sites in the Stack Exchange network?
These terms will go into effect for all code posted after Feb. 1 on all sites in the Stack Exchange network.
Who came up with this scheme?
You can blame or optionally thank Tim Post, Britton Payne and Sam Brand for this. They also had an enormous amount of help from the Open Source Initiative.
We hope to roll this out February 1, 2016. We know it’s short notice, but we think the proposed terms are a decisive improvement over status quo, and so a change probably can’t come early enough. Please let us know what you think.
code block, is it counted as code? Also, what about things like math blocks on the Math.SE site? Im guessing that would go under CC-By-SA? (related meta post)