If a mobile/web developer creates an application like Uber, then sells it to a company, and the company also wants the copyrights for the application, what happens if after few months another company comes to developer and asks for a new similar application like Uber, then the developer creates a new application like Lyft and give it to the new customer/company?
I mean a developer may use 90% of similar codes that he used while creating Uber application for the Lyft application. In this case, can Uber company sue against the developer because they have also bought copyrights for the Uber application?
It's a little bit confusing for me as a developer because most of the time we use similar codes to create similar behaviors in an application. Also the way you code is like your handwritten and you can not code similar applications in different ways, it's kinda meaningless! Because most of the time we just copy and paste similar codes that we already use in another application if we want to build something similar.
So how does copyrights law work for the applications?