32

Okay, so that proposal didn't go very well...

Clearly, the community thinks Stack Overflow, Inc messed up with their license proposal. Now it is time to you to prove we, as a community, can do better.

So, let's set some rules.

Your proposed license should consider the following things, please expand on them in your answer:

  • How does it make the life of a developer easy, or less complicated?
  • 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?
  • A decent way for contributors to get credit in some way for their efforts (if you think that should come in)
  • What are the pros and cons (don't forget these) of the license model you propose?
  • How does your proposal fit in different types of sites? For example: Stack Overflow, Code Review, Code Golf, SF&F, Seasoned Advice.

So now it is up to you! Go write the best possible license proposal!

  • 15
    thanks for your initiative. May I suggest we first clarify what is the problem we are trying to address? – miraculixx Jan 16 '16 at 11:35
  • 1
    @miraculixx: That would appear to be the first bullet, yes. – Nathan Tuggy Jan 16 '16 at 11:36
  • 3
    Indeed Nathan. And I expect someone to post the current license as best option, so that would mean: "Keep it like this. There is nothing to fix." – Patrick Hofman Jan 16 '16 at 11:39
  • 1
    Shouldn't this better be left to lawyers? – rene Jan 16 '16 at 11:54
  • 11
    "Go write the best possible license proposal": Change nothing. – bjb568 Jan 16 '16 at 12:07
  • 1
    Possibly @rene, but some of us have quite some knowledge on licensing, so I thought to give it a try. – Patrick Hofman Jan 16 '16 at 12:07
  • 1
    @bjb that's my idea – Patrick Hofman Jan 16 '16 at 12:08
  • 1
    I would add rule to explain how the license will fit into SE sites other than SO - CR, Code Golf, SF&F etc... – gnat Jan 16 '16 at 13:41
  • 1
    Good point @gnat. Added. – Patrick Hofman Jan 16 '16 at 13:44
  • 2
    You might want to include the large amounts of entire shell scripts written on Unix & Linux, Ask Ubuntu, Super User, and Apple in the example sites. That's a bit of a unique problem. – ɥʇǝS Jan 16 '16 at 23:35
  • 3
    I agree with @miraculixx. This question puts the cart before the horse. I think that proceeding this way is premature. – 200_success Jan 17 '16 at 12:18
  • 5
    They have already backed off twice. Nothing is being stuffed. If we're going to have a community-led process, let's do it methodically and show them how it should be done. Otherwise, this post is going to be just as chaotic (minus the pitchforks that were raised because of the implementation date). – 200_success Jan 17 '16 at 12:35
  • 3
    Somebody is trying to sabotage community discussion by VTC'ing. – Deer Hunter Jan 17 '16 at 15:03
  • 5
    @DeerHunter Not sabotaging. I genuinely believe that this question is Too Broad. Imagine… each answer here is of the greater complexity than the original proposal. We're supposed to debate the pros and cons of each proposal in comments? The original two rounds were chaotic enough, and we were discussing just one proposal! – 200_success Jan 17 '16 at 18:04
  • 5
    @DeerHunter No need for GitHub. SE is a perfectly cromulent discussion platform — if we use it smartly. – 200_success Jan 17 '16 at 19:24

12 Answers 12

32

So .. this is too big for a comment. I'd like to put this out as a talking point for everyone that wants to add to this discussion. At this point I'm in no way suggesting anything, I just want to talk about what we hope to get out of a license.

  • It has to protect our contributors to the point that they feel comfortable contributing. This means protection from people that used code from the site, and experienced what they feel are damages and want someone to sue. Hey — no warranty. Protection of the integrity of their contribution (attribution is needed being a big one) is also very important. The point that you feel comfortable is part of the discussion you're having right now.

  • It has to protect people that use those contributions. We have to give people clear permission to use the code found on our site, for any purpose, provided that they comply with the terms of the license.

  • It has to be easy for end users to comply. The easier it is to comply, the more likely folks will be compliant. We're not ruling out changes in the UI that could help this if we can find a scheme that works and people like. Most people just use a link to the post because it does give credit, and it's easy to reference if anything ever does come into question.

  • It has to be an OSI-approved license that isn't modified. We're in an interesting position, we don't actually distribute software, we distribute blocks of code for educational use that eventually work their way into software. That's why it really has to be a software license. Ideally, we don't create a new one (by writing one, or directly changing the language of one that exists, which essentially creates a new one).

We're also expecting that any scheme is going to require a bit of supporting documentation, examples, FAQs, etc - this can go in the help center.

Also, I'm in no way saying we got all of this right the last two attempts. These were just the goals.

And that's it. I'm butting out. :)

  • 2
    Thanks Tim. Although this doesn't really answer the question (lol), I appreciate this from the side of the team. I wonder why the team hasn't been as open about this the first time. It would have made adoption a lot easier. The objective of my question is not to blame you, but to get a constructive way out and let the community tell what they expect. That might be beneficial to your internal process. Is there a list of reasons why some licenses failed your test? – Patrick Hofman Jan 18 '16 at 16:03
  • 10
    @PatrickHofman The short answer is we over thought it because we knew it's a really big deal, and in the process of doing that we became .. well, the only term for it is "over guarded". We truly envisioned cooking up this amazing scheme that everyone would love and spent a crazy amount of time doing just that. Just a perfect storm of mistakes, we should have had about 6 different discussions here before even reaching a first draft. – Tim Post Jan 18 '16 at 16:05
  • Then you have caught the essence of my question :) – Patrick Hofman Jan 18 '16 at 16:06
  • @PatrickHofman For question #2 - we want to avoid licenses that place restrictions on endeavor. This is commonly explained as "You can save humanity or guide a missile with it", we were thinking more along "You can save humanity or guide a proprietary missile with it". So we thought more along the lines of a software license ideal for teaching materials, which is essentially what we have (although you can find full implementations of stuff). If we can answer any questions, feel free to ask. – Tim Post Jan 18 '16 at 16:09
  • 3
    A tl;dr; version of Patrick's first question is - the sheer enormity of what we were taking on made us just dumb enough not to realize that it made us a little dumb. And when you get into that kind of predicament, all kinds of stuff stops making sense to you, like feedback we received on the first draft we posted. Anyway, we shook it off, I think. – Tim Post Jan 18 '16 at 16:16
  • @TimPost, "shot themselves in the foot and want someone to sue" What do you mean by this phrase in this context? (And please could you replace your metaphor with a description that does not rely on metaphor, to reduce the possibility for misunderstanding?) – sampablokuper Jan 18 '16 at 18:04
  • @sampablokuper How's that look? Sorry for the idiom. – Tim Post Jan 18 '16 at 19:07
  • 1
    Could you explain why you attempted to modify the MIT license instead of just using MIT, BSD 3-clause, or Apache v2? Although you didn't modify the license itself, the terms of use provided another waiver. Exactly what would be wrong with requiring a LICENSE and/or NOTICE file in a software release? Or am I misunderstanding your last two bullet points. Because I know that I wouldn't have had as much to complain about if you just said "code is MIT" or "code is BSD 3-clause" or "code is Apache" in the last round. – Thomas Owens Jan 18 '16 at 19:10
  • @ThomasOwens I can. It's after 3:00 AM where I am, I'll see if I can condense it into a comment tomorrow morning. If I can't, would you mind opening another question for me to answer? (I'm pretty sure I can condense it) – Tim Post Jan 18 '16 at 19:14
  • 1
    @TimPost Sure. I'll follow up tomorrow. If I don't see a comment here, I'll make a new question and ping you somewhere. – Thomas Owens Jan 18 '16 at 19:15
  • 1
    @TimPost "How's that look?" Much more comprehensible, thanks :) – sampablokuper Jan 18 '16 at 19:22
  • 1
    @ThomasOwens, tim can probably give a much more detailed version than I, but the short version was that a lot of the devs we pitched MIT to were concerned that the need to reproduce the code block, potentially dozens of times in the code for different citations, was a lot of friction and hassle that might cause less compliance and attribution as a result. I won't speak for all the folks involved, but if the community was a lot more comfortable with MIT, but without the "lightweight" attribution option, I'd certainly be open to considering an option along those lines. – Jaydles Jan 18 '16 at 19:33
  • 3
    One of the things that I keep worrying about is the licensing of material that I draw from to write a good answer. What about blocks of code that aren't supposed to be incorporated into other products? What if I were to answer a question about the hashing of Strings and include the hashCode() method from openJdk (GPL)? Or some of the Java Language specification documentation? For material that I didn't write, I feel confident with fair use in a CC-BY-SA license, but not having "all the code" be under anything else. – user213963 Jan 18 '16 at 19:34
  • 2
    @Jaydles I'm almost certain that if SE uses MIT, BSD, or Apache, you can have one "SO-LICENSE" file in your project that includes the full text of the license and a copyright line for every individual. If you have 72 blocks by 60 different people, then you would have 60 copyright lines. If every block was a different individual, then you would need a copyright line for every individual. Honestly, I would recommend Apache License because it also includes a NOTICE file which you can mandate in the terms of use includes a link to every question or answer used. – Thomas Owens Jan 18 '16 at 20:42
  • 1
    "It has to protect our contributors to the point that they feel comfortable contributing": Sure. But that doesn't only mean protection from sue-happy readers, it also means being able to cite sources under diverse licenses, as MichaelT said. Probably also our own stuff without being forced to relicense it. "It has to protect people that use those contributions": Yes, for those uses we want to allow. Your elaboration on that point is tautological, and thus useless. – Deduplicator Jan 19 '16 at 19:16
23

I looked at the current content license and used TL;DR Legal to search for similar licenses that are appropriate for software. I used the following conditions: the license allows for distribution, modification, and commercial use; the license cannot allow the creator to be held liable or the recipient to use the trademark of the creator; the recipient must include the copyright and state changes.

I eliminated the viral nature of CC BY-SA. Although I feel it is appropriate for text, it would cause the same issues as licenses such as the GPL in organizations. If building a close source application, an organization cannot incorporate or include CC BY-SA or GPL code in the code base.

I also allowed for private use. I want to lower the barrier of entry for software that is not being distributed outside of an individual or organization's use.

The result was this search. I eliminated the ones that were not OSI or FSF approved or contained wording regarding a specific company, product, or project. I also eliminated licenses that require notice in source files - I feel that putting a large header in a source file could be seen as cumbersome and if people don't find it easy to follow the license, they won't. I feel strongly that an off-the-shelf license should be used without modification.

In the end, the only licenses that I found that matched my criteria were Apache License 2.0 and a variant of that license, the Educational Community License, Version 2.0. In short, Apache License 2.0 is the CC BY of software licenses.

Applying the Apache License 2.0 should make developers lives easy. It's a well known and well understood permissive license that is OSI approved. Even the FSF promotes the use of Apache License 2.0 under certain circumstances, and I believe the "widespread use of the code is vital for advancing the cause of free software" case makes it good for Stack Exchange. However, it does require the inclusion of the full license alongside a redistribution (usually in a LICENSE file).

There is one, possibly significant problem with Apache License 2.0 that everyone should be aware of. It isn't compatible with software released as GPL v2 or GPL v2 or better. It is, however, compatible with software released as GPL v3.

For contributions, it does require that all copyright notices are included in source. It does not require attribution in binary distribution, except in the form of a NOTICE file if one is specified. Stack Exchange could write a standard NOTICE file or guidance on what to include in a NOTICE file should content from a Stack Exchange site be used (user names, URLs, etc).

This license would only apply to sites with source code. The biggest concern would be, as always, Code Review where questions are expected to include complete and working code. Right now, everyone who is posting there is releasing their code as CC BY-SA to post there and this license is very, very similar (with the exception of a non-viral nature).


What about other OSI approved licenses?

I went through all of the licenses on TL;DR Legal that were tagged as OSI Approved. Again, I eliminated all of the ones that had viral aspects to them, required code to be kept in a separate file, required distribution of the original code, had lots of documentation requirements, had requirements of what to put in source files, with ties in the text to specific companies or projects or products or types of software, or strange clauses. Some licenses may fall into one or more categories. These were eliminated because these clauses would somehow limit the adoption of code written under the license agreement - prevent use in closed source applications, force authors to include unwanted content in source files, have clauses that would require review by corporate legal groups that may receive push-back, etc.

What OSI-Approved Licenses remain?

I think that most of these should be acceptable. They are fairly well understood and approved open-source licenses. They allow incorporation into closed source projects as well as open source projects with various licenses.

Personally, I would have some other requirements. I would eliminate the Free Public License and MirOS Licenses as they don't require attribution. I would eliminate the Boost Software License for the same reason - it doesn't require attribution in binary distributions As I've said in the past, receiving visible attribution in both source and binary distributions is important to me.

I would encourage a close look at Apache License 2.0, BSD 3-clause License, NTP License, or Microsoft Public License first. The biggest advantage of these is the prevention of using contributor names in advertising or representing the use/suitability of the software.

I think the MIT, BSD 2-clause, and ISC Licenses would be the next to look at. They are short, easy to read, and well understood by open source software developers and companies who use open source software. Software under these licenses should, generally, be OK to incorporate into larger works.

Finally, I'd look at the Universal Permissive License 1.0 and Eiffel Forum License v2.0. These are less well-known, but aren't significantly better than the licenses that I've mentioned above.

Regardless of the license, I don't think the terms of use should be used to modify the license (since as removing the need to include the copyright and license from distribution). This opens up several issues that have been pointed out in the previous discussions.

I think could come around to any of the 13 licenses that I mentioned as OSI Approved. I would recommend one of the more common, more well known, and more documented licenses - MIT, BSD (either), or Apache 2.0.

  • 3
    @gnat I don't consider that question relevant or answerable by people who don't participate on affected communities. The intended future state of licensing will, based on SE comments, apply to any site with copyrightable code posted and not be a site-by-site basis. I highly suspect that people aren't posting code on Seasoned Advice or Japanese Language and Culture or whatever. And as someone who has almost 0 participation on Code Review or Code Golf because of the licensing, I can't comment as to what those communities would think. – Thomas Owens Jan 16 '16 at 18:26
  • 2
    @ThomasOwens, this leaves unresolved the problem of distinguishing "code" from other content. To me, that's an obvious showstopper for your proposal. – sampablokuper Jan 17 '16 at 3:33
  • 6
    The answer to that problem is simple: Don't bother distinguishing code from text; just dual-license everything under [preferred OS license] and CC-BY-SA. Let the reader decide what license they want to use for what purpose. – Tariq Ali Jan 17 '16 at 5:10
  • 4
    @TariqAli, dual-licensing all SE content as CC-BY-SA 3.0 and ALv2 is a pretty interesting suggestion, thanks. It would still create fragmentation insofar as old content would remain CC-BY-SA 3.0 only whereas new content would be dual-licensed. For that reason, and because I'm already happy with CC-BY-SA 3.0 by itself, I still prefer my proposal. But perhaps you've hit upon a solution that you and I and Thomas Owens would all at least find tolerable. That feels like progress, so thanks again :) – sampablokuper Jan 17 '16 at 11:48
  • 1
    @sampablokuper I would be OK with a dual license. Although it has been pointed elsewhere out that Apache may not be good if you're asking a question about code that implements a patented algorithm like LZW or this one. Although I prefer Apache, BSD 3-clause is more realistic (over MIT and BSD 2-clause) for the "cannot use trademark" clause for advertising). – Thomas Owens Jan 17 '16 at 14:54
  • 1
    @ThomasOwens thats where it gets tricky. And I don't want to be a test case. For such things as the infamous xor cursor patent - posting some code that gives it a patent grant along with it for code that I may not even realize it - for me, just getting a review of some personal code for a hobby program I'm writing. – user213963 Jan 18 '16 at 0:08
  • 1
    @sampablokuper the question is can I even post the code that is patented if the code is going to be automatically licensed by the TOS to ALv2? – user213963 Jan 18 '16 at 0:58
  • 1
    @MichaelT, I don't think it would ever be wise to publish an implementation of a patented algorithm without the patent owner's permission unless you have very good reason to believe that either the patent owner will never sue you (e.g. because they have undertaken not to), or that you will win if they do sue you (e.g. because you are certain the patent is unenforceable against you). That goes regardless of the license/EULA you publish under (if any), and regardless of whether you also publish the source code of your implementation. – sampablokuper Jan 18 '16 at 1:06
  • 2
    @sampablokuper did you know that an xor cursor was patented? Or how about a backing area? There are many things that are patented. Some people may not even realize them. Or you could have read a research paper and implemented that - and the patent has been submitted but not reviewed and published yet. Whoever one gets into patents, it gets ugly. If any code that I publish (here's a way of doing it on SO) is under a license with a patent grant, it is a recipe for a nightmare of litigation for the person who wrote that code - even if they were unaware. – user213963 Jan 18 '16 at 2:14
  • 1
    @MichaelT, "If any code that I publish ... is under a license with a patent grant, it is a recipe for a nightmare ... even if [I was] unaware." Depends entirely on the wording of the license. 3 possibilities, best to worst. (1) Maximum protection: the license explicitly disclaims any grant of patent rights that the code licensor (i.e. SE contributor) is not in a position to grant. ALv2 is like this. (2) No protection: license is silent on patents, but grants liberal rights generally. A licensor might be deemed by a court to have implicitly granted patent rights. BSD is like this. – sampablokuper Jan 18 '16 at 13:18
  • 1
    @MichaelT (3) Negative protection: license expressly grants patent rights to licensee regardless of whether licensor is in a position to grant those rights. I know of no such license in existence. I certainly doubt the OSI or FSF would ever approve such a license. – sampablokuper Jan 18 '16 at 13:20
  • 1
    @sampablokuper Can you imagine the bonanza of patent suits in perlin noise tag on SO that have a patent sitting behind them? If I am writing some hobby code for playing with procedural generation of terrain and have a problem with the implementation, or ask for a code review - I'm not getting in trouble with the patent until I publish that code under a license that has a patent grant within it. – user213963 Jan 18 '16 at 21:03
  • 1
    "[Apache] does require the inclusion of the full license alongside a redistribution (usually in a LICENSE file)." That seems like a lot to ask to me, and I suspect many people simply won't for one reason or another. I think any new license should not require anything more than an inline comment if we expect people to actually follow it. – Alexander O'Mara Jan 19 '16 at 18:54
  • 1
    @AlexanderO'Mara Also, requiring an inline comment does not help with attribution in a closed-source project. If the recipients of the software cannot see the attribution, then there is effectively no attribution. Regardless of the method used, I feel very strongly that the attribution must be visible regardless of the distribution method of the software. – Thomas Owens Jan 19 '16 at 19:00
  • 2
    @AlexanderO'Mara I don't think that it is unreasonable to expect anyone who uses copyrightable code from an SE site to include one file in their distribution that contains a software license and copyright/attribution lines for each code block that they used. Keep in mind that most code posted on Stack Overflow does not meet the threshold of originality, which means it can't be copyrighted, and you can't license something you don't have the copyright to. – Thomas Owens Jan 19 '16 at 19:07
8

I think the attempt to separate code and non-code licensing is not a good idea in the first place.

  1. I doubt it is possible to define a separation of code and non-code in a way that both stands up legally and is actually understandable to users. The first has been discussed elsewhere and IANAL, so I'll not elaborate here. The second is perhaps more important, because a change that is not understandable does not improve the status quo, quite the contrary.

  2. The separate licenses seem counterproductive to the actual purpose. Being able to copypaste code is not terribly useful, since it is rarely a good idea anyway. However, being able to copypaste the explanation for what your code is doing and why as a comment would be very useful. So if anything it is the text that should have a more code-friendly license.

So, if there is a problem to be solved, which I am not totally convinced there is, the change should apply equally to all content. Whether that is a license change, a dual license or some kind of exception. That would both avoid the pesky question of what is code and allow for more – and in my opinion more useful – use cases.

  • I don't have enough room in a comment to answer why we feel it's important to separate them. However, I'm happy to answer a new question you post asking why we thought doing so is important. That's actually a good question that could benefit from more perspectives than our own as a company. – Tim Post Jan 18 '16 at 17:34
  • 2
    @TimPost, done: meta.stackexchange.com/questions/273275/… – otus Jan 18 '16 at 18:26
  • It's 3:02 AM here, thank you for doing that, you can expect an answer from me in about 10 hours (want you to know I've seen it, but I need a bit of sleep and breakfast and most importantly coffee before I dive in) – Tim Post Jan 18 '16 at 19:04
  • 1
    @TimPost And point (1)? How are you planning to legally distinguish the two on, say, TeX SE? – cfr Jan 21 '16 at 4:01
7

The Creative Commons Attribution 4.0 license

I think that the CC BY license would meet most people's concerns with the alternatives:

  • It is a permissive non-viral license. You can use freely use it in closed source commercial projects.
  • It is a well known and established license - it's not a crayon license! And as the fourth version of the license, it has had a lot of time to work out the few flaws which earlier versions had.
  • It is FSF recognised Free license and compatible with the GPL.
  • It is not onerous to use:
    • There's no need to copy a license file around (though a link to the license itself is required)
    • The attribution requirements are generally an author's name and a URL

I haven't seen anyone bring this up in our recent debates as either something they want or do not want, but the CC BY 4.0 license does require some indication that modifications have been made. Considering that most people wanting to embed some code from SO would be crediting it as "includes code by X", I'd consider this requirement very easy to meet.

But aren't we meant to not use the Creative Commons licenses for code?

I think the case against using CC licenses for code is often overstated, especially for the CC BY license. Here's what Creative Commons say themselves:

Can I apply a Creative Commons license to software?

Unlike software-specific licenses, CC licenses do not contain specific terms about the distribution of source code, which is often important to ensuring the free reuse and modifiability of software. Many software licenses also address patent rights, which are important to software but may not be applicable to other copyrightable works. Additionally, our licenses are currently not compatible with the major software licenses, so it would be difficult to integrate CC-licensed work with other free software. Existing software licenses were designed specifically for use with software and offer a similar set of rights to the Creative Commons licenses.

The concerns listed include:

  • Not covering the distribution of source code, which is often important to ensuring the free reuse and modifiability of software
    • This is essentially a copyleft concern, and would apply equally to the permissive MIT and BSD licenses
  • Parent rights
    • This is a concern which is completely ignored by many older but still very popular software licenses, such as the MIT and BSD
  • Not compatible with major software licenses
    • This does not apply to the Attribution only license, which should, I think, be compatible with all FLOSS licenses

Avoiding confusion

To avoid confusion, rather than limiting the new license to code, it might be better to make the default license of entire posts the CC BY 4.0 license. Most of the time most of the people really don't care what happens to their posts. Considering how many people have been posting in these debates saying they didn't even realise the current license is CC BY-SA, I think many people would consider any kind of attribution an unexpected bonus.

But of course there are times when we do care. When we've spent 5 hours on a 3000 word essay, it's understandable to ask for it to be used under a Share Alike/Copyleft license.

So I think it may be easiest to make the default now be CC BY 4.0, with post authors having the choice to license it under the CC BY-SA 4.0 instead. Just like the community wiki tick box, this wouldn't have to be a tricky process. And for those who want it, a profile choice could make that the default.

5

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.

  • 3
    Coming from Programmers.SE, I've taken a chunk of code which was gpl licensed (openJdk) and incorporated it into an answer showing the nature of a memory leak with String allocation. Just because something is in a code block, and is code, and may be acceptable to have in the post under fair use doesn't mean that I can relicense it as MIT (or BSD, or Apache). – user213963 Jan 19 '16 at 22:29
  • That's another complicating factor, @MichaelT. Of course, it doesn't mean that you can relisense it under CC BY-SA either. – TRiG is Timothy Richard Green Jan 19 '16 at 22:44
  • 1
    I do believe that including such material may often fall into Fair Use - which doesn't change the licensing on the source material. I don't claim to be licensing it as CC BY-SA and I don't claim to be using it as code. That last bit is a necessary part of the four part test for fair use. I claim that such use of example code is the same as quoting the Java Language Specification or a section of Harry Potter - fair use. The key thing is that I need to be able to clearly designate code that I am incorporating into a post as from other sources. – user213963 Jan 19 '16 at 22:52
  • 2
    It really isn't any different to incorporate a block of code that is under the gpl, than it is to incorporate the oxford dictionary's definition of selfie. In neither case do we have the ability to relicense the material as CC BY-SA. However, this 'license code as...' without recognition of fair use of an external source could very well get me into license violation issues with my next answer if all code in a post is licensed as... well, anything. – user213963 Jan 19 '16 at 22:59
  • The alternative to this would be writing poorer quality answers and forcing me (and the next person who reads the answer) to traverse another site to find the relevant bit of code. Consider if you would no longer be able to quote a dictionary definition and instead would need to provide a link to the other material every time. – user213963 Jan 19 '16 at 23:01
3

Maintain CC license, encourage dual licensing parts of posts

I accept that the license switch is intended to solve a real problem, and that maintaining only the CC license is not a way to solve that problem. There is a lot of code that gets posted where the people answering fully intend for their answer to be included in the questioner's code base, without knowing or asking anything about the questioner's code base's license. Under CC-BY-SA, in most cases, that's not allowed.

I propose not forcing any new license, but making user interface changes to allow contributors to make it easy to dual license parts of posts. We have the snippet feature now, which gives a nice user dialog for entering HTML, JavaScript etc., and inserts

<!-- begin snippet: js -->
...
<!-- end snippet -->

into the post. This snippet feature should be fairly extensible to act as a a generic "insert code" function which would insert e.g.

<!-- begin code: c++ mit -->
<!-- language: lang-c++ -->
int main() { return 0; }
<!-- end code -->

where the language and license would be selectable from the dialog box, with a dropdown list of licenses that are considered acceptable for code, possibly the list of FSF- or OSI-approved licenses. It would render as e.g.

int main() { return 0; }

license: MIT

edit the above code

This "edit code" feature would already be a potential improvement even without including license information in there.

How does it make the life of a developer easy, or less complicated?

Since the posts themselves would be fully covered by the CC license, code too, any existing use is sure to remain allowed even with new posts that happen to include code.

Since the posts themselves clearly include which bits can alternatively be used under a different license, the reader doesn't have to dig through the post history to see when the code got added, doesn't have to remember when the new license rule went into effect, doesn't have to determine which bits of the post are code and which aren't.

What do I as a decision maker have to know. What can or should I do and what is allowed or not?

The license that's used is right there in the post, but in an unobtrusive way. Make the license name a link to more detailed information about what is and isn't allowed under that license.

A decent way for contributors to get credit in some way for their efforts (if you think that should come in)

Contributors effectively get to choose themselves what type of credit they would like.

What are the pros and cons (don't forget these) of the license model you propose?

Pros: Anything currently allowed remains allowed. Low risk of alienating contributors.

Cons: Different licenses for different answers. Requires active effort by contributors.

How does your proposal fit in different types of sites? For example: Stack Overflow, Code Review, Code Golf, SF&F, Seasoned Advice.

Given that this would be opt-in, nothing bad would happen to any of the sites. If the people on some of those sites do not want their code to be available under a more permissive license, it won't be.

  • hvd, "I accept that the license switch is intended to solve a real problem". Which is what, exactly? – sampablokuper Jan 16 '16 at 20:33
  • 3
    @sampablokuper That posted code currently gets re-used in ways expected by the people asking questions, expected by the people answering those questions, but not allowed by the license. Someone with bad intentions could hypothetically answer a question, and then after seeing how the person uses the answer, sue. Or some company lawyer with good intentions can advise not to use any code posted on SO, even code that's meant to be free to use. – hvd Jan 16 '16 at 21:13
  • 2
    "That posted code currently gets re-used in ways expected by the people asking questions, expected by the people answering those questions, but not allowed by the license. " I do not understand why anyone would expect to be legally allowed to re-use a work in a manner disallowed by the work's license (unless they are in a jurisdiction where the license is unenforceable). That would be irrational, and irrationality should not dictate SE policy. – sampablokuper Jan 16 '16 at 23:36
  • 1
    "Someone with bad intentions could hypothetically answer a question, and then after seeing how the person uses the answer, sue." If a licensee uses a work in contravention of the work's legitimate license, then that licensee is in the wrong and it would be perfectly reasonable for the licensor of the work to sue them for the misuse. And CC-BY-SA 3.0 is a legitimate license for works such as Stack Exchange content. So there is no problem here to be solved by changing the license. – sampablokuper Jan 16 '16 at 23:39
  • 4
    @sampablokuper Going through my own posting history for a simple yet copyrightable function, there's this one. I posted that fully intending the person asking the question to be able to copy and paste that function into an existing software project. The OP there expects that as well. The CC-BY-SA license disallows that in pretty much all cases. That answer is not an exception. There's tens of thousands of answers with code where it's clearly intended to be used by readers in ways that CC-BY-SA doesn't allow. – hvd Jan 16 '16 at 23:48
  • 1
    That URL gives a "Page Not Found" error. Anyhow, if you explicitly gave permission for that work of yours to be used in a manner beyond the terms of CC-BY-SA 3.0, that's fine. As the licensor, you are always at liberty to grant a licensee whichever rights you want to give them. So again, no problem here. – sampablokuper Jan 17 '16 at 0:06
  • 3
    @sampablokuper Sorry for the bad link. A 0 slipped in there at the end. I didn't give permission for that, because I didn't realise at the time that it would be necessary, nor was I ever asked for such permission. Have you ever seen such requests for any code in any answer on SO that you expect to be reused outside of SO? So that's pretty much what I'm proposing: for SE to encourage granting such permission. – hvd Jan 17 '16 at 0:13
  • 1
    OK, I've now read the Q & your A. "I posted that fully intending the person asking the question to be able to copy and paste that function into an existing software project." That's obviously fine if the project is either (a) not distributed or publicly performed (e.g. it is for internal use only), or (b) distributed/performed in accordance with CC-BY-SA 3.0. "The OP there expects that as well." The OP is very specific in the question about their expectations, and that is not one of their stated expectations. It appears to be an assumption on your part, and your assumption may be wrong. – sampablokuper Jan 17 '16 at 0:34
  • So again, there is no problem here that needs to be addressed with a license change. – sampablokuper Jan 17 '16 at 0:35
  • I should add that I'm not simply being ornery here. I am obviously in favour of retaining the existing licensing, as you are, but I am comfortable with the prospect of a mechanism that allows users to explicitly license their work under additional FSF-approved licenses as long as the mechanism: (1) requires conscious action in each case ... – sampablokuper Jan 17 '16 at 0:53
  • ... (2) addresses Thomas Owens's concerns, and (3) has its existence justified. Item 3 is what is lacking in your post (and, perhaps, in general) IMO. – sampablokuper Jan 17 '16 at 0:55
  • @sampablokuper "or (b) distributed/performed in accordance with CC-BY-SA 3.0" -- In other words, pretty much never. Which is exactly the problem. – hvd Jan 17 '16 at 9:19
  • "In other words, pretty much never. Which is exactly the problem." GPLv3 (or compatible) works are fairly common, and are likely in accordance. So that's not a problem either IMO. – sampablokuper Jan 17 '16 at 11:53
  • @sampablokuper I qualified "never" with "pretty much". How many questions on SO do you think are about code that is meant to be available exclusively under a cc by sa-compatible license? – hvd Jan 17 '16 at 12:06
  • "How many questions on SO do you think are about code that is meant to be available exclusively under a cc by sa-compatible license?" Exclusively? I have no idea. But by definition (i.e. as defined in the terms & on every single page on the site), all content on SE is meant to be available - and is available - under CC-BY-SA 3.0. – sampablokuper Jan 17 '16 at 13:35
1

I believe the licensing should not be changed at all. Code on Stack Overflow (and every other exchange AFAIK) falls into the following categories:

  • Code in questions

    In order to encourage question asking I wouldn't suggest changing the license on code in questions. Don't want to discourage people from asking questions if it may mess with their code's licensing.

  • Code in answers

    Good answers on Stack Overflow (and as far as I know, other sites) either don't involve any code at all (explain a concept) or have code where the existing scheme is just fine. I've searched through my answers and come up with the following categories of code that I think is representative of what we consider to be good. I also looked at other answers and find that they seem to fall under these categories as well.

Categories of Good Code in Answers

None of These Are Appropriate For or Need a License Change, Here's Why

Code used to explain a concept where words alone may not do a good job

"Code" that is so short that it's really part of the documentation, code block only being used to make things easier to read

The CC BY SA already handles this just fine. The code isn't intended to be used, probably isn't useful anyway. It's part of my documentation and should treated as such.

Code that is so simple that copyright doesn't even apply

As stated, there's no copyright problem here. If I or anyone else can copyright srand(time(NULL)); then we're in trouble.

Code that is meant as an example of a point I'm trying to make, but wouldn't serve any practical purpose in a real program

Again, CC BY SA already covers this. This category would be the worst to put under the MIT license with some weak attribution because it allows anyone to use my code examples in their work (say a coding book or a blog) with only some weak attribution.

Code that is highly derivative of code in the question

If we agree that question code should be left alone (CC BY SA), then this code has to be CC BY SA as well.

Others?

I've searched hard for any examples that don't fall under this and I can't seem to find any. Not just my own, but others' answers as well. Yes, they probably exist, but there's not a lot of them. A good answer isn't "here's the code that'll do what you want". It's "here's the understanding to do what you want, hopefully now you can do it yourself, if not let's work at the issue some more until you've got it." Also, I think providing a lot of code in an answer is roughly the equivalent to providing giant code in a question that isn't an MCVE.

How Changing License Could Be a Problem

Now let me give an example of how trying to license code could become a problem. Let's say that someone has a question about some code from an open-source project that isn't MIT compatible (GPL, LGPL, even BSD iiuc). Let's say they're asking how to make function x do something. Perhaps the documentation even says function x should do blah blah, but it doesn't. To answer the question I might quite likely go look up the source for said function, investigate it and pinpoint a few lines of code that answers their question. Something along the lines of "you can't do that with that function because these lines... make it impossible" or even, "these line... got changed in the recent version x.y so try that version and see if it solves your problem".

If we consider the answer to be a document then I can claim fair-use of the code (it's just a few lines) and get away with it. I seriously doubt any of the project's contributors are going to have a problem with it and if anyone tries to use it in a program of their own they're either going to have to craft a fair-use argument of their own or use the CC BY SA license which would likely be unfriendly to their cause. However, if we change things and try to start treating code separately then all of a sudden it's much harder to form a fair-use argument because I'm not using a few lines of code as part of a broader narrative, now I'm trying to take some code and relicense it as MIT which isn't likely to fly.

Yes, I understand what exactly is "code" has yet to be determined. However, I think that trying to get into any of this is just walking ourselves into a minefield. Do I get in trouble for trying to fair-use some GPL code. Or is my fair-use considered part of the narrative and someone very innocently try to re-use it under MIT not realizing that it isn't "code" to begin with. Does Stack Exchange get drawn into the quagmire of determining who screwed up?

-1

Any license that would legalize the current status quo.

That could include MIT License with Link Attribution (the second proposal by Stack Exchange), or a Public Domain License (something I dislike because it promotes bad practice, but is a proposal that I have heard floated; it was also the de facto first proposal by Stack Exchange, since MIT without attribution is essentially public domain).

From Shog9's answer on that infamous question:

An effective license is one that the licensee understands and can comply with This has been the achilles heel for CC-BY-SA all along; it's trivial to apply for posts, but folks struggle to apply it correctly to code. Chances are, the vast majority of one-liners out there aren't even copyright-able... But how do you know that? When does the attribution requirement kick in, how does that even apply to compiled or server software, what does the "viral" aspect even mean when all that's being "shared" is a binary? These are all questions that any proper software license answers, but which CC-Wiki ignored because it wasn't meant for software.

Common-sense tells you that - when someone asks, "How do I do X?" on SO and someone else responds, "Use this function" - you should expect the latter person wants you to use that function in your code. And so most folks do just that, and don't even think about the licensing. End result? Licensing punishes the conscientious.

So what do we really need here? Something that folks can apply in a common-sense fashion without being dishonest and without violating a license. This is what Sam's been poking away at for months now, the idea that we can make more people honest by making it more obvious what that even means.

And let me return to your original point:

Clearly, the community thinks Stack Overflow Inc messed up with their license proposal.

The community has already messed up when it had chosen CC-BY-SA for licensing. CC-BY-SA was not meant for licensing code in the first place, scaring off the "conscientious". And, if a bunch of people who are not "conscientious" are happily violating a license, well what? Stack Exchange is not going to sue for you, and you aren't going to look at every public and private code repo to see if your code is being copied. We have bred a culture of lawlessness here. How is that somehow a successful license?

We should either enforce the law or change the law. And changing the law is a more practical solution and the one that is most friendly towards developers.

The con, if you will, is that it may supposedly encourage "bad practice" (copying code). But people are already copying code now, so I don't see how we're making that "bad practice" even worse. We can always attach a stigma towards a programmer doing so too many times (since it may lead to unmaintainable code).

And as for this question:

How does your proposal fit in different types of sites? For example: Stack Overflow, Code Review, Code Golf, SF&F, Seasoned Advice.

We should probably have the same policy for all sites, because doing so will avoid needless confusion and complications. I think a site-wide MIT license would actually be a perfect way of handling sites other than Stack Overflow, since it would mandate a citation and get people to realize "Hey, this guy copied a working answer from Code Review instead of actually thinking of his own library to implement Foo". Make it public domain, and shady/sneaky stuff like that may go unnoticed.

Under CC-BY-SA, I could already copy code from Code Review, Code Golf, etc. and put it in my project with minimal fear of a lawsuit so long as my project has a copyleft license that is compatible with CC-BY-SA. That is, if I even care to follow the CC-BY-SA license. So the current status quo is already failing to protect these sites.

  • 11
    If I'm misunderstanding, please correct me, but it sounds like you're saying that "people don't follow the rules we have now, so let's change the rules to what people actually do". I disagree with that. When I started contributing to Stack Exchange, I had an expectation of how my work would be used and would be allowed to be used. Just because people can't read and understand the terms of use and license agreements doesn't mean we should change them, it just means that it needs to be more clear and easier to follow. – Thomas Owens Jan 16 '16 at 18:17
  • 1
    While I disagree with @ThomasOwens about the value of code and code attribution he has a pretty much irrefutable point here. SO should not be allowed to say in the legalese that contributions are "irrevocably licensed" under a specific license and then change the license. "Irrevocably" means literally "you must not change it" (not that anyone can stop them, but it does seem dishonest). – Eike Pierstorff Jan 16 '16 at 19:34
  • @EikePierstorff I believe that "irrevocable" means to prior licensed work. SE can, from my reading, change the terms. However, they can't change previously submitted work. Which is why the posts from SE are about setting a new date for a new set of terms, where all old content would remain under the old terms. With mention of allowing content owners to update the terms to the new terms as well. – Thomas Owens Jan 16 '16 at 19:36
  • @ThomasOwens, thank you. I think I better shut up, parsing legalese in a foreign language does not seem to be my strong suit. – Eike Pierstorff Jan 16 '16 at 19:38
  • @ThomasOwens, if the rules for attribution were made more clearer in the past, and expectations were properly set, then maybe less people would have copied code. But at the time, people did not really know what CC-BY-SA meant, and even Jeff Atwood argued against any formal policy by saying code snippets had no legal protection anyway (this was before Code Review, Code Golf, etc. came into being). So we now have this problem that we have to fix. – Tariq Ali Jan 17 '16 at 3:12
  • 3
    @TariqAli If you read CC BY-SA, it is pretty clear. If you have read it and don't fully understand it, the right thing to do would have been to ask and not make incorrect assumptions. Not knowing or understanding the rules is not a valid reason for not following them. And Jeff is just plain wrong - maybe he should have consulted a lawyer first. – Thomas Owens Jan 17 '16 at 14:57
-1

Regardless of what the actual licence is, source code from posts routinely does get used, and will always get used, as if it were public domain code. There is, realistically, nothing that will curb this: mass enforcement is not a sane option. The sensible and mature thing to do is to make the licence reflect reality.

All source code provided across the Stack Exchange network should be a permanent and irrevocable release into the Public Domain - CC0.

How does it make the life of a developer easy, or less complicated?

Just use the code, and that's the end of it.

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?

Just use the code, and that's the end of it.

A decent way for contributors to get credit in some way for their efforts (if you think that should come in)

Stack Overflow reputation, badges, profile, Careers profile, already do that.

What are the pros and cons (don't forget these) of the license model you propose?

Pros: It's simple, it's easy, and most importantly, it reflects what's actually happening in the real world. If someone wants to give credit to public-domain code, then they can do. Attribution is optional, and there's no viral nature. That's actually what's happening in reality now, anyway. Yes, I know that's not what the current licence says. But it is what actually happens. And that's not going to change, regardless of what the licence is.

Cons: it's a change, and change is always uncomfortable. It's a big bit of cheese being moved. I've written a few lines of code professionally. I don't know how many, but it will be in six figures. I've employed programmers, I've been a programmer, I've trained programmers. I understand its professional value. Giving away code seems counter-intuitive, given all of that.

How does your proposal fit in different types of sites? For example: Stack Overflow, Code Review, Code Golf, SF&F, Seasoned Advice.

It applies across all of them. All source code provided in posts on any Stack Exchange site would be public domain.

  • This is right. Stackoverflow is already unfriendly enough, I have decided no longer login to answer any more questions because of some bad experience. I specially login to up vote you. – pinxue Jan 18 '16 at 5:50
  • A bit extreme maybe, but possibly the most reasonable option I've seen. Frankly, why would you post anything significant enough to warrant proper licensing to Stack Exchange anyway? I struggle to think of any examples where this would be a good question/answer for SE in the first place. My answers are not "code", they are advice which often use code for illustrative purposes. – Alexander O'Mara Jan 19 '16 at 19:34
  • 6
    I completely disagree with your basic premise: "The sensible and mature thing to do is to make the licence reflect reality." There will always be people who shoplift, also, regardless of how many laws there are against it. Does that mean shop owners should give up on charging for their goods? – Wildcard Jan 19 '16 at 20:09
  • 2
    @Wildcard I think he's suggesting the license should reflect the majority. If that's the case, shoplifting is a bad analogy as I don't believe the majority of the world's population shoplift. However, I lack the statistics to comment on the majority use case for SE content. – Alexander O'Mara Jan 19 '16 at 20:26
  • 3
    @AlexanderO'Mara, I'll state a modified version of the statement that I would agree with: The license must not make "rule breakers" out of everyone; it should be simple to comply with and in alignment with "what people will do" so that they are actually likely to comply. (It's a seldom-taught principle that a law or rule that is not based in any way on the customs of the society it is written for, will be unenforceable. So the license should align with our already-existing customs of SE. That's different from "people will break the rule so we'll make a rule allowing that.") – Wildcard Jan 19 '16 at 20:31
  • @Wildcard I've clarified the first paragraph - does that help? – EnergyNumbers Jan 20 '16 at 0:19
  • 4
    @EnergyNumbers, some—but it's not your wording I object to; it's your conclusion. I don't want my answers (or questions) going into the public domain. Sure, some people will ignore the license and behave as if it were public domain—but at least flagrant abuse could be curbed by law. – Wildcard Jan 20 '16 at 0:27
  • 4
    From this answer: "Let's take a hypothetical extreme example: someone publishes an O'Reilly-style cookbook consisting of code snippets extracted from Stack Overflow, Code Review, PPCG, …. Only the code blocks are taken; all of the surrounding text is reworded. No attribution is given. How would you feel about that?" @EnergyNumbers, with your proposal to use public domain, such a book wouldn't even have to reword the text. They could copy answers verbatim and publish the book with no attribution. No legal recourse possible. – Wildcard Jan 20 '16 at 0:28
  • @Wildcard In your first comment, you did object to the wording. So I reworded the first paragraph to clear up the confusion that the same argument could be applied to shoplifting: it cannot. – EnergyNumbers Jan 20 '16 at 0:30
  • 1
    @Wildcard no one would buy that book since they can just go to SO and it will be 1 million times more efficient. If X person decides to edit it into some novel/useful format then I think they should get credit for the work they've put into doing that. So your example doesn't really provide a meaningful concern. – AwokeKnowing Jan 25 '16 at 23:34
-1

GPL v3

It is:

  • Meant for code
  • Compatible with CC-BY-SA v3 (which is what the old answers are under)
  • The only possible license with these characteristics (you have to have approval from Creative Commons to be compatible with it, and they have only given it to GPL so far.)
  • 3
    Uh... "Currently, no non-CC licenses have been designated as compatible with BY-SA 3.0." I think you're thinking of CC-BY-SA 4.0, which is compatible with GPL v3, but which isn't used by SE. – Nathan Tuggy Jan 24 '16 at 7:30
  • 1
    @NathanTuggy it's a two step comparability (first to v4, then the gpl). – PyRulez Jan 24 '16 at 15:49
-3

This is a proposal

A solution for the licensed code in SO and SE:

What about if all the shared code by the users in SO and SE sites would be under the MIT License, and if a user wants to protect an specific answer they would be notified with a period of lets say 30 days to protect they answers before the changes come into effect, so now the answers would have the option if a user want attribution, but the code will always be under the MIT License, with attribution required by the user (how it was proposed: here).

Also should be specified when is needed to give attribution, cause if i'm using just around 5 lines of code from 100 is not a substantial part, or at least probably won't make you a millionaire, when attribution is needed should be defined.

Now where or how to give attribution to the users that choose to have it?

Well i believe that a way, could be adding in the header or bottom of the file, a notice that says something like "Some Parts of the code are from Stack Overflow, for contributions and credits go and read the file: README.txt or attributions.txt or at the bottom of this file" Now in this file or (bottom of the same file) could have the title of the question and its link, the author name with a link and probably the code snippet that was used, now if someone sees that snippet in your code they would know where it came from.

Yes i know, still doesn't sound pretty nice, but the authors that want attribution would get it, and the other users won't. Who knows, probably your file won't even need to give attribution.

Remember is just an opinion and possibility i'm not a lawyer, i'm just a user giving it's opinion, also keep in mind that not everyone think in the same way, i'm a person that like to give for free to the programmers community, but some things need to be rewarded , other people believe that all (or almost all they do should be free and open source) and probably some people charge for everything they do, but we all have beneficiated from the free and open source assets, what are your thoughts?

  • I really don't know what you propose here... care to clarify? – Deduplicator Jan 19 '16 at 19:18
  • i changed the title – Rodrigo Calix Jan 19 '16 at 19:39
  • Well, the body is unclear. – Deduplicator Jan 19 '16 at 19:48
  • 2
    You can't retroactively change a license like that. – Alexander O'Mara Jan 19 '16 at 19:49
  • @AlexanderO'Mara Read the bottom of the answer: "Remember is just an opinion and possibility" not official, please read the question, to understand the context. – Rodrigo Calix Jan 19 '16 at 19:51
  • 1
    ... I don't get it. You're proposing something that's impossible, but would be nice if it was? – Alexander O'Mara Jan 19 '16 at 19:52
  • @AlexanderO'Mara you most know that all code here in SO and SE is licensed under CC BY-SA 3.0, and is not recommended for software, so there will be changes in the license meta.stackexchange.com/q/272956/245360 but no everyone is agree. – Rodrigo Calix Jan 19 '16 at 19:57
  • 2
    Yeah ... I got that. Your first sentence reads like you want to change the license on all existing content after a period of 30 days. SE does not have the rights to change the license on existing content, and would have to obtain a new license for all existing content in order to change it. – Alexander O'Mara Jan 19 '16 at 20:05
-5

The best option is to keep the current license, CC-BY-SA 3.0.

How does it make the life of a developer easy, or less complicated?

  1. It does not require Stack Exchange users to learn a new licensing regime.

  2. It allows all content to be freely used by anyone, including in derivative works and for-profit enterprises, subject to fair terms.

  3. It does not require impossible tasks of anyone, such as distinguishing between 'code' and other content.

  4. It is the same license as is used by Wikipedia, which enables use of suitably attributed Wikipedia content in Stack Exchange posts and vice versa.

  5. It avoids license fragmentation (different licenses for different pieces of content Stack Exchange), and the confusion that would create.

  6. It helps protect the Stack Exchange community from plagiariasm and the tragedy of the commons.

  7. It is one-way GPLv3 compatible (IMO, IANAL).

No other proposal has all these benefits.

What do I as a decision maker have to know. What can or should I do and what is allowed or not?

Decision makers should read the license. This is easy, because:

  • the license is short;
  • it has an even shorter summary in case you're in a hurry;
  • there is already a link to the licence at the bottom of every single page in the Stack Exchange network of sites. (Scroll down if you want to check!)

Of course, decision makers should always read the license anyway.

A decent way for contributors to get credit in some way for their efforts (if you think that should come in)

The license requires attribution, for the good reason articulated by Stack Exchange's co-founder:

"The whole point of Stack Overflow, Server Fault, Super User, and every other Stack Exchange site is to give credit directly to the talented people providing all these fantastic answers."

What are the pros and cons (don't forget these) of the license model you propose?

If you have sketchy business requirements then this license will stymie you. That's a con for anyone with sketchy business requirements and a pro for all legitimate users of the sites.

How does your proposal fit in different types of sites? For example: Stack Overflow, Code Review, Code Golf, SF&F, Seasoned Advice.

It leaves them all exactly as they are, so they can continue to thrive :)

  • 6
    If the code was licensed under CC-BY, then your argument may be valid. But the code is licensed under CC-BY-SA, meaning the resulting product must be distributed under the same license (or a compatible license). That suggest that only copyleft licenses are to be used, while permissive/proprietary codebases are prohibited from using this code. The content is not freely usable by everyone. – Tariq Ali Jan 16 '16 at 18:07
  • 8
    In order to maximize use of copyrightable code posted on a Stack Exchange site, no license with a strong copyleft is suitable as it precludes use in closed-source applications. Right now, I am prohibited from using copyrightable code from Stack Exchange in a project at work, as our policy is to never release source code and CC BY-SA requires that the entire work be released if combined. If I'm working on a personal project, my preferred license is Apache. I can't incorporate any copyrightable code from a Stack Exchange site into my personal projects. That's bad all around. – Thomas Owens Jan 16 '16 at 18:14
  • 2
    @ThomasOwens, "Right now, I am prohibited from using copyrightable code from Stack Exchange in a project at work, as our policy is to never release source code." If yr policy is to never release source code, then it is right & proper that you should not be allowed to derive your products from Stack Exchange content. Otherwise, you'd be taking advantage of the four freedoms without reciprocating. Taking without giving back is sketchy as hell, & I'm glad you're prevented from doing it. – sampablokuper Jan 16 '16 at 18:18
  • 3
    @sampablokuper Why shouldn't I be able to use Stack Exchange at work or in personal projects with non-copyleft licenses? Even the Free Software Foundation, who frequently advocate for strong copyleft, recognize that under certain conditions, their strong copyleft licenses aren't the best option to promote free software. – Thomas Owens Jan 16 '16 at 18:23
  • 3
    @ThomasOwens, Stack Exchange has heterogeneous content. I don't think you bothered to read the whole page you linked. It says: "If your work is not being created for use with a particular software project, or if it wouldn't be appropriate to use the same license as the project, then we only recommend that you choose a copyleft license that's appropriate for your work. We have some of these listed on our license list. If no license seems especially appropriate, the Creative Commons Attribution-ShareAlike [CC-BY-SA] license is a copyleft that can be used for many different kinds of works." – sampablokuper Jan 16 '16 at 18:28
  • 2
    @sampablokuper I would like to point out that Stack Overflow is for professional and enthusiast programmers and Programmers Stack Exchange is a Q&A site for professionals and students in software development and Mathematica Stack Exchange is for users of the software Mathematica developed by Wolfram Research (and Mathematica is often used in companies - people at work). We should not be precluding a large amount of our audience due to the license terms. – Thomas Owens Jan 16 '16 at 18:31
  • 2
    @sampablokuper Then go and get Creative Commons to respond, because I'm basing my information on what is available to me from Creative Commons. If things are out of date, then they should update their content and guidance. First, The version of CC BY-SA that Stack Exchange uses is 3.0, which is not compatible with any non-CC license. And no version of CC BY-SA is compatible with GPL v2. Second, if I take a work that is CC BY-SA 3.0 and extract the source, I have a solely software piece that is CC BY SA, which is problematic per CC themselves. – Thomas Owens Jan 16 '16 at 18:43
  • 2
    @ThomasOwens, "If I can't use copyrightable code from Stack Overflow in my projects (at work or at home), then I'm being excluded." This is a little bit like saying, "If I can't take bits of the canvases home from the National Gallery for use in my own projects, then I'm being excluded." Er, no. You can still use those works in lots of other ways: get inspiration from them, study them, copy them for a reasonable range of purposes, and even contribute to the collection so that others can derive similar benefits from your contributions, etc. – sampablokuper Jan 16 '16 at 19:01
  • 2
    No. I want the source code to be under a permissive license with attribution. That's it, plain and simple. A license that allows me to use code from Stack Overflow in any project regardless of license by providing appropriate attribution. I think that's a very simple thing and it's easy to do: All source code under the Apache, BSD 2-clause, BSD 3-clause, or MIT license without modifications made by the terms of use. – Thomas Owens Jan 16 '16 at 19:03
  • 3
    @Andy CC BY-SA has never been vetted for software. It doesn't talk about source code or the binary output of compiling source code. But, based on my understanding of CC BY-SA, if I were to take code licensed under CC BY-SA and incorporate it into a file, minimally that entire file would become CC BY-SA. Potentially, the entire software project would become CC BY-SA. That means I would need to release the source code for at least one file and at most one project. If that project is a library, you get into linking as well, which is also not discussed in CC. It's a whole can of worms. – Thomas Owens Jan 16 '16 at 19:31
  • 3
    @sampablokuper Please explain why it is a "sketchy business requirement" to have an organizational policy to not release source code. Have you never worked in an environment that sells software products? Or software embedded into a hardware system (where releasing the source code would also reveal things about the hardware system)? Or have to be concerned with ITAR? It's not sketchy to have a policy to not release source code to anyone. – Thomas Owens Jan 16 '16 at 19:33
  • 3
    @ThomasOwens, "So are you saying that if an engineer at Microsoft needs help and incorporates CC BY-SA code into the Windows kernel, then the whole Windows kernel code base should be released [in compliance with] CC-BY-SA?" Yes, obviously. And a good thing, too! But depending upon Stack Exchange contributions would be a sketchy business requirement for Microsoft if it also wanted to keep distributing Windows as proprietary software. If it wants the latter, it simply ought to pay its developers to write the necessary code. (Which it does, I believe.) – sampablokuper Jan 16 '16 at 19:57
  • 3
    @sampablokuper So now you want to explicitly exclude anyone who doesn't believe in strong copyleft and viral licenses from participating on Stack Exchange? I'd like to point out that Jon Skeet is an engineer at Google, Eric Lippert was on the Microsoft team that developed the Visual Basic, VBScript, JScript and C# compilers. Guido van Rossum created Python and was an engineer at Google and Dropbox. If you don't make it friendly for companies who operate in a closed-source environment to participate fully here, these people may not have been able to share their knowledge. – Thomas Owens Jan 16 '16 at 20:12
  • 3
    @ThomasOwens, "So now you want to explicitly exclude anyone who doesn't believe in strong copyleft and viral licenses from participating on Stack Exchange?" No. And all the examples you have given show that far from the current license excluding such people, they have instead been very enthusiastically and constructively participating! – sampablokuper Jan 16 '16 at 20:21
  • 3
    @sampablokuper Dual licensing, given the current tools, is not feasible. This was mentioned in one of the previous postings about the license. Putting a disclaimer in your profile is not obvious and clear to users and requires people to check their profile and is changable at any time without a record to allow people to determine what license they received the content under. Putting it in a post means that things can be added or removed by anyone with edit rights so posts would have to be policed (but there is a revision history). It's not a recommended approach. – Thomas Owens Jan 16 '16 at 20:31

You must log in to answer this question.

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