# Change the licensing of code in Code Review contributions to GNU GPL

It seems that one of the community's main aversions to changing from the current CC license, to a more permissive MIT license, is the idea that people seem to not want to simply give code away.

200_success

[O]ur intention is to share code for discussion, not to give it away

Joe Wallis

We're not here as free, near public domain, code writers

This then begs the question, what is it about CC BY-SA 3.0 that makes it so much more desirable than MIT?

• Is it because you specifically don't want people to be able to use the code in real-world software projects?
• I find that hard to believe. It doesn't hold up, because CC does allow people to use the code in real-world software projects. Just as long as they fulfill the ShareAlike requirement.

Further, why is a viral, copyleft license so preferable?

• Is it because you want the code to have proper attribution and remain visible, even in derivative works?
• This sounds like the spirit of Creative Commons.

Then GNU GPLv3 is the license for you.

GNU GPL has the major benefit over CC that it is compatible with major software projects in The Real WorldTM. Simultaneously, it is very similar to CC in that it is copyleft, and requires author attribution, as defined in the terms and conditions.

• What's wrong with CC-BY-SA3? How would GPL fix these problems? What GPL version do you propose we change to? GPLv2 is incompatible with GPLv3. Why would picking one license be better than alterate models, such as allowing users to pick a licence for each code snippet? – Peilonrayz Oct 9 '16 at 10:20
• @JoeWallis compatibility is the main downside of CC. This is addressed in both of my requests. My pick of GPL would be GPLv3. Alternate models sound like an interesting idea as well,. If you would like to make that request, feel free to do so. – Amani Kilumanga Oct 9 '16 at 10:30

My 2 cents: I am not sure the GPL is right choice for code snippets posted on SO. If anything the attribution requirements would make this often impractical for mere snippets of code. I detailed what these requirements are here.

I personally think that the CC-BY-SA license is a pretty poor choice for code snippets as it makes reuse of small snippets overly complicated. A public domain dedication or CC0 or MIT would have been better. This is something that is unlikely to change at SO though.

Hence, I do this on my profile https://stackoverflow.com/users/302521/philippe-ombredanne

All my StackOverflow and all my StackExchange contributions (across all sites) are dedicated to the public domain or available under the CC-0 license at your choice. This is as an extra choice and in addition to the standard SO/SE licensing terms (CC-BY-SA).

• RE: "MIT would have been better" – Amani Kilumanga Oct 9 '16 at 18:24
• Note that regardless of what you put in your profile, by posting on Stack Exchange your contributions are CC-BY-SA as stated at the bottom of every page on the network, per the ToS you agreed to by using SE. – Mathieu Guindon Oct 9 '16 at 19:13
• @Mat'sMug Roger that, I had actually not copied my full profile statement and I updated it above: yes the CC-BY-SA applies in all cases and for my answers these are extra choices I give. These are my original contributions hence as the rights holders for these, I am entitled to grant any additional license I please. – Philippe Ombredanne Oct 9 '16 at 19:36
• *Any additional license that grants more freedom (as in speech) to the content. – Raystafarian Oct 11 '16 at 11:30
• @Raystafarian what did you mean? – Philippe Ombredanne Oct 11 '16 at 14:43
• That you're correct with extra choices, with the caveat that you don't place additional restrictions on the content – Raystafarian Oct 11 '16 at 15:29
• @Raystafarian I personally consider that these are not warranted in the cases of forums posts and code snippets, but this is just me. – Philippe Ombredanne Oct 11 '16 at 16:44

If you're planning to use someone's code posted on Code Review in an open source project, and you would like it to be licensed in a particular way, then you need to ask the contributor to relicense their code, the same as you need to do for any other contribution to the project.

• "[T]he same as you need to do for any other contribution to the project" - unless the contribution already was fully compatible by default. Something it is more likely to be with, say MIT or GPLv3. – Amani Kilumanga Oct 12 '16 at 0:13