views:

104

answers:

4

I've been seeing copyright/information about the file/site, and i'm wondering if any of you do it too.

Like in css, before the styling starts.

/* UI: Some Name Designer: Some Name Version: Some Name */

Do you do this with PHP, any other programming language? If so, what kind of information do you put in?

+1  A: 

Most companies expect something like that in the code not really for copyright purposes, but so that people know who to contact if they are having trouble with the code.

Crayon Violent
Your source control system tells you who wrote a piece of code
Tim Robinson
@Tim Robinson: That's not a legal copyright declaration as required by international copyright law. There's formal statement with (c), year and owner that is the declaration.
S.Lott
@S.Lott, I was referring to "so that people know who to contact". We can track that automatically; we don't need to rely on somebody adding a comment.
Tim Robinson
+4  A: 

Any code you write is automatically covered by UK copyright laws and I beleive the same applies for US copyright law, so it is not strictly necessary.

Some states and countries require it, but they will probably be so distant you would have very little control over the situation if your code was copied.

Remember if you are in employment, any code you write is the property of your employer. Putting a copyright notice in to yourself wont look too good.

If you are putting it in code as you own it, it is only necessary if you expect it to be distributed. No point if it's private!

Tom Gullen
I agree, and even if you put it in, what stops anyone from removing it after copying your code? There is no way to protect against code theft for publicly available code like javascript (except obfuscation (to some degree)). If you write code for redistribution it only adds a nice way to backtrack the code to the original developer for any feedback (or to get newer versions).
dbemerlin
Also beware of poor mans copyright (posting a registered letter to yourself with your copyright claim in it to open in court when you meet a challenge). I have read that this has never held up in an English court and is a popular copyright myth.
Tom Gullen
@dbemerlin: Public version control systems and timestamps on public FTP/HTTP servers may help to prove that the code originates from you (and not the other way round). However, this only works if you put in your name consistently from the very beginning.
vog
+1  A: 

I strongly recommend to always put your name on your work. Unless, of course, you want to stay anonymously because you produce something illegal or in a gray area of legality.

If you want others to be able to reuse your code, that information is needed to have a clear legal state. In addition, you should choose a free license. Also, you should put in your name even if you put your work into the public domain.

If you don't want others to (mis)use your code, the copyright information is even more important, because otherwise you'd have trouble proving your authorship afterwards.

vog
+1  A: 

It's sensible to let the reader know who owns the code and under what circumstances (if any) the code may be re-used or amended, or simply to say that permission of the author is required. Good software is not ambiguous. A copyright notice in the proper form is part of that.

Also good practice to acknowledge any others who may have contributed code to the work.

Poor man's copyright - I don't think anyone uses that now, there are now some technological solutions to that problem that actually do stand up in a court of law, and include tamper-proof audit trails.

ciank