As a new-to-independent-contracting coder, I'm interested in the best way to protect my ability to continue coding in my field.
I want to be clear, this question isn't just about the best way to maintain my copyright on a code...but information about what forms of coding contracts (I.e. work-for-hire) could lead to problems.
This is my point of concern: I'm a very niche contractor. I work almost exclusively in Python, and code almost exclusively biomedical models.
Point being, there are only so many idioms and frameworks that can be used in modeling. If someone hires me to do an enzyme-on-a-platform model, it would be nearly impossible to code a second model for another client (even if using a completely different enzyme in different solution) WITHOUT reusing or re-creating from scratch identical or nearly identical code.
I have however discovered that entrepreneur companies (more than half my clients) won't accept the "perpetual and irrevocable licensing" I offer. They insist upon ownership of the code or a work-for-hire style agreement.
My fear (based on horror stories) is that I can code myself out of a career - inasmuch as people owning the code for the above model means I could (in theory) never do another such model again without fear of being sued for reusing or re-creating code I don't own.
I'm interested in advice, links and experiences as to whether this is a concern or a "boogieman" and what other people have found to be the best approach.