Preamble
To start with, any new license should be an addition, not a substitution. Currently, all content on this network is available under CC BY-SA. I don’t see any reason why that should change. If code blocks get a new license, that should be an addition to the current one.
This will make life easy for people who reuse content here as originally envisioned: I occasionally (very occasionally) copy interesting stuff on my blog. Some people keep a copy of the entire site (either as an ad-infested mess to gain revenue, or as a database which can be queried as part of interesting research projects). The entire archive is uploaded monthly as a zip file to the Internet Archive. If such people can simply say “This entire thing is under license X”, it makes their lives easier. And “license X” is now, and should remain, CC BY-SA.
There is already a license mixture. Anything contributed to this site is CC BY-SA, but there’s nothing stopping anyone including a note in their profile saying that all their contributions are additionally available under some other license. And some people do that. Equally, some people license individual posts. This post I am now writing is hereby made available under CC0.
// Sample silly code block, just for the sake of it.
foreach ($a as $k => $v) {
if (!$k) continue; // This is how to skip the first element of a PHP array.
frobrigate_widget($v);
}
// License for this code sample: WTFPL.
So now one portion of this post is explicitly available under three different licences. What fun!
On to your questions.
How does it make the life of a developer easy, or less complicated?
People don’t just learn from Stack Overflow. Code on this site is often not just silly little samples made to illustrate a point: some are real working solutions to specific questions. As such, people can, and do, copy them verbatim or with small changes. There probably is a real need to put code under a license designed for code.
CC BY-SA is a great license for an educational resource. It should be retained. And it should, as I said above, be retained for everything, including code. But an additional license just for code would, in fact, make it easier for people to reuse code in their projects. Whether or not such reuse was part of the initial vision for Stack Overflow, it’s certainly a thing that happens. And I can see why the company wants to make it easier, or at least put it on a surer legal footing.
What do I as a decision maker have to know? What can or should I do and what is allowed or not allowed under the terms?
This is yet another reason why I think that any new licence should be added, not substituted. That means that people who don’t care about licensing (and there are many such) can keep going as they were. It means that people who are happy with the current CC BY-SA license can continue to be happy. All the old terms still apply. There are also some new ones, but you don’t need to care about that if you don’t want to.
A well-known Free & Open code license is the way to go.
A decent way for contributors to get credit in some way for their efforts (if you think that should come in)
CC BY-SA of course includes the attribution clause. Most Free & Open licences, whether or not they’re designed for software, have such a clause. It’s present in all CC licences other than CC0. It’s present in the vast majority of Free Software licenses, with WTFPL being the major exception.
Few licences require specific forms of attribution. As has been noted, many people who reuse code from Stack Exchange sites will give attribution with a simple URL (which is good documenting practice anyway), but not include a user name or any other detail. I can understand why Stack Overflow Inc. considered making this explicitly permissible, but I think it’s probably a bad idea.
The simple URL attribution is fine for tiny snippets which probably don’t quite meet the threshold of originality required for copyright anyway: stuff which might have come from any standard documentation of the language or API concerned. For anything more substantial, the probability is that most people do give proper attribution, and that should be encouraged: perhaps even required.
So use a standard code licence which does, like most code licences, require attribution. Use it as standard, not waiving that requirement.
And use a licence which matches the spirit of the current CC BY-SA. In other words, don’t go for the GNU AGPL or anything similarly restrictive. (I have no beef with the GNU licences, but they’re very different in spirit from the CC’s BY-SA licence, so it would seem odd to use them here.) Stack Exchange’s original idea, the MIT licence, seems appropriate. But I do mean the normal MIT licence, with no extra waivers.
What are the pros and cons of the license model you propose?
There’s bound to be some, aren’t there?
The first and most obvious con is the extra complexity involved in multiple licences. As demonstrated in the preamble, multiple licences already can and do exist on these sites, and this very post is an example, but that currently has to be done explicitly. Doing it automatically would make the UI more complicated. There would have to be text added to the footer explaining the dual licensed nature of the content.
The second con is that we still don’t have a clear definition of “code”. This is something which has to be decided on immediately, before we go any further. Clearly, code cannot be defined as “anything in a code block”, because in that case, editing a post to fix formatting issues would also change the licence, which an editor has no right to do. (I also expand on this in my answer to the next question, below.)
Also, how do you make it clear to a person making a post at the time they’re making it which licensing applies to which parts of that post? Perhaps the code formatting button should be removed from the editor, and code should be entered in a separate pop-up window, similar to the current implementation of Stack Snippets, which could have a note about licensing? That sounds messy. This is a tricky UI question for which I do not have a good answer. Again, definitely, a con.
The pros are dealt with mainly in my answer to the first question, above. Code posted on Stack Overflow is code, and is used as such. Putting it under a licence designed for code makes sense, and will, in fact “make developers’ lives easier, or less complicated”.
How does your proposal fit in different types of sites? For example: Stack Overflow, Code Review, Code Golf, SF&F, Seasoned Advice.
Let’s talk about English Language & Usage. This is a site which often presents tabular data showing, for example, how words are used in different proportions over time or in different areas. This is marked up in Markdown as “code”, because that’s the only way to present tabular data on this network. This can happen on other sites, such as, for example, a demonstration of the synoptic gospels on Christianity Stack Exchange.
Clearly this is not actually code, and should not be licensed as such. Again, we need a clear definition of this word before we can proceed.
For non-code sites, such as EL&U, Christianity, and your examples Seasoned Advice and Science Fiction & Fantasy, this change is unlikely to have any effect (unless we do something monumentally stupid like defining as code anything in a code block).
For Stack Overflow, Database Administrators, Server Fault, Ask Ubuntu, Unix & Linux, etc., the change makes sense, I think, for the reasons noted in my answer to the first question.
The tricky ones are
- Programmers, where most code is pseudo-code (or, at least, it probably should be).
- Code Golf, where most code is full programs, albeit short.
- Code Review, where most code is substantial (often a complete program or at least a complete library).
Programmers can, I think, be thrown in with the rest. The question of which license applies to pseudo-code is an important one, and goes back to the repeated theme of a required definition for code, but Programmers should probably be treated the same way as Stack Overflow and Unix & Linux.
Code Golf and Code Review are more complex, and I can see a reason for treating them differently from the rest of the sites. However, I spend very little time on either site, so I’m hesitant to offer any specific suggestions.
If, however, we do introduce an exception for these two sites, we should also consider an exception on non-code sites. Why clutter up the UI with complex notes about code licences which simply don’t apply?
Another Option
We could, of course, forget entirely about the whole messy code/non-code distinction.
How’s this for a proposal:
- Everything on this network, whether code or not, is available under both CC BY-SA and the MIT licence.
The MIT licence may not be designed for non-code, and it’s an odd choice for the content on, for example, Movies & TV, but I see no reason why it couldn’t be applied thereto. It’s an odd choice for non-code, but not an unworkable one. And this is an odd network of sites, with odd requirements.