What licensing info is needed in code headers?

Disclaimer: I know that some of you live in jurisdictions that do not
allow you to give legal adivce, and I’m not seeking it – I’m merely
asking for a good practice. :slight_smile:

I like my code as clean as possible, and so I’d love to have my code to
have as little cruft as possible. Given that I say in the README file
that the code is licensed under a given licence (located in the LICENCE
file), do I have to add licensing info to each and every file anyway?
If so, what’s the shortest info I can add to make sure that a given file
is covered by the licence?

— Shot

On 2 Sep 2009, at 17:44, Shot (Piotr S.) wrote:

If so, what’s the shortest info I can add to make sure that a given
file
is covered by the licence?

I can’t comment for other jurisdictions, but in the UK you don’t need
to put anything in your source files. Copyright exists from the moment
of creation regardless of whether it is claimed (although including
the usual (c) copyright statement is always a good idea). Likewise if
you license some of the rights attendant from copyright to a third
party, you’re under no compunction to explicitly do so in your source
code.

Setting aside those jurisdictional specifics, it’s common practice
amongst OSS developers to include the (c) copyright statement in
individual source files along with a separate LICENSE file outlining
the terms under which the source code is licensed.

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason

same goes for Germany. The problem is AFAIK that the US have a very
different
copyright system than most (all?) European countries. (don’t nail me on
anything here,
I’m not a lawyer…)

I can only speak for myself here, don’t know what’s good practice. I
usually
only provide
the LICENSE file, but then again, I allow people to use the code
unconditonally anyways.
I’d say, if you have something that needs special protection (like you
just
invented a working
AI with emotions in 200 lines of code), put it everywhere, just to be
sure
;-). But when
it’s just regular code: why bother too much?

2009/9/2 Eleanor McHugh [email protected]

On Thu, Sep 3, 2009 at 2:42 PM, Fabian
Streitel[email protected] wrote:

same goes for Germany. The problem is AFAIK that the US have a very
different
copyright system than most (all?) European countries. (don’t nail me on
anything here,
I’m not a lawyer…)

Actually, the US has adhered to the Berne convention since 1989, so
strictly speaking marking a work as copyright isn’t required to claim
copyright, however doing so give better protection should things end
up in court.

I can only speak for myself here, don’t know what’s good practice. I usually
only provide
the LICENSE file, but then again, I allow people to use the code
unconditonally anyways.
I’d say, if you have something that needs special protection (like you just
invented a working
AI with emotions in 200 lines of code), put it everywhere, just to be sure
;-). But when
it’s just regular code: why bother too much?

There’s a difference between a license and a copyright. Copyright
allows the author to restrict copying without permission, the license
grants that permission. A license without the copyrights is dubious
because it’s not clear if the licensor actually has control over the
rights the license grants.

Many open-source projects skip on placing copyright notices in the
source files, this can be problematical, particularly in the case of a
multi-author project which grew semi-organically when the project
‘shepherds’ want to change the license and need to track down the
actual copyright holders to get the needed permissions.


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

Fabian S. wrote:

;-). But when
it’s just regular code: why bother too much?

If you want your code to be “business-friendly,” lawyers like to see
licenses that they’re already familiar with. You’re better off picking
an Open Source license that suits your needs and using it than you are
rolling your own or just omitting the licensing terms altogether.

For example, the Lua folks used a non-standard license until Version 5,
then they switched to MIT just to make it easy for the lawyers to sign
off on it.

2009/9/3 Tim H. [email protected]

If you want your code to be “business-friendly,” lawyers like to see
licenses that they’re already familiar with. You’re better off picking
an Open Source license that suits your needs and using it than you are
rolling your own or just omitting the licensing terms altogether.

what about a license that says “do whatever you want”, shouldn’t that be
easy to
sign off?

Fabian S. wrote:

sign off?

If by “do whatever you want” you mean “Yes, take my code and use it the
way you want to. You can tell everybody you wrote it, put your own
copyright on it, and then demand that anybody who uses it has to pay you
for it, including me,” then that’s called “public domain.” Putting
things in the public domain is tricky these days, and requires a
positive effort on your part (by default you have the copyright), but
sure, give it a try. If I was going to do this I’d search for some
appropriate lawyerly verbiage to insert in the source code since it’s
unlikely I’d the the words right on my own.

But I think by “do whatever you want” you mean “This is my code. You can
use it however you want to. If you share it then you have to share it
the same way I do.” In that case, retain the copyright and license it
with the MIT license. Simply put, the MIT license says “do whatever you
want with this code, except you must tell everybody that I wrote it and
own the copyright. If you have any problems with the code then I don’t
take any responsibility for them.” It says it in language that lawyers
understand.

Here’s the MIT license in it’s entirety. Two sentences. Not so bad, is
it?

The MIT License

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.

hm, alright, well, I’m lazy, I’ll stick with the stuff I have right now.
In essence it says the same except for the “You have to name me”
stuff… And I don’t really care for that too much. It’s not like I’m
generating any big code here. Just my useless bunch of daily output
:wink:

But should I ever produce anything useful, sure, I’ll remember the MIT,
so thanks!

Greetz!

Here’s the MIT license in it’s entirety. Two sentences. Not so bad, is
it?

On Thu, Sep 03, 2009 at 01:44:58AM +0900, Shot (Piotr S.) wrote:

Disclaimer: I know that some of you live in jurisdictions that do not
allow you to give legal adivce, and I???m not seeking it ??? I???m merely
asking for a good practice. :slight_smile:

I like my code as clean as possible, and so I???d love to have my code to
have as little cruft as possible. Given that I say in the README file
that the code is licensed under a given licence (located in the LICENCE
file), do I have to add licensing info to each and every file anyway?
If so, what???s the shortest info I can add to make sure that a given file
is covered by the licence?

The GNU GPL howto explains the “proper” way to use the GPL in your
program’s
source code. How to Use GNU Licenses for Your Own Software - GNU Project - Free Software Foundation

The 3rd through 7th paragraphs are probably a good procedure to follow
for
whatever license you choose.

enjoy,

-jeremy

Jeremy H.:

On Thu, Sep 03, 2009 at 01:44:58AM +0900, Shot (Piotr S.) wrote:

I like my code as clean as possible, and so I’d love to have my code to
have as little cruft as possible. Given that I say in the README file
that the code is licensed under a given licence (located in the LICENCE
file), do I have to add licensing info to each and every file anyway?
If so, what’s the shortest info I can add to make sure that a given file
is covered by the licence?

The GNU GPL howto explains the “proper” way to use the GPL in your
program’s source code. How to Use GNU Licenses for Your Own Software - GNU Project - Free Software Foundation

The 3rd through 7th paragraphs are probably a good
procedure to follow for whatever license you choose.

Thanks, everybody, for chiming in, and thansk especially to you, Jeremy,
for providing the GNU link above. I think I can sum up the discussion
for my own purposes like this:

— every piece of code is copyrighted by default, so there’s no need to
explicitely copyright it: a comment-less code is as safe as any other;
— if one wants to popularise the code, explicit copyright info (ideally
accompanied with a way to contact the copyright holder) is the first
step to take;
— the next step is to explicitely point out the licence in use;
— the last one is to add the three-paragraph copying
permission from the GPL howto linked above.

As I doubt my code will be useful to anyone, I think I’ll either stick
to comment-less files or add copyright+licensing info, but without the
copying permission (which I agree will be helpful if ever my code gets
any kind of traction – and I’ll happily add it then).

— Shot