Most people have at least heard of open source software by now—and even have a fairly good idea of what it is. Its own luminaries argue incessantly about what to call it—with camps arguing for everything from Free to Libre to Open Source and every possible combination of the above—but the one thing every expert agrees on is that it's not open source (or whatever) if it doesn't have a clearly attributed license.
You can't just publicly dump a bunch of source code without a license and say "whatever—it's there, anybody can get it." Due to the way copyright law works in most of the world, freely available code without an explicitly declared license is copyright by the author, all rights reserved. This means it's just plain unsafe to use unlicensed code, published or not—there's nothing stopping the author from coming after you and suing for royalties if you start using it.
The only way to actually make your code open source and freely available is to attach a license to it. Preferably, you want a comment with the name and version of a well-known license in the header of every file and a full copy of the license available in the root folder of your project, named LICENSE
or LICENSE.TXT
. This, of course, raises the question of which license to use—and why?
There are a few general types of licenses available, and we'll cover each in its own section, along with one or more prominent examples of this license type.
Default licensing—proprietary, all rights reserved
In most jurisdictions, any code or content is automatically copyrighted by the author, with all rights reserved, unless otherwise stated. While it's good form to declare the author and the copyright date in the header of any code or document, failing to do so doesn't mean the author's rights are void.