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.

So now it's 2011, and as I carry on coding on our active projects it's time to update some copyright notices.

eg. Copyright Widgets Ltd 2010 to Copyright Widgets Ltd 2010, 2011

My question is when do you update the copyright notices?

  • Do you change the notice in the head of a file the first time you work on that file?
  • Since a module is one piece of code consisting of many files that work together, do you update all notices in that module when you change a single file in that module?
  • Since a program is one piece of code (maybe consisting of many modules), do you update all notices in that program when you change a single file in that program?
  • Or do you just go through and change en-mass over your morning coffee on the grounds your about to start programming and updateing things?
share|improve this question
    
I edited your title to remove the salutation (happy new year to you, as well!) so that it doesn't confuse search engines or our site search. –  Tim Post Jan 6 '11 at 9:31
    
Thanks for all feedback everyone! –  James Jan 11 '11 at 10:07

5 Answers 5

up vote 3 down vote accepted

I just change them as I work on them. We have the same header on nearly every file, so it's easy to find all instances.

I then usually run a grep on the whole code base prior to shipping a release of any kind, which also points out places that the documentation has to be updated.

It would seem to me, though, that if you had a uniform template at the head of every file .. a VCS hook could be used to automatically do that for you. I'm sure someone has done that, but a quick search didn't yield anything.

share|improve this answer
    
So this is the approach I'll go for then, just updating files as I go and updating all in a module before I release it. –  James Jan 11 '11 at 10:04

In most countries

Copyright doesn't require any notice. It is automatic.

Year is purely indicative. I suggest to change it when you update the concerned file.

Note that every recent IDEs can do a find & replace in files safely.

share|improve this answer

The purpose of the year in a copyright statement is to indicate when the copyright started for that file/version of software/etc. It's actually in your best interest to only insert new copyright dates for new files and new distributions. The reason for this is simple:

Company A develops software in complete isolation from Company B. Because there's only so many ways to think about a problem, they both come up with a similar solution for some feature. Through a blog entry or something Company B finds out that Company A is probably in violation of a copyright so they decide to sue (ever hear of SCO?). Company B keeps updating their copyright notices with the advancing years, but Company A leaves them alone. When the lawyers examine code and see Company A's copyright date before Company B's copyright date, they will realize that it just might be that Company B is in violation.

That said, the date in the copyright notice is a legally weak indicator of when something was copyrighted--particularly since it is so easily changed. Registering your copyright with the government is a legally strong indicator of the copyright date. Most government agencies don't verify whether you are already in violation because they don't have the resources for that. Instead, if there is a violation the one with the earlier registered copyright usually wins. Most lawyers and courts will refuse any case that does not involve registered copyrights because they are so difficult to prove.

Nonetheless, it is better to only put the new date on new code.

share|improve this answer
    
If you notice my example I'm not removing the earlier date "eg. Copyright Widgets Ltd 2010 to Copyright Widgets Ltd 2010, 2011". So does this still apply? –  James Jan 6 '11 at 13:49
    
I'm just repeating advice I've gotten. The only date that matters is the earliest date. That's when the clock starts ticking on the life of the copyright. –  Berin Loritsch Jan 6 '11 at 13:51

I've seen a whole range of approaches, though the one that seemed least work to me, at least from a development perspective, was to make them dynamic and have the code automatically just add the current year every time the page was generated.

Whether that would cause too much of a performance overhead would depend on the solution, hardware and so on. It seems unlikely but possible.

share|improve this answer
    
What's the point in putting a year in the copyright notice if that year has no relation to the content which the copyright notice attaches to? –  John Bartholomew Mar 5 '12 at 7:50

I maintain an open source project, and I needed to insert and manage copyright notices at the top of all code files. Also, certain sections of the code are released under different licenses, so it was a bit complex. I wrote an application that goes through my source code, finds applicable files and first inserts some commented XML start/end tags where the copyright header should be if it doesn't exist. Then the app goes through again and replaces everything within the header tags with the correct copyright notice for that library.

It also finds all project files in the solution and updates the application version, if necessary.

It took me several hours to write, but it's made deployment much easier.

share|improve this answer

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.