A New Code License: The MIT, this time with Attribution Required

6 min read Original article ↗

Reactions to this proposal fall into different camps, because there are different kinds of users of the Stack Exchange sites, in particular Stack Overflow. I am not sure this license change will serve all of them. In particular, I believe other mechanisms might be a better solution to the problems this license change is trying to combat.


Jonny can't get his code to work, and dumps it on Stack Overflow

To be clear, this already is a problem. If Jonny works on some commercial project, or is contributing to a copyleft-licensed project, it is quite unlikely they can share that code under CC-BY-SA on Stack Exchange. Of course, the real solution is that they create a MVCE specifically for their Stack Overflow question rather than dumping their actual code. But by changing the default code license from CC-BY-SA to the faux-MIT, this problem is worsened. Whereas sharing a short snippet of internal code with a copy-left license might be forgiveable – it's unlikely to be used in other projects given that the copy-left CC-BY-SA is not compatible with proprietary code –, giving everyone a license to do what the f* they want is far more troubling. I would be surprised if a reasonable company would continue to allow their employees to freely ask questions on SO.

The “what about Code Review?” argument also falls into this category. Here, large complete programs are shared to be improved. This is already unlikely to be done with commercial code, so questions are mostly by people learning a new language or otherwise improving their skills in their own time. The CC-BY-SA license is fairly safe here, but I doubt most question askers on Code Review would be fine with giving their programs away under an extremely liberal license: I wrote this program, and all I got was this lousy link.


Janine likes helping people, and is fine with her code being used

Then she can already point out all her code is free. This does not necessitate a network-wide license change. Most positive reactions I see to this proposal seem to fall into this category, but it is the least important. If you'd like to make this easier, you could introduce a per-post license selector rather than forcibly relicensing all contributions to this mind set. Such a license selector would merely add formal support for the already common practice of dual-licensing code in posts via a notice in the user profile.


Jerome searches for his problem, finds an SO answer, copies the code

While this may be common practice, Jerome is not allowed to do this under the CC-BY-SA license[1]. He would be well-served by this change. As already pointed out elsewhere, the only safe way to use code found on SO is to do a clean-room re-engineering, or to rely on Fair Use laws or limits to copyrightability, which are not consistent across the world.

I am not convinced that this should be encouraged. Maybe SE is right and this is a futile war on license violations, and the best way forward is to legalize what everyone is allegedly already doing? Or SO could invest in better education explaining what is OK and what is not OK to do. In particular, this would imply moving the focus away from debugging questions back to knowledge questions.

[1]: Jerome can only incorporate CC-BY-SA code in his project if (a) the project is never published, or (b) the project is also licensed under CC-BY-SA (see section 4.b). This rules out usage of SE code in most commercial and open-source projects.


Julia likes sharing her knowledge, not her code

This is where I find myself in this discussion. I love writing stellar answers that provide lasting value. In my experience, the best answers on many sites I participate on (Programmers, Code Review, Stack Overflow) do not actually contain much code. And I am fine with people using this knowledge for whatever purpose. Curing Cancer? Coding Porn Sites? I'm fine with that: knowledge can't be copyrighted.

But expression of knowledge can be, and this extends to code examples I might include in my answers. When I write an answer, I want to be attributed. Properly, with not only a link but also my nick, and with a reference to the license so that people that read my writings know their rights (and restrictions).

In particular, I don't want to feel like I'm doing work for free for other people (which is why I stopped answering all those debugging questions on SO). The copy-left CC-BY-SA license does not forbid commercial use, but it makes sure my answers and all parts thereof will continue to stay free. This is in stark contrast to the faux-MIT license suggested by SE, which would allow my contributions to be made non-free.

Changing the license will alienate contributors like Julia or me. If this change comes, I'll think twice before I use runnable code to illustrate my knowledge – maybe, more text or pseudocode would be a better mechanism.


Peter doesn't use Stack Overflow, doesn't care

Why is SE complicating licensing for half the SE network that has nothing to do with code? From Seasoned Advice to Super User, this change adds no value to every site that isn't Stack Overflow. Yes, I'm exaggerating. Other sites that might benefit from this change are Game Development, Tex, Wordpress, …, but these are the minority. I understand the desire to limit license fragmentation across the network, but this is a change that should really be applied on a per-site basis, after discussion on that site's own meta to assure that this change is a benefit. SE will already need a per-post license indication because they can't re-license old posts, so a per-site policy would make it even simpler for many users!


In summary, I do see the appeal of this change for the majority of passive SO users, but I don't see the value for active SO users, or non-SO users. I'd very strongly rather not see this license change happening. And I'm saddened I had to do this analysis myself. It would have been nicer, less sneaky, for SE to demonstrate up-front how this change would impact different users.