views:

112

answers:

4

Lets say person X posts some code on a public forum (totally public, even to guests), and they post it without an explicit 'license'.

Person Y then comes along and decides to use that code in a proprietary application. Is that legal? What about using the code in an open source application?

Is it only legal if they give attribution? Is it legal either way? Is it illegal either way?

Is there anywhere I can actually find out the rules surrounding this VERY common situation? I don't have a particular example to give, I'm just curious about it in general.

Thanks.

+1  A: 

First of all, I am not a lawyer, and you should do what you believe is morally right.

Citing your sources only prevents plagiarism, it doesn't prevent copyright violation.

The legality depends on jurisdiction, but I know that in the US copyright is automatic, so without an explicit license from them, you may not distribute their work. Whether you can use their work (e.g. at home or only on your PC and never publish the results) is a different question, and I'm not sure of that answer.

You will need to contact a lawyer to get legal advice and "find out the rules".

However, if there happens to be a particular piece of code someone has posted, you can always talk to them directly. You can also search for the same code elsewhere under a license you can use, which makes that decision more clear-cut. And not every piece of code is created equal; for example, I cannot say that i = 42 is now under my copyright and you may never use it.

I also believe you should be explicit and liberal with license on a forum such as SO, see my profile for an example. In particular, I've tried to make the license to any code as liberal as possible; however, this method is still very informal and not well-tested in court, so rather ambiguous still (like other similar areas, such as EULAs).

Roger Pate
+1  A: 

IANAL. (Probably true of most answerers here.)

On this particular forum (see the footer): "user contributed content licensed under cc-wiki with attribution required". So it would be permissible to copy into some open-source codebases (although CC-BY-SA isn't GPL-compatible) but certainly not legal to copy into proprietary code.

In general, unless otherwise specified, United States law says that all rights remain with the author unless otherwise specified, so attribution or not, it is not legal to copy.

ephemient
+2  A: 

Person Y then comes along and decides to use that code in a proprietary application. Is that legal? What about using the code in an open source application? Is it only legal if they give attribution? Is it legal either way? Is it illegal either way?

You seem to be suggesting that forums are akin to a sort of public commons -- if somebody posts something there, then anyone can use it. Alas, that's not really the case. The venue that content is posted to often governs how it can subsequently be used. Typically, by posting in a forum, you've implicitly agreed to the forum's Terms of Service.

For example, when you post a note on Facebook, you've implicitly given Facebook (via their Terms of Service) the right to reproduce and republish your submission ad infinitum. Theoretically, Facebook could make an anthology of short stories taken from its users and sell this for money.

John Feminella
+5  A: 

According to the Berne Convention, an international treaty signed by most countries in the world, copyright applies to works automatically, with no notice needing to be given.

Under the Convention, copyrights for creative works are automatically in force upon their creation without being asserted or declared. An author need not "register" or "apply for" a copyright in countries adhering to the Convention. As soon as a work is "fixed", that is, written or recorded on some physical medium, its author is automatically entitled to all copyrights in the work and to any derivative works, unless and until the author explicitly disclaims them or until the copyright expires.

This means that no license to use the code is automatically granted by posting it in public, and copying and using that code in another work is illegal unless given explicit permission.

Of course, this is tempered by the notion of fair use, and whether the work was sufficiently creative to fall under copyright law. In general, something that is under 10 lines long, or is a demonstration of the only way to do something in a particular language that is widely known, will generally either not be copyrightable, or usage will most likely be permitted under the fair use doctrine. The problem with fair use is that you generally can't tell for sure if it's fair use until it's been taken to court, at which point you have already had to pay for lawyers, spend time in court, and so on. You will have to use your judgement to determine if using something constitutes "fair use"; and the 10 lines I mentioned is only a very rough guideline.

In sum, if there's something that's very short, not particularly creative, and the only way (or most obvious way) to do something in a given system, you can probably use it. If it's longer than 10 lines, or something creative like a code golf solution, or the DeCSS code (which may be under 10 lines but a lot of creativity and work went into crafting it, and it's generally not an obvious solution), then you should generally consider it to be copyrighted with all rights reserved and get permission before doing anything with it.

(note: I am not a lawyer, and this post does not constitute legal advice. For a better answer, I would recommend talking to a lawyer with experience in copyright.)

Brian Campbell
Note: in Germany, and I believe in the entire EU as well, computer programs are exempt from the creativity requirement. So, while this very comment is probably *not* copyrighted (because it isn't creative enough), this piece actually *is*: `print 'Hello, World.'`
Jörg W Mittag
@Jörg I would find it hard to believe that you could actually establish a copyright claim based on that, even in Germany. But that's part of why I said that fair use requires judgement; there's no clear dividing line between "Hello, world" and something short but copyrightable.
Brian Campbell