HACKER Q&A
📣 andrewfromx

Can you ethically make an open-source repo from contract work?


Here's something that comes up a lot for me. I'll have a client paying me cash to write some code for them. I'll be writing and committing lots of business logic and stuff that's obviously proprietary and owned by the client. But then something is needed that really has nothing to do with their core business and would make a great open source project. The kind of project I might start on my own even without this client.

And if I were to just find this open source MIT licensed project out there I could definitely use it. So, can I also birth into existence a new open source project? The ethical dilemma is the client is paying for my time. Do they have to approve this open source project or at least be given a heads up before it's started? What's the harm in creating something that if it was already out there I could just use and say good news, open source package XYZ by John Smith was created last year and it's perfect for this project. Substitute John Smith for my own name and it was created not last year but last week. Is that unfair to the client?


  👤 h2odragon Accepted Answer ✓
Note in you contract before you begin that you retain copyright to the code you're developing, and are licensing them an instance of it. Then you're free to release a "for the public" version as you like.

If you haven't got that kind of agreement in place already, then it'd be polite to discuss it with them first. If they assert ownership of your code with out you having agreed tot hat beforehand, you probably want to know that now anyway, before you do any more work for them.

There's nothing wrong with such an arrangement but its best to be explicitly clear about these terms, and them having copyright or an exclusion on your use of the code you develop is worth more compensation.


👤 jonahbenton
No, it is ethical- when agreed in advance- and appropriate to make something the client has paid for available to others when the client does not have a proprietary interest.

In the larger build vs buy investment process those contributions reduce gross expenditure aggregated across all clients. Many clients understand this.

However, open sourcing a library often involves considerable work that is not material to the client's interest- documentation for a generic audience, test cases that cover surface not relevant to the client, or things like ticket management/triage. None of that can be charged to the client.

And some clients, even though they understand the ecosystem benefit, are not going to agree to participate. They may have their own IP processes that require review and approval to ensure proprietary interests are not compromised, and that is just too expensive.


👤 PaulHoule
I've worked on projects where I got in writing that part of the solution (highly general) was open source and another part (highly specific) was not and had that work out. In that case it is perfectly ethical.