> I liked writing personal software outside of work because at work it could do my job for me or it frees me from the restrictions of shitty commercial software.
You have to be careful on this one.
Often (it varies by jurisdiction), blanket rules by companies that all software you write in your spare time are their property can be safely ignored as invalid. But if it is heavily related to your current job then (again depends on jurisdiction) then they probably do own the copyright, possibly even if they don't have an explicit contractual provision for it.
If you're using your own spare-time software at work and benefiting from it there, it would be hard to argue it's not related.
Yeah, I got stung by that early in my career. So now all my personal software is licensed either CC0 or AGPL3.0. That is first thing I do. Secondly, I don't talk about it at work.
The key here is don't be stupid. Don't write the software on company time or on company equipment. My experience has further taught me:
1. Most employers don't want the software. They want the person writing the software.
2. Once your peers discover that its you writing the software they use there is a good chance they will immediately move on to something else. In JavaScript world "Invented Here" syndrome is extreme and developers do not trust quality software could ever come from people they know.
3. If the software was in use before you got to the organization then you are in the clear.
4. Have multiple lines of alignment, such as a part time job and/or contractual obligations elsewhere. Employers will not fight other employers to gain ownership of your pet project. In my case I have a part time job in the military and the military has the most liberal IP rules on the planet. Now I am a defense contractor on a project with multiple contract vendors, so who would really own my pet project: the contractor that pays my bills, the client that pays the contract, or the other contractor who manages the contract.
5. If its your personal project you are free to abandon it at any time and use your time to play video games. You are also free to abandon that job and go do something else.
If the company owns your software than you don't have the right to set licensing terms. If the company fights things and wins (a big if), your license terms mean nothing. If you contribute to upstream projects they could have big problems backing out your changes.
Which is an argument for better laws around what you do in your personal time.
Of course as you say, most companies don't really care about such work so long as you are not competing with them.
That is entirely a matter of initiation. If the work initiates from the employer there is no question the work is owned by the employer. Less clear, but still very clear, is if the work occurs on employer time and/or equipment. If the work initiates from your personal mind far separated from employer guidance then its a personal project.
Yes, I am aware of some Mattel doll lawsuit where a guy created action figures on his own time outside of work and the toy making employer assumed ownership of that personal project. This is an extreme edge case though, because the employer had to prove the personal project was work residual from employment work and had to go to court and sue their employee. The motivation there is that the employer liked the employee's idea enough to want the freedom to pursue that idea as a future business interest.
This never happens in software unless an employee builds something to compete with the business interests of the employer. That is far easier to prove, malicious intent, and not the same thing.
The reason this never happens in software is that it radically opens a liability window that did not exist before. For example, consider Facebook. Facebook is not a software company, which is a company that sells software. Facebook is a media company that provides advertising and happens to write software for internal use. If Facebook were to sue their own employee to gain a new unrelated software product line then they become a software company and then become open to lawsuits, competition, and trust concerns they didn't have to concern themselves with before. If Facebook did want to assume ownership of an employee's pet project it would be far cheaper to just buy it from the employee or pay the employee to work on that idea as a job function. If the employee did not want to give their personal project to Facebook then Facebook could always fire the employee and start the idea from scratch under Facebook branding, which is also cheaper than suing their employee.
You have to be careful on this one.
Often (it varies by jurisdiction), blanket rules by companies that all software you write in your spare time are their property can be safely ignored as invalid. But if it is heavily related to your current job then (again depends on jurisdiction) then they probably do own the copyright, possibly even if they don't have an explicit contractual provision for it.
If you're using your own spare-time software at work and benefiting from it there, it would be hard to argue it's not related.