A) Is Illegal. You Have No Ownership of Any Code or Ip That You Work on at the Company That Employs You. That's What They're Paying You For, After All. B) Is...
A) is illegal. You have no ownership of ANY code or IP that you work on at the company that employs you. That's what they're paying you for, after all. B) is also illegal.
Does my company own code I write?
Any written work is automatically copyright to the creator - this covers any source code that you write. As such, the source code is copyright to you. This is obviously not terribly useful for your employer, and as such all most all employers will include a cause in your contract which transfers ownership over to them.
In general, the author of content owns the copyright. In the case of a software developer, it's the person physically typing on the key board to create the code. An exception occurs under the “Work for Hire” doctrine where the work is developed by an employee with the scope of their employment.