I recently read a piece of opinion from
in which he asserted that he "owns" his code, and that someone who
paid him to write it should not be allowed to use even snippets of it
for further own developments or other purposes.
I do not agree with this.
He likened his code, especially his precious libraries, which he has
invested a lot of time in to develop, to a craftsman's toolbox. Said
craftsman would not leave behind his toolbox after doing his work.
This analogy does not hold. Code is nothing but procedure. The
analogy is rather between the code libraries and the craftsman's
knowledge of what to do. If I employ a plumber to build a kitchen
sink for me, no one would deem it objectionable when I watch how he
does it and do it myself the next time. It may seem as if economic
value was lost there, but my own working time has a value, too.
If my own work (whatever that is) is worth 50 silver pieces per hour,
and I take two hours to build something in my home, it has cost me 100
silver pieces. If a company decides not to pay an outside talent for
developing their application but do it in-house, they pay their own
developers instead. The company is thus rather indifferent on who
does it, and if you have built a reputation of doing good work, they
will pay you.
Obfuscating your code, and threatening legal repercussions if the
customer builds on it without you, just severely diminishes your
work's worth for the customer. This damage, in turn, diminishes your
own reputation. Reputation is your most valuable asset. Existing
software solving a specific problem is interchangable, but ability to
solve new problems is what defines the developer.