This is an issue near and dear to my heart. Any experienced engineer should have a wealth of preferred ways of solving common problems. It is absolutely unreasonable to expect someone to reinvent the wheel, and it's absolutely unreasonable to expect someone who has invented the wheel to reinvent it again to satisfy some kind of clueless legal agreement.
This is why I am a fan of non-compete clauses over strict IP assignment. For example, let's say that while I am working on a social networking application, I create a very clever way of performing searches. When I move on to the next project, is it reasonable (or even possible) for me to 'forget' my idea if it applies to the next situation? No. It is, however, perfectly reasonable for me to avoid applying the same code or concept to a competitor of the original entity the code was written for.
Most code involves solving common problems. The 'secret sauce' business logic that makes software unique to a specific application should be protected from competitors. That's fine and to be expected. But code is not the product; code is a manifestation of an idea. Rearranging code slightly is still using the idea.
I once lost a large sale because of this issue. I had a framework for which I owned the IP. I offered the client a royalty-free, perpetual, transferrable license to any code I had previously written which I incorporated into the work I did for them. They insisted all code must be written from scratch -- and the technical advisor was leading the charge on this. He insisted that I could just 'write it a little differently'. What a load of crap. If you have a piece of code that solves a problem well, what is this nonsense of rewriting it a different way to satisfy a legal loophole of full IP assignment to the client?
I even offered to open-source my code so that IP assignment would not be an issue, and they still did not relent. They wanted everything written from scratch. The idea of doing so not only bores me to tears, but it is also flat out ridiculous. Where does it end? Your code runs on an operating system. The operating system uses hundreds of packages, most of which are open-source.
You cannot own all the IP that your code depends on. And you cannot own all the ideas that went into your software. You can try to own the manifestation of those ideas and you can protect yourself from engineers selling secrets to competitors, but not much beyond that. Any engineer that agrees to not use an idea he/she had before applying it to your project, or agrees to never use an idea he/she had while working on your project in the future -- is either a terrible engineer or a liar. You don't want to work with either.