Copyrighting Source Code

by Brian Brewder June 11, 2008 22:42

Do you copyright your source code? Sorry, trick question. If you write source code, it is automatically copyrighted. According to the U.S. Copyright Office; "Copyright is secured automatically when the work is created."

Before you read this article I feel I should mention that it is essentially a summary of Copyright Office Basics on the United States Copyright Office website. When I decided to write about copyrighting I searched for articles on it. I found a few good ones, but this one covered everything (at least everything I wanted to know) and is a highly reputable source as well (who knows copyrights better than the United States Copyright Office?). Wikipedia also has a pretty good article on it if you want more to read.

So, back to source code copyright. The general description of works that can be copyrighted do not include source code, however, the document does have this to say about it:

These categories should be viewed broadly. For example, computer programs and most “compilations” may be registered as “literary works”;

You are not required to place any notice of copyright in your source code (since March 1st, 1989). However, adding a notice provides additional legal protection against copyright infringement (potentially increased penalty if infringed).

So what constitutes legal notice? Here is the relevant text from the article:

The notice for visually perceptible copies should contain all the following three elements:

1. The symbol © (the letter C in a circle), or the word “Copyright,” or the abbreviation “Copr.”; and

2. The year of first publication of the work. In the case of compilations or derivative works incorporating previously published material, the year date of first publication of the compilation or derivative work is sufficient; and

3. The name of the owner of copyright in the work, or an abbreviation by which the name can be recognized, or a generally known alternative designation of the owner.

Example: © 2006 John Doe

For source code, since © is hard to type and can sometimes cause problems in source code, I recommend using the word Copyright:

Example: Copyright 2006 John Doe

Of course when you write code for a company, the copyright owner is the company. If the code is contracted to another company, it is a work-for-hire and the hiring company gets the copyright (unless specified otherwise in the contract, so read carefully).

So where should you put your notice? The guidelines only suggest that it must be placed to “give reasonable notice of the claim of copyright.” For source code, this has traditionally been placed at the top of every source file as a comment.

Compiled code should also be protected. I'm not sure about other languages, however .Net provides an assembly level attribute for copyright. If you use the standard project templates for Visual Studio, there should be an AssemblyInfo file that contains all the assembly attributes, including the AssemblyCopyrightAttribute. At least in VS 2008, you can also get to it through the Assembly Information button in the project properties (Application tab). If anybody out there knows, I would be interested in learning how other languages add copyright notice to compiled code.

Once created, your copyright will be good for 70 years after your death. If the copyright owner is a company, the copyright is good for "95 years from publication or 120 years from creation, whichever is shorter."

The role of a software license is to allow others to use your copyrighted material. If you are interested in reading about software licensing, check out Jeff Atwood's article, Pick a License, Any License, on Coding Horror.

Tags:

Powered by BlogEngine.NET 1.6.0.0

About the author

I've been a software developer since 1999 and have been working with .Net since 2002. I love creating software, playing with productivity tools, and improving the process of software development. I hope you enjoy my blog. Please feel free to leave comments or contact me, I would love to hear from you.