Here’s a non-technical tip for today. A user asked about ownership of code that he wrote for a client. The basic answer is: it depends what you negotiated. Typically, if you work full-time for someone as an employee, your employer owns anything you create. If you’re an independent consultant working for a client, it’s up to you.
I will typically give ownership to the client but include provisions that allow me to use the code for other clients, as long as they don’t compete directly with the first client. This lets you reuse code you develop in other projects. Whatever you come decide and negotiate, make sure it’s on paper. Also, it’s a good idea to get in touch with an intellectual property lawyer if you’re really concerned about ownership. They are the only ones qualified to give legal advice.