
Ask HN: Is it wrong to reuse previous company projects that I developed? - supervillain
I have a new company that has a requirements very similar to a feature I developed in my previous companies? Is it morally wrong to reuse the piece of code again on my current project?
======
vitaminbandit
"The jury did find that 145 lines of A10's implementation of the public "Aho-
Corasick algorithm" constituted copyright infringement, and assessed $60
million in damages. These lines of code were removed from A10's product last
year." [1]

Re-use of code in an implementation of a publicly known algorithm -> $60
million in damages. This is not the kind of liability you will ever want to
take on.

1\. [https://www.a10networks.com/news/a10-networks-receives-
jury-...](https://www.a10networks.com/news/a10-networks-receives-jury-verdict-
finding-no-willful-infringement-patent-lawsuit-against)

------
gozur88
Yes, if you don't own the code. Unless you had an unusual arrangement with
your employer, the code is a work made for hire, meaning your previous
employer owns it. That's not just a moral question either - you can get into
legal trouble.

That's not to say you can't incorporated what you learned into the new code,
but it should be, morally and legally, new code.

You should avoid this kind of temptation by not taking code with you when you
leave a job.

------
Gibbon1
The hard advice I have is: If the new company is a competitor of the old
company. And the stuff you are reusing is directly related to the core
business of the old company.

Absolutely don't do that.

The far end of that would be reusing bash scripts you developed as an IT guy
for a now out of business drywall manufacturer for you new job as an IT guy
for a manufacturer of 3D printers.

No one will notice. There is no one to care (out of business). And it's not
worth a lawyers time.

------
SwellJoe
I Open Source whatever I'm allowed to open source, when I do contract work for
companies, to address this very question for my future self. I usually include
a clause in the agreement that the code will be released under an open source
license (they can pick, or I can pick Apache license or GPLv3 with copyright
held by me and them receiving an unrestricted license, whichever is
appropriate to the project), unless explicitly requested otherwise.

I've found it is rarely an issue that even raises eyebrows these days; unless
the company is a software company selling software as their primary business,
they don't care what the license is as long as it solves their problems and
won't give them legal hassle down the road. Most companies just need solutions
running on their servers; they don't care how the solutions get there.

If something is clearly work-for-hire, and isn't Open Source, I wouldn't re-
use it without explicit written permission. But, I can't remember the last
time I did work that met that description.

------
edblarney
It depends on the terms of your contract with that company.

If that company owns the work you did, then you have no rights to it.

If the company does not exist, it may be another story, but you should check
to be sure, because if previous owners can claim rights, it could ruin any
fruits the project bears for you.

Here's a hint: once you develop something once - you can do it 3x faster and
2x better the second time around - from scratch.

Remember that most of coding is 'figuring things out' \- i.e. architecture,
which apis to use, the requirements.

If you know exactly what you need to do and how to do it - you're 80% of the
way there.

Just re-write it - it will be much better, and you save yourself any possible
legal or moral issues.

------
rubyfan
Be careful there, if the previous company can claim that a previously
developed asset is a trade secret then you could expose yourself regardless of
if you've reused source code or not. Also be aware of any non-compete
agreements you've entered.

------
saluki
re-write a better version from scratch using what you learned previously but
not re-using code.

~~~
sdfhusdohufod
this. or rewrite using a new method, that way you're always growing. you have
to ask yourself: do you really want to do the same thing again anyway ? better
to do it another way this time

