Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I originally thought of creative commons when while reading a book about wordpress (professional wordpress), I learned that I should also specify that the product is provided

... WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

and they recommend GNU GPL. How do I write a license or select 1?

btw, what does MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE mean actually? Isn't without warranty enough?

share|improve this question
5  
It's better if you don't try to write a new license. Hire a Copyright attorney if you can't find an existing one you can use. Also realize that most licenses are written under US laws, where a little more specificity is often required in disclaimers. –  greyfade Sep 11 '10 at 15:25
    
Re. without warranty - generally in law if in any doubt you make it clear. I'd imagine that this in response to a specific historic case where the straight disclaimer wasn't sufficient. –  Jon Hopkins Jan 24 '11 at 14:26
add comment

6 Answers

up vote 7 down vote accepted

For small bits of code, I generally release them under the X11 licence. The problem with the GPL is that it's far too complicated for code that you don't really care enough about to protect. If you really don't want people using your code in commercial products, you would need to monitor for infringement and fight it out in court, which isn't really worth the time or the effort for small, free, open-source projects.

Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

EDIT: If the body of code is more substantial, and you feel that you've invested enough time in it that you would be willing to protect it, by all means use the GPL to protect it.

share|improve this answer
    
Although if you release code under the GPL, I suspect the commercial companies would be much more unwilling to steal it based on that its GPL'd. –  alternative Sep 11 '10 at 13:51
    
I'm not convinced that it makes a big difference. The GPL is so complicated, that a lot of companies probably infringe all the time, secure in the knowledge that the "little guy" can never come after them. I reckon that for every infringement that the FSF catches, there are probably tons that are never caught. –  Chinmay Kanchi Sep 11 '10 at 15:01
4  
I agree. If you're releasing useful tools and don't expect monetary gain MIT/X11 is the way to go. If you want to waste your life, grow a substantial neck beard, evangelize about computer based religions, and spend your time creating honeypot traps for the evil empires go with GPL. GPL also has the added effect of making other open source developers paranoid about working with your code. –  Evan Plaice Sep 12 '10 at 1:00
1  
@jiewmeng If your project uses code released under GPL code, your project must also be released under GPL or a more liberal license. IE, it's free to write code but you're restricted on the licenses you can use. IE, GPL begets GPL. Therefore GPL isn't really free because it restricts your usage. Which is good if you are Richard Stallman and your goal in life is saving your fellow coders in the MIT AI labs from those pesky high paying prestigious jobs in large corporations. GPL is based on politics and "sticking it to the man." Most OS devs don't care about that cause. –  Evan Plaice Sep 15 '10 at 10:43
1  
@Chinmay: So you provide them with a copy of the license and the source, and everything's OK. This is incompatible with some business models, but it really was intended to be, and much of the reputation is from people trying to evade it. If you people to use your code in their own proprietary products, use BSD/MIT/Boost/whatever. If you want to make sure derivatives of your code are just as free, use the GPL. –  David Thornley Nov 24 '10 at 20:29
show 6 more comments

Personally your best bet to get a true answer to this question would be to talk with a Legal Professional as they are going to know the specifics.

However, what I remember when i was talking with my lawyer about setting up our code license agreements is that the clause you are talking about basically protects you from cases where you say "this code does X, Y, Z", that is an implied warranty on "fitness for a particular purpose", that clause prevents you have having any issues if it doesn't do X, Y, and Z.

share|improve this answer
    
thanks for clearing things up in the 2nd paragraph –  Jiew Meng Sep 13 '10 at 10:52
add comment

WTFPL - Do What The F*** You Want To Public License

       DO WHAT THE F*** YOU WANT TO PUBLIC LICENSE 
                Version 2, December 2004 

Copyright (C) 2004 Sam Hocevar

Everyone is permitted to copy and distribute verbatim or modified copies of this license document,
and changing it is allowed as long as the name is changed.

       DO WHAT THE F*** YOU WANT TO PUBLIC LICENSE 
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
  1. You just DO WHAT THE F*** YOU WANT TO.
share|improve this answer
1  
I've never really liked that license. There needs to be a certain amount of control of your own code. There is nothing preventing some commercial company taking your code and making a commercial app out of it? –  TheLQ Sep 11 '10 at 16:58
    
@TheLQ: This applies equally to the BSD and MIT/X11 licences, the WTFPL only makes the point more strongly. I don't really like licences that either specifically forbid commercial use or are viral (like the GPL). If I wanted to licence code under the GPL or a non-commercial-only licence, I would at least dual-licence it so that people could buy the right to use the software in a commercial product. –  Chinmay Kanchi Sep 11 '10 at 18:15
    
lol, i saw this b4. but this doesn't protect me from warranty thingy –  Jiew Meng Sep 13 '10 at 10:52
add comment

How are you giving these materials to people?

If you're licensing your application to people commercially, you're going down the wrong path - you need to see a lawyer to prepare a software license agreement. In these situations the customer paying for software licenses get statutory warranties, so clauses like that aren't enforceable.

If you're releasing source code or other materials for others to re-use, your original post is absolutely correct - you MUST include a warranty waiver, otherwise someone might turn around and say "you released this code claiming it did X, Y and Z - but it doesn't and I'm going to sue you", even if you didn't get paid for it.

In either case, you need to sit down and figure out what you want people to be able to do with the product.

In the latter case where you're releasing things to the community under an Open Source license, find a good OSI-approved license that aligns with your wishes: http://opensource.org/licenses/category

But as greyfade mentions, don't even think about writing your own license - it's not worth the risk.

share|improve this answer
add comment

Have you considered the BSD license(s)? The simplest (relatively) form of it, known as "Simplified BSD License" or "FreeBSD License", is particularly fit for disclaiming any warranties and/or liabilities. It does not prevent commercialization or use of your code in commercial and/or proprietary software, but it makes sure you still are the copyright holder.

You can read it here. Depending on the laws of your country, it may be more suitable to your purposes than other, more complicated, licenses.

share|improve this answer
add comment

How do I write a license or select one?

Read over a list of Free Software licenses and pick one that makes sense for your aims.

Don't write a license unless you absolutely cannot find one that suits you. If you do write a license, then take grayfade's advice and ask for legal assistance from a solicitor/attorney/whatever.

I originally thought of creative commons when while reading a book about wordpress

There are a plethora of Creative Commons licenses. Be specific about which one you're thinking of. Some CC licenses are sometimes used for code, but that's not what they were designed for. It's probably best not to use CC licenses for code.

Free Software licenses range from the extremely permissive (WTFPL) to the strongly copyleft (GNU AGPL). Somewhere in that range will be one that suits you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.