During my recent WMGK parser post, I published the code to github, and that required picking a license. This lead to much more research than would strictly be necessary for something no one will ever see or use ever. I want to now spread that knowledge to all of you.
In uncharacteristic fashion, I will give a quick summary of the licenses here, as opposed to forcing you to read through all my drunken ramblings (although we are already three paragraphs in):
- If you provide no explict license on your code it will default to the most restrictive one possible. That is, no one will be able to redistribute your code in any way, unless they get your expressed written consent first.
- If you want people to be able to do anything they want with your code, and not even have to attribute you, then use Unlicense, which is effectively the public domain, with a disclaimer that you can't be sued if the code burns down their house. This is good for short code snippets that aren't worth a complex license.
- If you want people to be able to do anything they want with your code, as long as they attribute you, then you can use the MIT or BSD licenses. The MIT license seems to be somewhat more popular, and is probably simpler to read. The BSD license has a 2 clause version that is basically the same as MIT, and a 3 clause version that also prohibits the use of your organizations names to endorse the derivative works. There is also the Apache license which prevents people from using software patents to sue, it is probably better than pure MIT for longer programs.
- If you want people to be able to release programs based on your program, as long as they also release the source code to those derivative works, then use the GPL. There are two versions in common use, v2 and v3. The main update was an attempt to deal with software being released on physical devices, as well as some software patent stuff.
If you want to review software licenses in greater depth, and I know you do, here are two good sites with simple color coded overviews.