So, as a Coder, I'll take my knowledge from my job and apply it to my hobby, and take experience from my hobby and apply it to my job. On occasion, this can lead to very similar code appearing in hobby projects and in work solutions. I'm not copying market-level logic (I work for a tax software distributor, and am coding a music sorting library), we're talking low level code, stuff like sorting algorithms and database connectors.

I've occasionally come across issues where I use the same design pattern in my work environment that I've used in my hobby coding. I'd like to throw it up on github, but at the same time, it may have already made it into my companies repo.

Knowing that, how can I keep my profession and my hobby seperate? How can I show off my hobby work while still providing solutions for my employer?

  • 5
    First review your employment contract and employee handbook. If there is language that says that everything you do belongs to them (even if it's not really enforceable), then avoid disclosing anything to your employer or to your colleagues. Nov 2, 2016 at 21:04
  • 1
    I'll add - make absolutely sure you don't use ANY company resources for anything that could be construed as connected to your personal projects.
    – Codeman
    Nov 2, 2016 at 22:02
  • @paparazzi Nah, I know there are better implementations of everything I'm coding, I'm not solving the travelling salesman problem here. My employer may or may not care if my sorting alg is the best, they care that its very similar to the one in their db. And I know full well the only person with a higher rep than skeet is skeet.
    – Sidney
    Nov 2, 2016 at 22:59
  • Don't use company resources for your personal hobby coding and don't ever bring your work code home. If you do that and just code at home from scratch I don't see a problem. Of course some patterns will be the same in both your hobby and work code. That is normal in software development.
    – Chimera
    Nov 2, 2016 at 23:17
  • On occasion, this can lead to very similar code appearing in hobby projects and in work solutions - very similar code, or very similar style? There is a big difference. If it is similar code, did you memorize/copy something from work, or was it simply trivial enough that there are only a few ways to write the algorithm's implementation?
    – Brandin
    Nov 3, 2016 at 1:20

4 Answers 4


I like yourself program both for work and as a hobby. I find that it's a non-issue. Especially since you are only really reusing code for the extremely low level stuff. The likely hood that someone already has that near exact same code someplace is extremely high.

The only time I ever ran into an issue was when I created a Asset Tracking software for my hobby project and my boss saw it and wanted to implement it. This actually turned into a plus because the license I used was for non-commercial. Because they wanted to use it for commercial purposes I was able to get them to pay licensing fees.

I would highly recommend using your hobby to build things that you know for a fact that you can use at work too. And open sourcing it. This might lead to other people using the software as well and it might also give the company an incentive to pay you a little more if they believe that you are working on work related side projects at home. You most certainly don't have to work on hobby projects related to work all the time but by doing it maybe once or twice a year it shows the company that your dedicated to programming as well as your career with there company.

If you are worried about possible copyright infringement I would recommend simply making sure that code your open sourcing is under a license where you can reuse it at work and pushing that code before the code at work if possible. If you must push the code at work first I would recommend talking to your manager to see if this is at all an issue. From my experience most managers don't see it as an issue at all if the hobby project has a completely different goal than the software being developed for the company. Basically so long as your hobby project isn't competing with the companies software in anyway you should be OK.


I had have this same question in my mind years back.

If I build a new thing either at home or at workplace that can help others without affecting my employer's commercial values, I definitely put it open on Github for reuse within my projects, my employer's projects and others.

Instead of including the code piece in the employer's project, I reference it from my open-project to avoid mis-understandings by my employer and make them realise it wasn't coded for them only, instead it helped me code for them.

Whatever could be open, should be open. That's how software development works nowadays. If php, ruby, python, linux and most of what we use today weren't open, they wouldn't have been this great.


So this happens rather often. One of the easy solutions to avoiding this is to use your hobby projects as more of a learning experience, like using a language you don't use at work or a new tool, or new framework, etc. This also helps with coder fatigue and help you grow as a coder.


Your hobby projects can be anything, I'm just saying use new things to learn in the process.

  • 3
    @IDrinkandIKnowThings I disagree with that solution, there are many programmers out there who are passionate about their work such that they code on other things in their spare time. Look at how 60% (rough estimate) of open source is created.
    – user49733
    Nov 2, 2016 at 21:09
  • 1
    @IDrinkandIKnowThings and the question is to keep work and hobby separate.
    – user49733
    Nov 2, 2016 at 21:12
  • 1
    Yes but the implication is that they also want to do something more than just exercises. And for the record I was not advocating not coding at all when off work. Was just making the point Nov 2, 2016 at 21:23
  • 1
    @IDrinkandIKnowThings yes, where does it say it has to be exercises? All I said was a learning experience.
    – user49733
    Nov 2, 2016 at 21:24
  • 2
    @IDrinkandIKnowThings Yes, yes I said that. No where did I say something about exercises.
    – user49733
    Nov 2, 2016 at 21:27

So what's the point about it ? Are you afraid of plagiarism ?

Should we accuse everyone that has developped back in time a quick sort algorithm or implements a factory pattern through the companies they worked for ?

This doesn't work like this, your knowledge belongs only to you and you can reuse it. Unless the company own some Patents about some highly specific algorithm/...

I'm no lawyer but from what I know, as long you can prove that each line of code of your home project was done out of the company's working hours and without company's stuff and you didn't extract code from your company to use it directly into your project, you have nothing to be afraid of.

This is your work with your knowledge. If you're still not sure about it, check your contract if there is no specific things about this and check with a lawyer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .