views:

125

answers:

6

I made a somewhat large PHP application to handle automated queries for any site (plugged into their existing site structure), it was more of a "challenge" with a reward in the end open to anyone. I put quite a few days into it, I don't want to be mean but I see all the time things like this copyrighted by people.

What would be any benefits, should I place a copyright message in the source, just to claim that I wrote it (be proud of it)? Or should I release it to public domain? I just wanted to get input before I went further.

+8  A: 

Were I you, I'd choose a liberal licence that allows anyone to use your code (even under a different licence), but requires an attribution. I usually use BSD for that. There's also MIT, which is similar (and compatible). You could write your own too.

mingos
This is mostly a good idea. Use a BSD or MIT license. But: don't write your own license!
Paul Schreiber
Depends on what you need. I wrote my own licence for one app, as I wanted it to be freeware, but closed source. I found no ready-made licence for that and had to use my brains a bit to create my own. For most uses, and especially in the case of open source software, this is indeed completely unnecessary. There are plenty good licences to choose from.
mingos
Another one about own licences: I know a few people who simply write something like "If you use this code, it would rule if you mentioned me somehow as its author". That's hand-made, and while technically not a licnce agreement, it works out OK for some people.
mingos
I accept this answer because I will use the BSD license, it's summed up nicely and has the whole "I do not claim responsibility for damages" clause which I'd rather like to use on these things. Many thanks.
John
A: 

It depends on

  1. How much importance you give to your effort
  2. Importance to your time (be it a few hours)
  3. Your relationship with this friend.

If I were you, I would ask my friend (or others) to put a friendly/courtesy "built-by" or "thank you" link somewhere. You can say that this will give you satisfaction and also some press (maybe). They can still use your code and you keep it as opensource if you want.

AJ
+1  A: 

I'd be inclined to put (c) Me in the header; it can't hurt. Your friend will presumably buy you a beer or two, which seems a reasonable fee for further copies.

Brian Hooper
+6  A: 

First point: by the simple act of writing the code, you've already copyrighted it -- at least assuming the Berne Convention applies where you live, which it does (at least in theory) throughout most of the world.

Second, I think the question of placing license requirements is best answered with a question back to you: if you placed requirements (e.g., attribution) and found them being violated, what, if anything would you be do to enforce those requirements?

  1. Do nothing but be pissed off, and have a crappy day because some people are such jerks?
  2. Write them an email if an address happened to be handy, but otherwise, 1).
  3. Really work to find an email...
  4. If they ignore your email, send a paper letter?
  5. If they ignore your letter, send another by certified mail?
  6. If they ignore that, pay a lawyer to send a letter?
  7. If they ignore the letter from your lawyer, actually go to court?

At least IMO, there are really only two choices that make real sense. If it's sufficiently valuable to you that you'd actually and honestly put in all the time, money and effort to go to court over a copyright [Edit: or license] violation, then you should register your copyright (e.g., if you're in the US, at the Electronic Copyright office), and go from there [edit: i.e., imposing and enforcing whatever license restrictions you see fit.]

If you're not willing to defend your licensing requirements in court, then you might as well not put them there in the first place. Ask nicely for attribution, and chances are that most people will give it (in fact, quite a few will whether you ask for it or not). If you run into the inevitable jerk who ignores what you've asked for, don't let it ruin your day though.

Jerry Coffin
+1 well summed up
nikic
Jerry Coffin: I learned alot from this post, I thank you. This is helpful for guidance on further projects and how to handle them. I really would like to learn more about laws, a good time to start!
John
+2  A: 

Of course you should copyright, and publish it yourself first so that there's never any question of ownership. Don't be ashamed of valuing your good work. Leave licenses off until you decide what you what to do with it. The copyright gives you a monopoly, and you can always choose a less restrictive license at a later date. Congratulations on finishing a big project!

Tom Campbell
Thank you so very much for the encouragement, I will definitely focus on finishing it and look at the solutions after when I am ready, and learn from them to apply to further projects.
John
+2  A: 

I agree with mingos' answer on the main part: use a liberal license that requires attribution such as BSD or MIT.

However, generally speaking, writing your own license is a very bad idea, as non-standard open source licenses are frowned up by legal departments, which means that your code might be avoided by some projects. Check out the discussion on the banning of a PHP port of Douglas Crockford's jsmin from Google Code.

Brief, if you want attribution, use a standard license such as BSD or MIT.

hristo