So I wrote a system for my job and now I want to write it from scratch so that I have my own copyrighted version in addition to what I've done for my boss, which does not belong to me of course (pay for hire). The problem is it is very hard not to follow the logic/algo flow from some parts of the code. Some methods will end up having the same flow, even though there will can many improvements and differences, changes in variables, changing in strategies, additional IFs to check other stuff and many other features implemented on top of it. However, I'm afraid that no matter what the basic underlying core logic is similar.

Because I wrote this thing myself, it becomes even harder to come up with a different approach to code the same thing. I like what I did for my job so improvement on top of this by departing from my original API approach sounds bad.

So my questions are: is there a way to rewrite what I wrote for my boss without infringing any plagiarism or license terms?

Let's assume I'm not checking my boss's implementation that I wrote because I quit my job but because I wrote (and because I have a good memory) it is all in my head.

Is there a legal workaround for that situation? Are algorithms protected by copyright?

So if you wrote something for your boss, you have to be very careful for the both versions not to look somehow similar. At least the algorithm and the logic flow ought to be similar.

What should I do? Any positive words of wisdom?

  • Whey the downvote? I put a lot of effort in the question :( May 13 '17 at 6:19
  • 3
    i guess because its a legal question rather than soffware engineering
    – Ewan
    May 13 '17 at 6:49

In theory if you rewrite it without literally copying line for line you are not violating copyright.

In practice however if you release a bit of software that does the same thing as software you wrote for your employer you will not make them happy!

In the first case, regardless of legality you are effectively competing against them. Remember that your job primarily is not to write software but to help you boss get rich. Don't do anything which works against that if you want to keep your job.

Secondly there will be the suspicion of theft regardless of whatever arguments you put up.

Thirdly there are other things than copyright to worry about. Patents, Business Secrets etc.

Finally, as an experienced programmer I will tell you this. Although you may be enamoured of your work. Business process software tends to be unique to the busines. Outside of that particular business it is worthless. Keeping the source code after you leave, or rewriting on your own time is just not worth the hassle. Write something else.


The correct approach - other than just moving on as @Ewan suggests is to contact your possibly former employer to negotiate shared licencing or possibly open sourcing the code.

You can possibly include in your negotiations some or all of:

  • Shared profits from ongoing sales of the code
  • Acknowledgement of the contribution &/or origin of the code
  • Joint Copyright &/or Licencing.
  • Ongoing maintenance &/or enhancements of the original code with no need to pay you, i.e.: free upgrades for the life of the project.

In this way you will avoid any chance of allegations of theft, copyright infringement, etc., should gain free legitimate access to the original source code and could possibly enter a new working relationship with the possibly former employer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.