Not sure if this is the proper category for this question, but here it goes.
I understand that if you contract yourself out as a programmer, your work can be classified as 'Work for Hire', in which case the employer would own all the copyrights to the code. Now, obviously in this case, I'll likely have a copy of the code, and even if I delete it (would I be legally bound to delete it?), a good chunk of the structure and stuff would be in my head.
The first question I guess is, let's say a different employer hired me to do something quite similar to that of the previous employer. Would I have to start from scratch, purposely doing as many things different as I could from the previous program? How different does the code have to be? I'm assuming that just changing the names of some variables is not sufficient, but how would you determine where to draw the line?
This question would apply to the U.S. by the way, since I think that makes a difference. Anyone have any ideas or know where to look (I've tried searching online without too much luck to this particular situation)?
Thanks.