I’m coding something for my job to copy directories and then use regex to make all the filenames uniform. I’m an undergrad student programmer for my university and I’m not sure what a professional coder would consider reasonable in this case. My job is mostly to implement mathematical research. The current assignment is outside what I’ve been doing and seems like it would be really useful to have some of the functions available in case I (most likely) encounter a similar assignment at some point in my career in the future. It’s going to be really useful because the current filenames are so screwed right now that the admin assistants can’t really keep up (and even trying to do so might just cause more human error). I’m thinking that it may not overall be useful outside the current assignment because the regex will be so customised to the way the file are incorrectly named.
I’m wondering if this is simple work for a pro coder, and therefore I’m making this program to be much more important in my head than it actually is, or if this is something that a coder would really want to copyright or otherwise retain the ability to use this whenever and wherever else they feel like. They’ve already told me that there is no question that I’ll be given credit for the work, which I’m excited about. My only concern was whether I should be thinking about reusing this code later or if this task is so generic that a pro coder would laugh about keeping the rights to such code.
This thread was interesting but seems different from my situation:
How can I reuse generic code for consulting between companies?
EDIT:
Florida, USA
You can never not copyright code. Code is copyrighted as soon as it is written. The real question is who owns the copyright. The applicable area of law is known as work for hire and this is very subject to national variations.
Typically, when you work for some employer, all materials that you produce during the period of employment that is for the employer is owned by the employer (thats what you get paid to do).
If your employer licenses the code in such a way that you can use it elsewhere, then go for it. If your employer says “no, you can’t use this code”, then that is the answer.
Read your contract, talk to your employer and maybe talk to a lawyer. Don’t reuse the code until you have done at least two of these things.
4
The other answers address the legal aspects of the problem & @MichaelT is (AFAIK) correct – it’s a work for hire & your employer owns it.
From a practical point of view, you’re right in thinking that this code is likely so simple and generic that it’s not worth paying attention to who owns it. It’s a minor part of an academic project where the ‘real work’ has nothing to do with file management. It’s probably only about a dozen lines of shell script that nobody’s ever going to notice.
As long as you don’t try selling it as a product or publishing it publicly, keep it around for reference. Use it where you need to. Nobody’s ever going to notice or care. It’s the IP equivalent of jaywalking.
In the UK, the default owner of copyright is different from the accepted answer.
In the UK, copyright is, by default owned by the person who creates the line of code. However, if you are employed as a developer then:
- It is normal for your terms of employment will include a clause to
assign ownership of ‘designs’ to your employer. - If your contract does not state it explicitly, because these terms
are a normal clause for software developers, they will still be deemed as ‘implied’ in the contract, unless you can get something in writing to counter this.
However, if your job role is not one that either does not have such a clause, or its not a normal for your job role to create intellectual property then you own copyright for your code.
It is often possible to get wavers of ownership from employers if you are contributing a to a non commercial project.
There are a couple ways you can handle this nicely:
a. Write the code, then get permission from your employer to publicly blog or otherwise make available the non confidential parts (exclude the regular expression for their particular file names for example).
Now, that code is in the public domain, you are free to copy and paste it later.
b. Create an exercise for yourself where you solve a similar problem. Write new code (don’t copy what you wrote at work) to solve it. You now “own” your own solution to the problem which you can reuse anytime you wish.
In my case, I work on a lot of my own projects. While my company owns work I produce during work hours, if I create something similar for my personal use for something unrelated to work, they don’t own it. At that point, if I happen to go work elsewhere, I’m certainly free to reuse my own independently written code.
*Note, I in no way suggest that you use anything designed specifically for your employer as your own! If confused – reread – it definitely says “create an exercise for yourself” which you work on on your own time. That’s how you generate your own IP w/o having to get employer permission (caveat: don’t run afoul of any non-competes).
16