I'm working on a software problem at work that is fairly generic, but I can't find a library I like to solve it, so I'm considering writing one myself (at least a bare-bones version). I'll be writing some if not all of the 1.0 version at work, since I need it for the project. If turns out well I might want to bring the work home and polish it up just for fun, and maybe release it as an open-source project. However, I'm concerned that if I wrote the 1.0 version at work I may not be allowed to do this from a legal sense. Obviously I could ask my boss (who probably won't care), but I'm curious how other programmers have dealt with this issue and where the law stands here. My one sentence question is, When is it okay (legally/ethically) to open-source a software tool originally written by you for work at work? What if you have expanded the original source significantly during off-hours?

Follow-up: Suppose I write the whole thing at home on my time then simply use it at work, does that change things drastically?

Follow-up 2: Note that I'm not trying to rip off my employer (I understand that they're paying me to build products that they own)--I'm just wondering if there's a fair way of doing this for all involved... It would be nice if some nonprofit down the road could use my code and save them some time. Also, there's another issue at stake. If I write the library for a very simple, generic thing (like HTML tables in Javascript), does that mean I can never again do so on my own time without putting myself at legal risk (even if it was a whole new fresh rewrite or a segment of a larger project). Am I surrendering my right to write code for this sort of project for the rest of my life (without this company's permission), since the code at work might still be somewhere in my brain influencing me? This seems related to software patents, as a side-note.

Check your contract, ask a lawyer. Many employment contracts have a "all inventions are owned by the employer" type clause. Its enforceability varies... for which you need to ask a lawyer.
–
MichaelTDec 3 '12 at 14:24

7

" If turns out well I might want to bring the work home and polish it up just for fun, and maybe release it as an open-source project." - Its highly unlikely your company would approve of doing this. Your work product is owned by them not you.
–
RamhoundDec 3 '12 at 14:36

5

I'd wager strongly on this getting you in to tremendously deep water if work found out given they have not agreed to releasing it. Get it in writing.
–
RigDec 3 '12 at 16:18

Note that most moderately-sized companies also disallow the installation of non-approved software on work computers, as it can lead to all sorts of system instabilities, viruses etc. So "just download it and use it at work" may not be a wise course of action either.
–
scottishwildcatDec 3 '12 at 16:31

2

@Ramhound I don't think it's as black and white as that. How can you not think about the work version while writing the similar thing at home? Anyway, this is probably all taken care of through the non-compete clause of the employment contract. My point was there's probably no way to prevent your company's code from affected (even subconsciously) the code you write yourself, which creates somewhat interesting issue but not one worth arguing about here.
–
AlexMADec 4 '12 at 16:07

4 Answers
4

It is almost never OK, legally or ethically, to release products that you have created using your employer's resources or while being payed by the employer for your time without permission.

However, it depends on your employment contract. If you were paid by the company and/or used company resources to produce the product, chances are that the work belongs to your company. You need to go through your supervisor and your legal department. Depending on your employment contract, there might also be restrictions on working on related technologies or using knowledge gained at your employer in projects, even if you work on them using personal resources on your own time.

If you are using paid time, company resources, or are developing something that might be considered related to the business of your company, always seek guidance from your manager and/or legal department to ensure that you aren't violating any agreements and to get the appropriate permission to work on projects. Typically, it's easier to do this before you begin work as it might change the approaches that you take on the project.

Writing products for the use at work on your own time is questionable and depends on the regulations that your employer must adhere to. At the very least, you could be interfering with your employers schedule, budget, and estimates by taking work off-line. In some cases, you could be violating the contractual regulations by creating products outside of time that is tracked and billed appropriately.

+1 for the last paragraph. Employees working on related products and not accounting for and billing correctly, even if the employee voluntarily did so on their own volition can result in large consequences to the employer. In particular if the employer is a government contractor. The entire bidding process and overhead rates relies on having accurate numbers in order to create a level playing field for all potential government contract bidders. Fudging numbers, whether intentional or not, could result in denying the employer from bidding on contracts and even criminal prosecution.
–
DunkDec 3 '12 at 16:42

Could you flesh out the idea of a "product created for the employer"? If I come up with an idea or concept and use that idea in the product's code, am I allowed to use that idea, say, for open source volunteer projects? Let's assume it wasn't patented or patent-able.
–
AlexMADec 3 '12 at 17:06

1

@AlexMA That phrase never appears in my answer, so I don't know what you want expanded upon. If you work to create a project while on the clock or are using your employer's resources, see paragraph 2. If it's related to an ongoing project at work or your company's business, see paragraphs 3 and 4. In any case, it's a bad idea (if not unethical or illegal) to work on work-related things without permission, on your own time or not.
–
Thomas Owens♦Dec 3 '12 at 17:15

@ThomasOwens That's not really what I meant; sorry for being unclear. Your exact quote was "products that you have created using your employer's resources". What constitutes something they own versus what I own? What about general programming ideas that I come up with at work, which I then apply to the work at hand? Much like a carpenter that comes up with a new way of building stairs, or a new and better hammer, and then uses that technique/tool while making stairs for his/her employer.
–
AlexMADec 3 '12 at 17:29

2

@AlexMA If you're going to create something for use at work, even on your own time, you need to go through your employer's legal department. It's touched upon in my last paragraph and in Dunk's comment - doing work outside for the purposes of supporting a project can have detrimental impacts, and possibly legal consequences. An unrelated idea is one thing, but if you want to use what you make at work, go through legal before you begin working on it.
–
Thomas Owens♦Dec 3 '12 at 17:36

If turns out well I might want to bring the work home and polish it up
just for fun, and maybe release it as an open-source project.

You should be crystal clear with your employer about your intentions at the outset. Come to an agreement about how that'll all work before you get started so that there are no hurt feelings, misunderstandings, disappointments, etc. The work you do for your employer is your employer's property.

When is it okay (legally/ethically) to open-source a software tool originally written by
you for work at work?

When you have permission from your supervisor (and perhaps legal department) to distribute their property.

What if you have expaned the original source significantly during off-hours?

Doesn't matter. You're working with your employer's property -- changing a few lines here and there doesn't change that fact. It may still be theirs even if you change every single line in the project. Check with your lawyer for details, but don't expect good news.

Now, your employer may be perfectly happy to distribute the library under some open source license. If it's not something they consider part of their competitive advantage, or if they want to have the library maintained but don't necessarily want to do all the work to maintain it themselves, or if they want to garner some good will, or whatever, then things can work out. Just remember that it's their decision.

Now, your employer may be perfectly happy to distribute the library .... and it does not open then up to potential lawsuits and/or other legal issues down the road.
–
Loki AstariDec 3 '12 at 16:55

@LokiAstari Sure -- there's any number of considerations that the employer might need to take into account before open sourcing a piece of software; my list is far from exhaustive.
–
CalebDec 3 '12 at 16:57

2

When you have permission from your supervisor (and perhaps legal department)... Very seldom does your supervisor have the right to speak on behalf of the company in these matters. He/she may think it is just fine, but senior management might disagree. Permission should come from senior mgmt/legal.
–
cdkMooseDec 3 '12 at 17:26

2

@cdkMoose Yes, of course -- hence my inclusion of the legal dept. It's a stretch to say "very seldom" though -- makes too many assumptions about the size/structure of the company. Maybe the supervisor is the CIO, CTO, or CEO (or all of the above). I probably should have said "When you have the necessary permission" and left the details up to the reader.
–
CalebDec 3 '12 at 17:31

+1 for talking to your employer - they may be perfectly happy (or not) to open-source this library (and not the program itself), but its the right thing to do. Several forward-thinking companies (Google, Facebook) allow their employees to open-source some of the work they do, as long as it is not the companies' core proposition. But all of them go through a vetting process.
–
SumanDec 3 '12 at 18:51

Never.

Here's the problem: According to the laws of most modern countries, you hold a copyright over everything you write by default. This holds true even when you write it for someone else, such as your employer.

Obviously, this is problematic for anyone who is interested in hiring a software developer.

To solve this, software companies have you sign a Non-Disclosure Agreement (NDA). Within this NDA, it explicitly states that you relinquish the copyright of all code you write for that employer. Doesn't matter when you did it. It's all the same.

In other words: The code that you wrote does not belong to you. It belongs to the employer, and you are not allowed to publish it.

I've never heard of a developer not signing an NDA, so unless you're in some really remote region of the world, its a safe bet to say that you signed an NDA when you were hired.

If your employer is interested in publishing it for some reason, then it is a different story (and if you're iterested, you could also try to convince them that it is the correct thing to do). But that's the only way.

IANAL, but your even when... doesn't seem to be true in the US, at least according to this document from the US Copyright Office. Also: nondisclosure and work for hire are unrelated issues -- it'd be better to use a term like "employment agreement" in place of "NDA" above since the agreement you may have signed upon starting employment probably covered more than non-disclosure, and non-disclosure agreements often have nothing to do with terms of employment.
–
CalebDec 3 '12 at 16:38

@Caleb, your source states: "The concept of “work made for hire” can be complicated," and that is absolutely correct. One reason it can get complicated is because software is more than just code, it is a set of solutions and ideas. Then the question becomes, "Does your company own the code, or does it own the ideas expressed by the code?" It gets more convoluted when you imagine the scenario of someone coming up with a brilliant idea for work at 2 AM and implementing it in code the next morning. continued...
–
Stargazer712Dec 3 '12 at 16:56

... The solution that most companies employ is to state that they own everything you came up with, regardless of when you came up with it and regardless of when you wrote it. There are some states (Washington and California come to mind) that have some additional laws, but other states don't. Its complicated. Bottom line--you need a lawyer :)
–
Stargazer712Dec 3 '12 at 16:58

@Stargazer712 - The companies that wrote those sort of clauses in their work agreement are rare. I would even argue that those terms are illegal even in the states that somebody has not challenge them yet. Besides if you sign an agreement like because you don't know your own rights then you don't deserve the rights to the code if its outside of work.
–
RamhoundDec 4 '12 at 4:42

This depends pretty much on what contractual relationship you have with your employer...

Intellectual property

By default, many organisations are now more willing to open-source generic functions/classes to benefit the wider programming/coding community, but there are those that don't and can't from an intellectual property perspective - to commercially protect what they have.

If your code utilises any type of reference to your employers IP, or trade secrets then it's perhaps understandable that they may refuse.

Open source

Essentially and by default, you are entitled to release any piece of software you write in your own time and as long as it doesn't conflict with the terms of your employment contract - or - compete with what they do in any aspect.

The best advice I could give is to approach your employer and discuss the matter openly. This will provide you with:

Reflect/highlight their understanding of software and it's inherent/wider value

Your rights as to what they perceive you being able to do/not do

Any employer, who refuses to allow you to expand your thinking/learning and indeed contribute to the wider community (and solve bigger,wider problems) should tell you a lot about where you work. Companies often think more widely than they have prior about releasing code as it doesn't just benefit them - but it has to be in a form that doesn't threaten them in anything that they do.

My time/their time

As with other answers - you can't use your employers time to build your own software; either ethically or principally. Treat them separately unless your employer is willing to commit to releasing code.

In some cases, programmers fuse their own time and work time to create something great - which, every party benefits from and perhaps the ideal outcome to your question.