This is a weird question but here is why:

If I write some JavaScript application, or Perl/Python/PHP cli script, anyone can see the source code. I can even host my code on a public hosting site, like github for example. It will be the same: Anyone can see the code.

But will that make my code open source?

  • 2
    Your title does not match your question. – unapersson Apr 24 '11 at 21:26
  • This is a question of law, not of software engineering. "The arguments of lawyers and engineers pass through one another like angry ghosts." --Bohm, Gladman, Brown. – Beta Apr 24 '11 at 21:33
  • 1
    Are you in the USA? – Christo Apr 24 '11 at 21:33
  • 2
    Your profile says you're in France, and the majority of the people here are not lawyers and not citizens or residents of France. You're not going to get a good answer here. – David Thornley Apr 25 '11 at 15:06
  • 2
    @vartec: The basics are virtually the same, yes, in Bern Convention countries. The details do vary from country to country. I don't think it's possible in any such country to lose copyright by making something publicly available without further mention, but the details, including what can be done about infringement, can vary between countries. – David Thornley Apr 26 '11 at 17:41

simple answer

If you post source code, expect that others will read it. You can still claim the copyright (assuming that it is an original work produced by you). Authors of monographs (or their publishers) still retain the copyright to their material after publication.

better answer

Copyright is a legal issue. If you care about legal issues, consult a legal practitioner (a lawyer). No answer from a programmer is going to be 1/10th as good as that from a lawyer (i.e. somebody who actually knows the law).


Read this book. There are no simple answers to complex legal questions.


"See Copyright Law of the United States of America for a list of changes in US copyright law between 2004 and 2009, and you can see that none of them particularly relate"

In other words, copyright law from 2004 is just as valid as it is today.

  • 1
    2004? Seems a bit outdated. Laws change fast, just like programming technologies do. – jmort253 Apr 25 '11 at 3:01
  • 1
    @jmort253: Laws can change at any time, but the basics of copyrights and copyright licensing as it applies to open source licensing hasn't changed much since 2004. See copyright.gov/title17/92preface.html for a list of changes in US copyright law between 2004 and 2009, and you can see that none of them particularly relate. As for case law, en.wikipedia.org/wiki/Jacobsen_v._Katzer was by far the most relevant, but it mostly just confirmed how everyone hoped open source licenses would be interpreted. – btilly Apr 25 '11 at 7:00
  • 1
    @btilly - I added your reference to @bmargulies answer and upvoted. Thanks again for clarifying. – jmort253 Apr 25 '11 at 9:26
  • Matthieu's profile appears to say he's in France. – David Thornley Apr 26 '11 at 17:42

Even if you publish your sourcecode on every advertising billboard in the country, you still (by default, even without a notice) have copyright. Without this, advertisers for example wouldn't have copyright on their adverts.

However, many public places to post source code have implicit terms that you agree to by posting content there. For example, everything you publish on a Stack Exchange site (source code included) is under a Creative Commons license (I forget which one exactly) which basically gives anyone the right to copy that material. I assume anyone who copies it can't claim ownership, but there are sites which basically suck up all the stack exchange content and reproduce it with adverts added, hoping to get the Google traffic - and that's legal.

Also, although you have copyright on all original content you create by default, once you make it easy to copy that material, your rights may be practically lost anyway. After all, if half the internet is copying your material, you can't prosecute them all - and the courts probably don't take your rights very seriously if you clearly haven't.

Usual may-vary-by-country and I'm-not-a-lawyer disclaimers apply.


In general: No, posting your code to make it visible definitely does NOT make it open source IFF you include a copyright notice in the code, for example:

copyright © 2011 Mathieu

IOW, the copyright notice itself confers the copyright. If you do not include the copyright notice, well, that's a different and more difficult question.

Moral of the story: always include your copyright notice.

  • 15
    In most legal jurisdictions no copyright notice is required to retain copyright. Just because you publish does not mean you give up your rights. – bmargulies Apr 24 '11 at 21:35
  • 3
    Both portions of your iff are incorrect. – alternative Apr 24 '11 at 23:46
  • 3
    In the United States, a work is blanketed by the copyright laws of the United States, with or without an explicit copyright notice. However, most legal professionals will strongly suggest you place the copyright notification in your code as it's easier to prove your case in copyright violation scenarios. – jmort253 Apr 25 '11 at 2:59
  • Notice of copyright will help with the legal fight against an infringer, but it's not necessary for copyright protection. – Alex Feinman Apr 25 '11 at 15:58
  • 2
    @Matthieu: The answer is a reasonable-looking simple statement of facts, which is wrong on virtually every fact included. It is a perfect example of why you shouldn't believe legal advice from strangers on the Internet. Look at the other comments to see the most important mistakes. – btilly Apr 25 '11 at 16:31

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.