While working as an employee for Company A, John wrote a textbook/some computer code/a mean haiku. Company A owns the copyright.
Later, John is hired by Company B and rewrites the same thing from memory. There are minor differences here and there because his memory isn’t perfect, but it’s mostly similar. Yet he didn’t use the original work for reference; he’s just paraphrasing his memory.
It’ll depend on the nature of the thing, and on how close his paraphrase is. A computer algorithm, for instance, cannot be copyrighted, though a code implementing that algorithm can be. So if he’s not directly copying the code he wrote for his previous company, but merely using the same algorithm, then it’s not a copyright violation (though it could be a patent infringement). On the other hand, if the work in question is a poem, then there’s not as much he could safely re-use, since the entire value of the work is in its creative component.
He may have written it in the first place, but he does not hold the copyright. Unless there was an agreement that he could use it elsewhere (highly unlikely), he would be violating Company A’s copyright (assuming its something copyrightable).
I don’t know anything about computer code, but I know about textbooks and mean haikus. If John was working under the standard arrangement it’s a “work for hire,” and John will have a tough time explaining why he’s not taking advantage of Company A’s resources.
The heart of the matter is expression. The ideas can’t be copyrighted, but the expression of them can be. There’s no magic number of identical words, nor is there an exception for folks with eidetic memories. If John is expressing the ideas in the same way he did in the earlier work—copyright in which is held by another—he probably is infringing.
John Fogerty was sued by his the company that owned the rights to the CCR catalog when he released “Old Man down the Road” because Fantasy claimed that he ripped off his own song “Run through the Jungle”. Fogerty ultimately won his case however by demonstrating that the two songs had distinct and separate origins.
I’m assuming this is referring to Zenimax’s allegations that John Carmack stole intellectual property when he left for Oculus, and I’m also curious how this is going to play out. Where exactly does one draw the line between stealing a proprietary process, and recreating something the only logical way it’s possible? At some point, certain parts of code or software processes are going to be so simple there’s only one way to realistically perform them. If John needs a software function to return the number 4, and he writes 2+2 for Companies A and B, is that really a copyright violation? Does rewriting it as 1+3 get around it, and if not then what possible recourse could one have?
It also depends on the expression, as mentioned. There are only so many ways to say “the boiling point of water is 100C.” However, the more distinctive and unique the specific expression is, the more likely it’s “copy” not coincidence. The author certainly removes the option of coincidence by knowing the prior art intimately.
(There’s a suggestion that a lot of studios will return unsolicited manuscripts unopened. Every time a movie hit the jackpot, people come out of the woodwork to sue claiming it’s a rip-off of their manuscript, book, whatever. Refusing to look at other manuscripts is the best way to ensure they can’t claim you saw and copied.)
Plus, there’s quantity. A few very similar paragraphs in a book might get someone the third degree in politics, but it’s unlikely to earn a copyright violation; similarly, all the chapters organized and titled the same in a textbook, or the sequence of illustrations looking very similar.
The amount of similarity? That’s why we have judges. Each situation is a judgement call, and hence, a judge would be involved.