If you are a developer and worked on a code for 2 years. NDA cannot cover what you know what you don't. Your know-how that you captured on that company can simply be replicated in another company. You'll write the code from scratch, and NDA or copyright, or even patent in majority of the cases will not be enough to enforce or stop such a think. In rare cases patent can solve it but do we want all companies to patent everything?