24

What will the licence of the code be? If this is jurisdiction / country based what is relevant in this case? The place of origin of the poster, the host where the code lives, or the one who tries to view and reuse the unlicensed code?

  • 1
    Regarding the relevant jurisdiction: This doesn't matter much in practice because almost the whole world has signed the Berne convention which makes copyright laws very similar in different countries. – Philipp Jun 24 '15 at 9:11
22

In that case copyright applies. In most countries, certainly in Europe, this is an automatic process: you publish something, and even without you adding the copyright symbol, you get the copyright.

Software is no different than literature. As a developer, you are considered being the author of your work. When you publish, you are the copyright owner. Copyright law allows an author to prohibit others from reproducing, adapting, or distributing copies of the author's work. In spite of the fact that people can read your source code, your code isn't "free, open source software"!

In short: if you don't add any license information, your code is protected, but make sure you add your name and document when you wrote/published it.

Extra comment:

I am not a lawyer, but I have faced a situation where a code contribution was done publicly and anonymously. I did a huge effort to track down the author (and documented my search), but I couldn't find the contributor. The lawyer told me that, in that case, it was safe to assume that the code was in the public domain, as there was nobody to claim ownership (even after me asking the author to make himself public in a comment section). It's always safe to consult a lawyer in cases like this. And document! document! document!

Update based on a comment:

So it doesn't matter on what site it's published?

Yes, it does. When you register on a site, when you publish something on a site, you agree with the terms of agreement of that site.

Some of these terms may not be legal in the country where you reside, in which case the terms are void. For instance: a site can claim that it owns the IP of every picture you upload. In some European countries, companies such as Facebook risk litigation if they do so, because that term is considered illegal.

However, you should take into account that the terms and agreements can be valid, because the internet doesn't have any borders and you can't assume that people in other countries know what the law says in the country you live in.

There was another question that explains what happens if you post code on StackOverflow: Can I copy-paste a snippet from StackOverflow into my GNU-GPL project?

When you post code or an answer on StackOverflow, every one is free to use it, provided that the rules are obeyed. For instance: I wrote a book The Best iText Questions on StackOverflow which bundles questions and answers that were posted on StackOverflow. I can do so, because I allow people to redistribute the content and I give credit to the people who wrote the questions and answers (actually, I am the author of most of the answers).

This is taken from the Terms of Service:

In the event that You post or otherwise use Subscriber Content outside of the Network or Services, with the exception of content entirely created by You, You agree that You will follow the attribution rules of the Creative Commons Attribution Share Alike license as follows:

  1. You will ensure that any such use of Subscriber Content visually displays or otherwise indicates the source of the Subscriber Content as coming from the Stack Exchange Network. This requirement is satisfied with a discreet text blurb, or some other unobtrusive but clear visual indication.
  2. You will ensure that any such Internet use of Subscriber Content includes a hyperlink directly to the original question on the source site on the Network (e.g., https://stackoverflow.com/questions/12345)
  3. You will ensure that any such use of Subscriber Content visually display or otherwise clearly indicate the author names for every question and answer so used.
  4. You will ensure that any such Internet use of Subscriber Content Hyperlink each author name directly back to his or her user profile page on the source site on the Network (e.g., https://stackoverflow.com/users/12345/username), directly to the Stack Exchange domain, in standard HTML (i.e. not through a Tinyurl or other such indirect hyperlink, form of obfuscation or redirection), without any “nofollow” command or any other such means of avoiding detection by search engines, and visible even with JavaScript disabled.

If you look at my book, you'll see that there's a link to the full question on StackOverflow under every question, as well as a link to the profile of the person who posted the question. I didn't provide such a link for the answers in case I am the author of the answer, because I have the choice to do with my own content what I want. However, I can't prevent that a third party takes my answer and copies it (that wouldn't be fair, but it has happened before and there's very little one can do about it).

  • So it doesn't matter on what site it's published? I'd guess, that if no copyright reference is added to the code, the license of the site it was published on applies. – Alex Jun 24 '15 at 9:26
  • I'll update my answer. – Bruno Lowagie Jun 24 '15 at 9:31
  • If you can't find the author, you have an orphan work and could still get sued. Searching for the author and documenting your effort might help once you're in court, but it's not a get-out-of-jail-free card. – Kevin Sep 22 '15 at 18:59
7

If you share code without any license declaration, the general assumption is you apply normal copyrights. That means copying it, modifying it or anything else might be risky. A court may judge, that the way you shared it implied some usage, but to depend on that is highly risky.

And code without clear license declaration isn't open source.

4

Your code will be unlicensed and no one would be allowed to use it. However, by posting it on services like GitHub, you are granting them [non-exclusive, permanent, irrevocable, unlimited] rights to publish your content in connection with the service. Unless the terms of the service requires otherwise and you accepted, you will retain copyright over the content and reserve all other rights.

  • 1
    Judging by the GitHub's terms of service, you're also allowing people to fork your code to their own profiles as well (as long as they're not creating derivative works from it of course). – r3bl Jun 25 '15 at 3:58
  • @r3bl Forking without creating derivative works is effectively a form of publishing. – Dmitry Grigoryev Oct 5 '15 at 10:01

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.