6

There have been heated discussions(1 2) 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.

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:

  • Many users don't care if their code is copied.
  • 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.
  • I don't think anyone cares what happens to code that is less than 3-4 lines at least.
  • 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).
  • 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.
  • 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.
  • 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.
  • After reading the META.SE posts and answers, I've arrived at the opinion that I don't know enough about the new policy. Idk what will be considered code, how they will determine what is code and what is not. Most importantly I do not understand why CC-BY-SA is not sufficient for code. Could you elaborate on this? – Viktor Jan 15 '16 at 0:12
  • @Viktor You should ask that on the Meta because I honestly have no idea why the current license isn't sufficient. – ghosts_in_the_code Jan 17 '16 at 15:56
  • FYI to anyone wanting to catch up on what is happening. I think this answer is most illuminating. – Viktor Jan 17 '16 at 16:09
2
+100

The first thing that people need to do is to quit over thinking it.

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

Many users don't care if their code is copied.

I'm like that. I left a couple comments on Shog9's post that read this:

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. 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.

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.

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. This excellent post on Open Source explains why it's discouraged for code.

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.

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.

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.

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

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.

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).

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.

It is illegal for companies to host illegal content. If somebody sees objectionable, copyrighted content hosted on Stack Exchange that they would like removed, then they need to file a DMCA Takedown Request. This is also why moderators, like myself, cannot process legal requests.

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 (If you remove some, you need to remove all. Why didn't you remove mine? being the argument). The plaintiff's won those, and when YouTube did nothing, they weren't liable at all.

If a user wants to have their content taken down, it's tricky. You need to look at the Terms of Service for Stack Exchange: (quoting Section 3)

You agree that all Subscriber Content that You contribute to the Network is perpetually and irrevocably licensed to Stack Exchange

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.

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.

They don't.

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:

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.

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

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.

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.

Not only Stack Exchange expects it, but many copyright laws in various jurisdictions require it too.

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.

If memory serves me right, the right to be attributed is revokable under United States copyright law. Therefore, attribution becomes more a courtesy, when the right is revoked. 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.

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.

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 - and are a lost cause.

We made it through!


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 Open Source Stack Exchange.

  • I've awarded the bounty because I didn't want to waste it. However, you've not explained the exact difference between a CC license and the MIT one. – ghosts_in_the_code Jan 25 '16 at 10:30
  • 1
    @ghosts_in_the_code You didn't actually say that in your question... But I'll see if I can add a section for that. I might do it in a couple days, especially since I'm going through exams right now. Oddly enough, my Law exam is tomorrow. Wish me luck! :D – Zizouz212 Jan 26 '16 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.