By putting code on SE (by posting it in a question or answer or another form of publicly posting it on the site) is the code given some sort of license automatically if one is not declared by the owner? So what I mean is for instance if person A wrote their own program and posted it as an answer to person B, if person A does not declare a license for the code, and then person B steals it and publishes it as if they were the owner giving no credit to person A, could person B get into any trouble if person A found out and wasn't happy?
2 Answers
All post content is available under CC-BY-SA.
But I disagree slightly with the spirit of muru's post. You can add additional licenses to your posts.
If a post declares its content to be available under an additional license, that is just dual-licensing. The reader can choose between the stated on and CC-BY-SA. This is just the same concept as if the writer of the post posted the content elsewhere (and declared a license).
However, you cannot override or subvert the CC-BY-SA license. It will always be an option for somebody reading a post here. If you post, you're making that content available under CC-BY-SA. Even if you add:
Ⓒ Oli 2015 All rights reserved, no copying my stuff!
... they can still copy it under the terms of CC-BY-SA.
This is why it is critical you own the content you post.
If you take code from somebody else that is GPL/MIT/etc —even if that declaration remains— you are adding another license with restrictive and therefore potentially incompatible clauses.
That may break the conditions of the license you had. Most licenses have an automatic termination clause meaning your post would have been made without license. It'd be copyright infringement.
If a copyright owner notices you using their content without license, they can sue you (in the US: for statutory damages, lost earnings and if they can prove you did it on purpose, a ×3 multiplier).
Ask Ubuntu is a US-based site but if somebody wants to find you, they could sue you in your country. If they can convince somebody that it's criminal infringement, they can attempt to extradite you (even for copyright) and if you have an estate or holdings abroad, they can sue that.
But fair use exists.
You can use limited amounts of copyright content and this bypasses the original license. What and how much you can use aren't black and white concepts though. It's also not the same around the world.
What holds up will essentially come down to common sense but again, if somebody wants to sue you for using their stuff, they're going to sue you.
-
But if someone posts a command such as
cd
here they don't have to give credit to its creator and where they originally read it do they? I have never seen someone giving credit for all the commands they use in their answer... And does everything posted here go under that license? So what if I posted a command here before it was posted anywhere else on the internet, could SE sue another site for posting that command even though it's just a command and they didn't even know if had first been posted here? If so, this is ridiculous, the world has gone mad and it's time for me to go to Mars!– user364819Commented Dec 8, 2015 at 17:20 -
@ParanoidPanda a command like
cd
is different from the code ofcd
(if that would be available). We use languages and libraries all the time, but don't post the code behind it as our own, only what we do with it. Commented Dec 8, 2015 at 17:24 -
6Remember that fair use is a thing that lets you sidestep copyright. Using a command, small excerpts and snippets can usually be argued as being used fairly without needing a license. Though this is not black and white, it's open to interpretation and legal argument... As with all laws, civil and criminal, in all countries with proper legal systems. If somebody wants to sue you for anything they can. Whether their complaint is upheld is for the system to decide.– Oli ModCommented Dec 8, 2015 at 17:26
-
@JacobVlijm: When does a command become code? What if I wrote a bash script here with 2 lines, and it was something really common that one would write and anybody could do and probably would do and would have done without reading anything here? When I say that, I mean literally like a few commands, like the first line is
cd ~
, and the second ismkdir panda
, would that be considered code which would then be put under the SE license? Or what about if people had just so happened to use it elsewhere on the web before me, should I find the first one to write it up there and then credit them?– user364819Commented Dec 8, 2015 at 17:36 -
1@ParanoidPanda I think there is a line, drawn by common sense, where a series of commands becomes code that could/should be licensed somehow. Although you can hardly define it, in practice there will rarely be confusion on it I believe. Commented Dec 8, 2015 at 17:49
-
@JacobVlijm: The law doesn't care about common sense!– user364819Commented Dec 8, 2015 at 17:55
-
@ParanoidPanda I happen to disagree, in general, it is all about common sense, reasonability and responsibility. Commented Dec 8, 2015 at 17:58
-
-
@ParanoidPanda Law doesn't just care about common sense if something isn't defined explicitly, it plainly relies on it, and I'm sure that's not different in the UK.– kosCommented Dec 8, 2015 at 18:19
-
@kos: Ah, but there's another legal thing, it's not about which country I'm in, it's about which country the SE servers are in.– user364819Commented Dec 8, 2015 at 18:28
-
1@ParanoidPanda To my knowledge you live in the UK, I just thought you could relate to the concept, but I don't think we're getting anywhere with that. Just re-read Oli's and Jacob Vlijm's comments and try to think about the whole thing again in a little more reasonable way.– kosCommented Dec 8, 2015 at 18:42
-
We're straying away from the core licensing issue and into "how law works". We've told you the basics. If you need to know more, a lawyer, legal forum or a formal law education are probably your best bet.– Oli ModCommented Dec 8, 2015 at 21:12
-
@kos: I'm reasonable, it's the law and SE who are not!– user364819Commented Dec 9, 2015 at 12:02
All content posted to Stack Exchange, including code, is licensed CC-BY-SA. If you "declare" another license on your post, and that license is incompatible with CC-BY-SA, you're in violation of Stack Exchange's terms of service. CC is not a good license for code, but it is what it is.
... then person B steals it and publishes it as if they were the owner giving no credit to person A, could person B get into any trouble if person A found out and wasn't happy?
Emphasis mine. The license requires attribution. If B gave credit, there isn't any problem. Not giving credit is a violation of the license, and illegal (assuming you can prove it).
Stack Exchange is planning to licence any new code contributions using the MIT license.
-
But if someone posts a command such as
cd
here they don't have to give credit to its creator and where they originally read it do they? I have never seen someone giving credit for all the commands they use in their answer... And does everything posted here go under that license? So what if I posted a command here before it was posted anywhere else on the internet, could SE sue another site for posting that command even though it's just a command and they didn't even know if had first been posted here? If so, this is ridiculous, the world has gone mad and it's time for me to go to Mars!– user364819Commented Dec 8, 2015 at 17:20 -
I didn't say that, but if everything here is under that license and I have to give a credit for everything, then clearly the command (not the code for it, but the command, the word
cd
) is also something that I have to give credit for to wherever I first read it and the author of that command. No? Because you said that everything I say here is owned by SE, and I have to give credit for everything that I say that I read somewhere else and is not my own. So should I know give you every dictionary where I read all the words I am writing now?– user364819Commented Dec 8, 2015 at 17:32 -
@ParanoidPanda At no point did I say you have to give credit for everything you write.– muruCommented Dec 8, 2015 at 17:41
-
Look, I don't know, but I spoke to fossfreedom in chat and all I have said is what he made me think...– user364819Commented Dec 8, 2015 at 17:43
-
Fine, I acknowledge that I am a bot controlled by fossfreedom and my code has been partly stolen and he does not own full rights to it all so SE should sue him.– user364819Commented Dec 8, 2015 at 17:52
-
As it has worried a few people, I thought I was just add that the above was a joke... :D– user364819Commented Dec 8, 2015 at 18:29
-
@ParanoidPanda Fwiw, unless the code was stolen from SE, SE does not have standing to sue him.– muruCommented Dec 8, 2015 at 20:36
-
He stole it partly from SE's secret AI Panda development program when he hacked into their bamboo system.– user364819Commented Dec 9, 2015 at 12:03