In most countries (I'm not familiar with Dutch law), including the two I've worked with in the EU, the company would most definitely still own the code he wrote using company resources and on company time.
Legislation in the UK creates a presumption that unless otherwise stated, first ownership of copyright works created in the course of employment will vest in the employer. So it is up to the written contract to rebut the presumption.
If you were hired to do some work, the result is "work for hire" and the copyright resides in the company. If you write software, emails, etc unrelated to your job you would ordinarily retain copyright to those. Cases like the one in the story are rather ambiguous. That's employment agreements almost always elaborate on the topic, saying that, for instance, code you write on company computers or on company time belongs to the company.