I have just recently completed my first open source project and while it is mostly a tool I still want to release it as open source considering it is C# so if someone wanted to they could decompile it. Also, I'm not looking to sell it.

I was researching licensing but the wording is a bit over my head. Mostly I'm just looking for a license that recognizes me as the creator and does not allow anyone else to put their name on it and "steal it." I'm most likely going to use either google code or sourcefourge to host the project and ideally I could have a donation button. I'm not sure if or which software licenses would prevent that sort of thing?

Also, I'm not really sure how licenses and copyrights "work." Do I just choose a license and paste it at the top of every source file? Should I include my name as well? Do I also put the licenses in the project's root directory? How does one obtain a copyright? It seems like most people just stick it on their stuff. Is there an actual process to obtaining one?

As for software licenses I've looked at so far, it seems like Apache 2.0 or MIT/BSD is what I'm looking for but I'm not exactly sure. Basically I just don't want anyone to steal my program and put their name on it. Other than that I'm fine with people looking at the source code, modifying it, or taking pieces from it, as long as they credit me.

  • How do you wish to be credited, are you after an advertisement clause? This helps determine which BSD license is more suitable.
    – Steve-o
    Commented Aug 28, 2011 at 12:32

6 Answers 6


The Berne Copyright Convention specifies that copyright descends on a creative work the instant it is created. You don't need to do anything special to copyright your work. That wasn't always the case - back in the day, one needed to register copyrights, and renew them periodically, but that's not the case anymore.

You SHOULD place a copyright notice in each of your source files, as well as the About or Credits box of your binary. Note that you will still own the copyright of your work even if you don't include a copyright notice, but having it there prevents trouble in the event of a dispute.

The various open source licenses have different requirements for applying them to your code. The BSD and MIT licenses must be pasted verbatim into each source file.

The GPL is generally provided separately in a file called COPYING or COPYING.txt, with a notice in each file stating that it is licensed under the GPL, and that the license itself is in the file COPYING or COPYING.txt. Detailed instructions for applying the GPL are found at the end of the GPL license text itself. If you use the GPL, follow its instructions, not what I posted here.

  • You should probably add that you can add author information into the body of the license text, and that most of these licenses state that they may only be distributed if the license text remains in the code/app. This essentially allows you to be attributed wherever your code is used, because your name will always be in the license.
    – Mark H
    Commented Aug 22, 2011 at 17:25

Eric S. Raymond's "Art Of Unix Programming" has an entire chapter devoted to the various open source licenses; this part is a nice overview that should give you enough information to make an educated choice.

Personally, I prefer BSD or MIT licenses; they're about as liberal as you can be, and don't suffer from being viral like GPL.

  • An author might want to express copyleft, so it's not clear if a reciprocal license does suffer from something -or- adds something. It just depends what the original author wants to express.
    – hakre
    Commented Aug 28, 2011 at 12:02
  • @hakre: Viral licenses are more restrictive than non-viral ones; they do not add any 'freedom', they merely restrict usage - which is exactly the thing they add.
    – tdammers
    Commented Aug 28, 2011 at 15:31
  • Well that's easy to counter-argue: BSD/MIT licenses allow to put more restrictions on users. Actually it's intended to allow that. Depends on the author whether he needs that or not. These days it's quite modern to think about Freedom only for one's own, and that type of Freedom always includes to not care about anybodies else freedoms. Really a pitty.
    – hakre
    Commented Aug 28, 2011 at 16:28
  • @hakre: If I publish something under MIT, you are free to re-publish under a different license, but my completely free version will still be available; your attempt at limiting the user's rights is not going to be effective as long as my fully free version is out in the wild. My opinion about the GPL, in short, is that you cannot force freedom upon others.
    – tdammers
    Commented Aug 28, 2011 at 21:55
  • Your MIT package will be only limited to itself, not the derivates by others (by design), I think that's a difference worth to point out. It maybe is as well a cultural thing what one expects to share and getting shared. Nobody is forced by the GPL to anything anyway, so not even to freedom. Always respect the authors decision, she might have some other opinion like me and you.
    – hakre
    Commented Aug 28, 2011 at 22:40

The relationship between copyrights and licenses is often misunderstood, and knowing the difference can be helpful in understanding how the process of choosing a license may work.

The copyright holder of a piece of code, or any work that is created for that matter, is the only person or entity with the legal authority to license said work. It is also completely within the copyright holder's prerogative to license and re-license a piece of work many times over according to their needs. For example, I could give one person permission via the license to use the software but not copy it, and another person permission to do the opposite. Not a likely scenario, but still true nonetheless.

While there are no hard and fast rules governing what license generally is best for a given piece of software, here are the questions I like to ask myself about my code prior to licensing it:

  1. What is the risk associated with a competitor taking code you release and using it to compete against you?

    If the answer is high, then the conservative thing to do would be to use the GPL. The GPL would allow your competitor to take your code and compete against you, but he couldn't do so without also being required to share with you anything and everything they have done in the process. This would make it difficult therefore for either of you to compete primarily on a feature-by-feature basis.

  2. How important is it that you get people to integrate and use your code inside their own systems?

    If you are authoring a library for example, it is in everyone's best interest, even your own, for people to consolidate their efforts around a single code base. The eliminates duplicate effort and makes the library hopefully all the more useful and relevant in the developer community. The GPL is rarely a good choice for library components because of its viral nature. Link to or use a GPL library in your code, and your entire code base is supposed to also be licensed under the GPL. Most companies don't particularly care for this thereby decreasing the likelihood that a developer will begin using and contributing back to your library.

    In this case, it is more advantageous to use a more copy left license, like Artistic, BSD or MIT. Or if you are already a big GPL fan, then consider using the LGPL, specifically designed for using with libraries.

  3. Is there a convention that already exists as it relates to the language or framework you are using?

    For example, jQuery plugins are almost always licensed under the MIT license, and Perl modules are almost always licensed "under the same terms as Perl itself," or in other words the Artistic license.

    If a strong convention exists, follow suit. Don't be that person who bucks a popular trend just because you think you know better. Granted, you might know better, but I personally feel it is better to respects the norms and traditions of each community you participate in rather than trying to assert your own personal worldview vis-a-vis licenses.

My personal bias is for Artistic, BSD or MIT. The reason being largely has to do with maintaining my own personal rights regarding the license my code is distributed under.

Remember when I mentioned at the beginning that it is the copyright holder's exclusive legal authority to license a work? Well in the world of open source, the probability of having multiple copyright holders is high. Remember that feature you integrated from John Smith into your code? Doing so made John Smith a joint holder of your code's copyright. Which means, that if you ever wanted to relicense the code for some reason, then you would need to get John Smith's permission before doing so. The alternative is for John Smith a "contribution agreement" that would assign to you the copyright to his code.

As you can imagine, that kind of bureaucracy can be very annoying to people and might actually discourage their participation. Granted, choosing not to have all contributors assign the copyright of their GPLed contribution to you does not spell certain doom for your GPL project (look at WordPress for example, not to mention Linux itself). It really just all depends upon what your priorities are vis-a-vis protecting your code and your rights as it relates to that code.

The MIT, Artistic and BSD licenses avoid much of this bureaucracy, not by allowing you to re-designate the license without your contibutors' permission, but by preserving your right to redistribute their work along side any other code under any other license. It preserves their right to build proprietary, for profit components on top of your code base, allowing for a commercial ecosystem to evolve on your codebase - which is often very advantageous and the sign of a healthy project.

Bottom line, there is no right or wrong answer. And provided that you retain the sole copyright of the codebase, you are free to change the license whenever it suits you.


LICENSE.txt << "Please credit me if you reuse, don't sell it under your own name, don't pretend you're me".

Simple. Unless it's a fairly heavy project I wouldn't worry too much about licensing terms, don't get me wrong a lot of the licenses are really useful (BSD & MIT ones are great) but for most projects a simple license files outlining peoples rights is fine. You own the copyright to the product, it's your direct work, a license is just so people know what they can and can't do with it and as with many things in programming, simplicity is king.


If you don't know what license to use, go for a very restrictive one (GNU AGPL v. 3 is the most restrictive I know of). You can always rerelease under a less restrictive license later, but you can't go the other way.


It's common in source-code to place a so called license-plate on top of each file. Those tell typically:

  1. Of which program that file is part of.
  2. The copyright holder and date (and how to contact, e.g. email).
  3. The license terms, either abbreviated (and referenced) or in full.

If you open your source-code repository to the public, this (per-file) method ensures that your copyright and licensing terms are visible before someone modifying the file.

It's normally best to choose an established license so actually users reading the code understand the licensing terms. But the choice of the license is fore-most entirely your business.

Some source-code repositories do only allow some of the known licenses however, namely any OSI approved license for google project hosting.

You might want to make use of copyleft for your code. Copyleft ensures that the freedom you give with your software will be preserved for future users because they are reciprocal, users of your code need to distribute the code under the same license.

Copyleft licenses for code are the GNU GPL or LGPL. The GPL is most famously used by software authors across the globe to preserve software freedom. But that's your decision, the GNU website has more information about licenses and licensing that might be helpful.

Non-reciprocal licenses often do not require to pass on changes under the same license / in source-code form. Examples of those are Apache 2.0 or BSD Two Clause. Some users prefer these licenses because they want that their code can be incorporated into non-free works.

So it's basically your decision under which terms you want to publish your code and how much control you want to give your users.

A personal note:

For projects I don't know where they head to, I often choose the GNU GPL because this will keep things open for the future publicly. And it makes it harder for others to snap the project and build something on top of it keeping me out. That's especially true if your code is not that advanced that users actually need you to modify it because of your expertise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.