Update: Sept, 2 The answers of @mysterycommand and @Hiroto gave some good insight and prompted me to be more clear. I've rephrased my question with explicit details; the intent is the same, hopefully clearer now.
As a freelance software developer I've run into a contract with a "Work For Hire" clause that effectively renders me an employee of my client. I have not signed this contract but it got me thinking:
At what point do you need your employer's permission to contribute to open source code you use on the job? (see scenarios below)
In software development it's common to use open source, permissively licensed software, i.e. ok for commercial reuse. The company you work for is not involved in open source but you choose to use it on the job (an application framework, blog, cms for instance). In the US, it's assumed your employer generally owns the copyright on work done on the job. In the course of doing your job, you write some code that you want to contribute back to the community — outlined are some examples:
- You find a bug in a some open source code you're using at work and you fix the bug. You've changed a few lines at most, maybe even just a few characters. Do you need your employer's permission to submit a pull request to contribute your change back into the project's public repo?
- You have a half finished piece of open source code you've started on your own time. During the course of your work on the job, you end up seeing the utility of your code so you choose to use your own previously written code. You end up needing to tweak the code, fix a function, or add a new feature so you can effectively complete your job. Do you need your employer's permission to publish the changes you made to the module you started on your own time but improved in the course of your work for the company?
The above two cases seem very grey to me, so insight would be helpful. Following is an example which seems less grey in terms of getting permission (it seems like an obvious yes) but takes the question to the next logical step:
- In the course of you work on the job you see the utility in creating a reusable module that will save you time in future projects at work. You write this module and realize that it's a pretty good bit of software and other people (outside your job) may find it useful too and may even help you make it better. When you work for a company that is not active in the open source space, how does one approach conversations about the benefits of open sourcing work made on the job?
Asking this question has made me realize that it's important to be on the same page as your client. As freelancers, we can specifically walk away from projects which don't meet our standards (for instance I'm not sure Work For Hire is going to work for me). Also, it generally seems better to retain the rights to work created on the job in the case you want to contribute back to the open source community. As freelancers, we may need to take a WFH job (fiscally compelled) or have jumped into a contract without understanding ahead of time.