internet licensing
A Code License for Stack Exchange
<p>There have been heated discussions(<a href="https://meta.stackexchange.com/questions/271080/the-mit-license-clarity-on-using-code-on-stack-overflow-and-stack-exchange">1</a> <a href="https://meta.stackexchange.com/questions/272956/a-new-code-license-the-mit-this-time-with-attribution-required/">2</a>) over what license should be used to cover the code posted on Stack Exchange because the CC-BY-SA license is inadequate. Both have been received with criticism from both legal advisors and common folk.</p>

<p>So, what are the possible licenses that would benefit Stack Exchange. I am aware there is no perfect license and that there is always room for opinion, but here are the things you could consider:</p>

<ul>
<li>Many users don't care if their code is copied.</li>
<li>For other users, they don't mind their code being copied to another post, as long as there is a link to the post and a mention of the original author.</li>
<li>I don't think anyone cares what happens to code that is less than 3-4 lines at least.</li>
<li>Stack Exchange does not probably want people to own the code they submit. For example, Stack Exchange has (and probably wishes to retain) the right to keep even deleted posts in the visibility of the high rep users (even if the author is against it).</li>
<li>At the same time, it doesn't seem fair for SE to acquire complete ownership of the content. The user must still have the final say, if the content is to be used for purposes not already agreed upon in the licence.</li>
<li>Stack Exchange can expect a high level of decorum and respect for laws from its users. At the same time, it cannot expect redundant attributions anywhere and everywhere, because one of its main aims is to not waste the users' time.</li>
<li>There should be a clear-cut way to determine what is code and what isn't. The code formatting indicators on SE may not be adequate because some users simply use backticks, or 4-space indented text for other not-so-codey text.</li>
</ul>

<p>The first thing that people need to do <em>is to quit over thinking it.</em></p>

<p>That being said, I'm going to see if I can tackle your problems one by one, before summarizing and providing my own opinion:</p>

<blockquote>
  <p>Many users don't care if their code is copied.</p>
</blockquote>

<p>I'm like that. I left a <a href="https://meta.stackexchange.com/questions/272956/a-new-code-license-the-mit-this-time-with-attribution-required/273020#comment886948_273020">couple comments on Shog9's post that read this:</a></p>

<blockquote>
  <p>Good point: Licensing does not prevent careless or malicious use. I'm surprised about how many people are thinking that this license will let them steal their code, because it's already happening right now. I don't want to sound pessimistic, but when thousands of people break a license/law/contract, it's a bit of a lost cause. You're not significantly damaged in a direct way, so honestly, let it go. <strong>All I want is to make sure that no one can come up to me if something of mine screwed something on there side. Aside from that, I don't care about people who don't attribute me: chances are, they have no moral sanity, and I will appreciate the people who do, and help me out. As it is, I'm 16, I share what I know with a good heart, and in a well-spirited manner, and at the end of the day, knowing that I was able to help someone out makes my day.</strong></p>
</blockquote>

<p>I don't mind if my code is copied. I know that people will copy my code whether I like it or not, but I also know that there will be people in the world who will say "thanks", and will try to attribute me where possible. I feel good about that.</p>

<p>That being said, I don't care. But the person who uses my code does. The license that affects all Stack Exchange posts are licensed under the Creative Commons Attribution Share-Alike license, or CC BY-SA. Code contributions don't fit well with this. <a href="https://opensource.stackexchange.com/questions/1717/why-is-cc-by-sa-discouraged-for-code">This excellent post on Open Source</a> explains why it's discouraged for code.</p>

<p>What these people want is a code-friendly license, so that they can stay in the clear when it comes to copyright issues. The next thing they want, is for someone to come after them over some licensing issue. You may think that people are good, but you never know the world around you. They can be evil.</p>

<blockquote>
  <p>For other users, they don't mind their code being copied to another post, as long as there is a link to the post and a mention of the original author.</p>
</blockquote>

<p>Most people post with good intention. There's not that much of an issue from a legal perspective either: The license allows people to copy and paste into answers of their own, and since the license remains the same, there's no issue to get into. The license allows it, and contributors kind of have to acknowledge it.</p>

<blockquote>
  <p>I don't think anyone cares what happens to code that is less than 3-4 lines at least.</p>
</blockquote>

<p>I can probably agree. Such code probably wouldn't be eligible for copyright anyway, since it's so trivial. Many jurisdictions have a "Threshold of Originality," which means that simple things can't be under copyright.</p>

<blockquote>
  <p>Stack Exchange does not probably want people to own the code they submit. For example, Stack Exchange has (and probably wishes to retain) the right to keep even deleted posts in the visibility of the high rep users (even if the author is against it).</p>
</blockquote>

<p>Wait what? You may be right that it is in Stack Exchange's interest to host content. After all, they get hits, which helps them as a business.</p>

<p>It is illegal for companies to host illegal content. If somebody sees objectionable, copyrighted content hosted on Stack Exchange that they would like removed, <a href="https://meta.stackexchange.com/a/114007/289845">then they need to file a DMCA Takedown Request</a>. This is also why moderators, like myself, cannot process legal requests.</p>

<p>The reason why Stack Exchange doesn't act themselves, even if they see something that is copyrighted and objectionable, is because it's a form of liability. When YouTube began removing copyrighted content themselves, they received a wave of lawsuits (<em>If you remove some, you need to remove all. Why didn't you remove mine?</em> being the argument). The plaintiff's won those, and when YouTube did nothing, they weren't liable at all.</p>

<p>If a user wants to have their content taken down, it's tricky. You need to look at the <a href="https://stackexchange.com/legal">Terms of Service for Stack Exchange</a>: (quoting Section 3)</p>

<blockquote>
  <p>You agree that all Subscriber Content that You contribute to the Network is perpetually and irrevocably licensed to Stack Exchange</p>
</blockquote>

<p>When Stack Exchanges gets your content, you grant them an irrevocable license to your contribution. This is pretty standard across a lot of sites: it's just a way to secure data and stay in the clear of licensing issues.</p>

<blockquote>
  <p>At the same time, it doesn't seem fair for SE to acquire complete ownership of the content. The user must still have the final say, if the content is to be used for purposes not already agreed upon in the licence.</p>
</blockquote>

<p>They don't.</p>

<p>What users have done is that they have provided a license of their content to Stack Exchange. This is done, again, through their Terms of Service: </p>

<blockquote>
  <p>You grant Stack Exchange the perpetual and irrevocable right and license to use, copy, cache, publish, display, distribute, modify, create derivative works and store such Subscriber Content and to allow others to do so in any medium now known or hereinafter developed (“Content License”) in order to provide the Services, even if such Subscriber Content has been contributed and subsequently removed by You.</p>
</blockquote>

<p>The user grants a license to their content to Stack Exchange, <em>but they do not assign or relinquish copyright</em>. The code still belongs to them.</p>

<p>It's important not to conflate the user contribution policy, with copyright assignment. You are still free to add an additional license to your content (known as dual or multi-licensing), and have a copy for your own use. Stack Exchange will always host a copy licensed under the CC BY-SA license.</p>

<blockquote>
  <p>Stack Exchange can expect a high level of decorum and respect for laws from its users. At the same time, it cannot expect redundant attributions anywhere and everywhere, because one of its main aims is to not waste the users' time.</p>
</blockquote>

<p>Not only Stack Exchange expects it, but many copyright laws in various jurisdictions <em>require it</em> too.</p>

<p>There's a concept known in many jurisdictions known as moral rights. These are rights that are irrevocable, whether you like it or not. Generally, these include attributions, disclaimer of liability, and other rights as well. Even if your work is in the public domain, you still retain these moral rights.</p>

<p>If memory serves me right, the right to be attributed is revokable under United States copyright law. Therefore, attribution becomes more a courtesy, <em>when the right is revoked</em>. Licenses such as CC BY, and CC BY-SA still require attribution as a part of their licensing terms. What defines attribution is generally up to the person who uses the content. If memory serves right again, one can not demand how to attribute.</p>

<blockquote>
  <p>There should be a clear-cut way to determine what is code and what isn't. The code formatting indicators on SE may not be adequate because some users simply use backticks, or 4-space indented text for other not-so-codey text.</p>
</blockquote>

<p>Personally, I feel like making the entirety of a post under both the Creative Commons license and whatever proposed code license they use is the best option, and allow people to use moral judgement to determine the most appropriate license. The concern comes about people who lack such judgment. I bet these same people don't follow the existing license anyway - <a href="https://law.stackexchange.com/questions/2163/how-is-it-possible-for-millions-to-use-pirated-software-at-home-and-never-get-ar">and are a lost cause</a>.</p>

<p><sub>We made it through!</sub></p>

<hr>

<p>There will always be debate on the license of choice. Some people want the GPL, a license that's apparently closer to the status quo of Creative Commons license (I disagree that it's a good match), while other's want permissive licenses, such as the MIT or the Apache licenses. I'd prefer the permissive type, since it allows use in closed-source applications, and grant more rights (i.e. less restrictions) to the people that use them. I'm not going to right much because my hands are tired, but I'm sure if you've  got more questions about the open source licenses themselves, you can probably ask on <a href="https://opensource.stackexchange.com">Open Source Stack Exchange</a>.</p>
