I'm not fully satisfied with Stack Exchange's recent proposal to change the code license to an MIT-like crayon license. What if I want the plain MIT license, where the license text must be replicated? What if I'd instead prefer a completely different license?

In general, I want to choose, and I want my choice to be clear.

Technically, I already can: If I wish to multi-license, I can add text to explain my wish, either to the question or to my profile. However, this has problems:

  • It is confusing, especially to visitors. (In-band signaling is a bad idea.)
  • I still can't post code with incompatible licenses (especially on Code Review), e.g. if the code is in commercial use and my employer mandates a particular license.

So how about this:

A dropdown in the answer editor—

a dropdown below the answer box, asking which license one wants

—though probably with a lot more choices. This is just a mock-up. :)

Then we could make it super clear in the rendered answer what the choice was:

finished answer, with chosen license displayed

Maybe with subtler colours and clickable-looking links redirecting to the appropriate OSI license page. The dropdown could be pre-populated with the user's preferred license, so it doesn't need to be selected every time. (It should probably also have a ‘+’-button for multi-licensing purposes.)

Choosing the text's license is the domain of a different question, though a similar solution could work for that too.

  • 4
    I think it wont work well because the VAST VAST VAST majority of people have never even heard of any of those. Plus, it leads to a bunch of more questions. What if I want a different license type? What if I want my own license type? What if I want to edit and change the license type? What if I have 2 code blocks and want to each one to have a separate license? Commented Dec 16, 2015 at 21:44
  • 5
    @DavidGrinberg ① [citation needed] If you can show that the vast majority of programmers do not understand what an open source license is, I will give up. ② Indeed this wouldn't cover all use-cases, just more than the current one.
    – Anko
    Commented Dec 16, 2015 at 21:51
  • 3
    Don't forget the WTFPL.
    – user102937
    Commented Dec 17, 2015 at 6:26
  • @RobertHarvey which is just yet another crayon license, that's basically CC-Zero Commented Dec 21, 2015 at 12:01
  • This implies that StackExchange is a place where to copy from. Sure, many people do but I don't think that it's the overall goal of StackExchange, isn't it?
    – BlueWizard
    Commented Dec 23, 2015 at 20:24
  • 3
    If we do get this, the box absolutely needs a choice for CC-BY-SA 3.0 Unported.
    – user
    Commented Dec 23, 2015 at 20:28
  • 1
    @JonasDralle: That appears to be the assumption of the current license, as well as the proposed license to change to. So yes. Yes it is part of the overall goal. Commented Dec 23, 2015 at 20:28
  • 1
    Would you limit this to certain sites (the ones where code is likely), or would this appear on all of them? Not sure I want to have to explain code licensing to users on, say, Parenting. Commented Dec 23, 2015 at 20:32
  • 2
    @MonicaCellio Maybe it could show up only when a code block is included in the post? (That just might even help people realize that code blocks aren't for, say, quotes...) It wouldn't be perfect (you see lots of log entries in code blocks on Server Fault, for example) but it would cut out on a lot of confusion on non-technical sites. Techies can probably handle such a combobox.
    – user
    Commented Dec 23, 2015 at 20:33
  • 2
    I'd also like to point out that allowing support for too many licenses on our site would mean we'd also have to drop support for enforcing them. E.g. the scraper report form would go away and we'd start ignoring any further reports, as we simply wouldn't have the bandwidth to investigate them and analyze whether or not they're breaking the terms of which license.
    – animuson StaffMod
    Commented Dec 24, 2015 at 17:23
  • Wouldn't it be easier to rewrite/obscure the supplied excerpts of code so they fall under the specified MIT license (but are still clear enough to help reaching an answer)? Then you can still give out your original code under a license of your choice. Commented Dec 24, 2015 at 18:48

3 Answers 3


I like the proposal and the discussion that it brings. I agree the proposed license lacks any input from the community and I like to see you do a proposal.

Instead of giving a yes/no answer, I had like to sum up some pros and cons of your proposal.


  • A license for everyone. Everyone can pick his own preferred license. Every part of the post is licensable on its own as you want.
  • End the discussion which license the site must have: pick your own.
  • Easier to add new licensing models. If there is a new one, you can just select it from the box.
  • A way not to only license code (which is mainly discussed now) but also text.


  • Total confusion if you are allowed to use a code block / some text or not. One license is too much for some users already. Adding even more different license models is just confusing.
  • Different questions asking the same question but for other licenses. "I like to do X but that answer is under license Y which my company doesn't allow to use. Please give an answer like the previous one but with another license." This won't help the overall quality.
  • Make it a lot harder for Stack Overflow Inc to keep track of and handling copyright violations. (As per animuson's comment)
  • Being able to change the license on a post invalidates previous usages of the post. If it has been copied on-site: what to do?
  • Licensing is only common for technical use: what about all other sites? Do they have to pick a license too?

Feel free to suggest more pros and cons!

  • 1
    The issue of multi-licensing is already covered by the OP. And there is nothing preventing you from taking what you've learned by reading the code and applying that knowledge to the problem you're facing. The license only covers the specific implementation, not the ideas expressed. Hence, no need for anyone to ask for an answer to be reposted under a different license; if absolutely necessary, requesting multi-licensing is enough.
    – user
    Commented Dec 23, 2015 at 21:34
  • 4
    To sum it up: SE powers-that-be messed royally with their relicensing proposal. We were (kinda) happy with status quo ante, and now we are restless and want all kinds of fluff for Christmas. Commented Dec 24, 2015 at 11:09
  • 1
    Indeed. @deerhunter. They messed up big time. Commented Dec 24, 2015 at 11:22
  • 1
    I'm accepting this answer for now because it summarises the discussion well.
    – Anko
    Commented Dec 27, 2015 at 9:52

Like ǝpoɔɟoʇɹɐ, I like the idea in spirit but I'm not so convinced such a plan would work in practice. I think being able to choose among multiple OSI licenses will cause confusion and may make actually make some situations legally tricky!

As others have commented here and here, the Code Review site seems to be particularly vulnerable to the proposed licensing change. Imagine someone posts a complete, working version of their code to the Code Review site under the proposed modified MIT license. They are seeking advice on how to improve their code. Now another user comes along and provides a refactored and smarter version of the code and they license the additions / modifications under the GPL instead. The questioner can no longer benefit from the answerers solution -- but that was the entire goal of the question!

With the suggested pull-down menu, you'd have to somehow make it so that whenever someone is answering another person's question that they use a license that's at least as liberal as the questioner's code. Otherwise there's the possibility that the questioner might not legally be able to use the answerer's code. But this is essentially equivalent to having a viral-license in the first place!

That's why my choice would have been to license code at the outset under the (normal, non-crayon) MIT license. This would have required attribution (I think that's a good thing!) but has the advantages of basically being as liberally licensed as possible. The problem now of course is that all the old code is already CC-BY-SA licensed and therefore there is too much momentum in that direction. As a couple of other users have mentioned, I don't think there's an easy way out of this mess.

  • At the same time, it cannot be more liberal if it is a derived work of the OP's post. Which it would likely be, if the OP's post+idea was any good. Commented Jan 7, 2016 at 13:01

The idea you've got here is good. I'm not so sure about how it'll work in practice.

In principle, I like the idea that everyone can choose the license that they want for their code. That's great, because it means that Stack Exchange becomes far easier to participate in: people who didn't want to participate before because they didn't want their code shared under CC BY-SA can now choose how to license their code. Great!

However, consider the current licensing situation, and the fact that there are 124 questions on MSE. People do already struggle to understand what they're allowed to do with code on the network, so I'm not sure adding another dimension of complexity to this is a good idea. (That said, we do have a site for explaining these things.)

I think it's possible. Not easy, but possible. With good interface design and good explanation (perhaps it's a good idea to link to the relevant choosealicense.com page - those have very good explanations), then it could be made to work - but it would have to be done carefully.

I'd love to see this, but it's got to be done well.

You must log in to answer this question.

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