29

I am working on a side project at work where I find it beneficial to use some of my code that I have developed personally (outside of work) to speed my development. My side project is developing a C++ GUI application to let our power users run queries (built by me) against databases on several different platforms (DB2, Oracle, SQL Server and MySQL). In the past, I would usually just run these myself on request or build an Excel VBA application for them. Now that I have built several VBA applications for several different people, I find the need to build one central application that just reads in custom .sql files and executes against various databases.

The application that I am building is in C++ and uses an LGPL cross-platform GUI toolkit. However, I have a lot of code that in my own libraries that I have built over the years on leisure, non-work related projects. Is it okay to use this code at work, thus saving me (and the company) time? If so, can I port any bug fixes and enhancements back to my personal library? There seems to be a line that I do not know when I am going to cross it.

I just want to add that none of the personal code has anything to do with any business logic. They are just basic utility classes/wrappers.

7 Answers7

39

Is it okay to use this code at work, thus saving me (and the company) time?

Yes, it's ethical. In the case you describe that you own the code, so you can freely give it to your company. They hired you to write code so they trust your code.

If so, can I port any bug fixes and enhancements back to my personal library?

Your contract probably forbids this unless you get permission (check your contract).

The best solution is to talk to your manager. I can't see any manager refusing your request. It also makes you look good when you point out how your personal coding is helping the company.


hIpPy
  • 103
Tom Squires
  • 17,835
25

Some companies lay claim to the work you've done out of hours too. It depends on the company, some of them are big on IP control.

Everything should be down in your contract. The worry is if they lay claim to your freetime work, which has been a horror of mine.

zeristor
  • 351
7

Your company may have a dedicated IP department or specialist. Check with them. Your manager should be able to put you in touch.

Certainly it's ethical; I can't imagine your company would be sorry to have more access to your work and brain-power. You want to protect yourself from losing control over your own code. Some things you might consider doing first are to create an open-source project with your code in it, and assign it a license which is compatible with your company's IP policies.

Also, look into getting official permission to release any code you contribute to it. Some (many?) companies are fine with releasing code under open-source licenses so long as there is a clear separation between the open code and the company code. This may be true even if your contract says "we own everything you do even remotely related to work". In my experience, they're mostly worried about diluting their competitive advantage in their core business. This is another reason to package your code in a suitably licensed library instead of importing it directly.

Hope this helps.

Mike B
  • 211
3

It's totally ethical. I often research new technologies and different ways of doing things at home, and more than once I've developed something at home that I wound up using in my work. I also wouldn't have any problems with bringing fixes or enhancements back home (or bringing them from home to work).

I'd only be concerned if you intended to release your work independently. If that's the case, then I wouldn't bring it in at all, and I wouldn't even try to re-use the design. As others have stated, check your employment contract and discuss it with your manager. If you don't have one of those "you work for us 24/7"-type contracts, then you could consider releasing your code under some license and using only the released code at work. Then it wouldn't really be any different from using an open-source or free software project, which I assume you're already able to do.

TMN
  • 11,383
2

I absolutely agree with the previous poster, ethics is not really a problem here in my opinion, unless you contract forbids you from using non in house developed scripts/software then you might have an ethical issue.

Your issue is actually property rights.

And here there are several issues you need to think about.

What does your contract say about intellectual property ?

Does your company retain rights to things you create?

What license does your company use when developing code?

Is it compatible with your own licenses ?

These are questions you need to have answered before you develop any code, allow already developed code to go into your company's repositories or taking development back...

1

As always, it depends. In this case, on what a) the license you put on the code says and b) on what your contract says. You might want to come up with a business deal with the company that covers code you wrote before you got there.

There's no general ethical problem with this, so long as you think about it beforehand.

0

It is not ethical to steal from your company - and, if you agreed that all of your work, while at work, belongs to them, then it's unethical to surreptitiously move code back into your codebase.

Asking for your manager's permission may not be enough - he may not be in a position to negotiate this with you. So, depending on circumstance, asking may not relieve you from your commitment - and may instead earn you an accomplice.

The correct way to do this sort of thing, is to be clear that you're bringing an outside project you own into the company, and then sign (or verbally agree) on a separate contract or arrangement, specifically for the outside project. Do this in advance.


Note that the legal and ethical aspects are different and don't completely agree. Even if ethical, it's sometimes not legal to bring your code into work without a contract (while, under other circumstances, it's not legal for you to keep the code at home - you're legally bound to bring it in and use it, if you, to the best of your ability, think it would benefit the company).