Earlier quoted context omitted.
However copyright assignment still defaults to the creator, so it's still worth asking whether there were IP assignment clauses in the employment contract.
You're quite wrong about copyright assignment as it pertains to "works for hire". > If a work is made for hire, the employer or the party that specially ordered or commissioned that work is the initial owner of the copyright in the work unless the employer or the commissioning party has signed a written agreement to the contrary with the work's creator. For legal purposes, when a work is a “work made for hire,” the a…
But you weren't hired for writing that code. You were hired to do a job. The code you wrote was not part of your contract even though you made it to fulfill your other duties.
There must be a reason this clause is usually added to SW dev contacts.