That only works if he wrote them during work hours. If he didn't then why would the company own it? Anything you do off the clock is none of the company's business.
Generally the company has a claim to closely-related work even if done off-hours. You can't e.g. clone your company's product off-hours, or even make a closely-related product without the companty having a valid claim on that IP.