Noticed that my colleague has refactored/normalized my work further into smaller chunks. What has surprised me is she has been adding a "Created by [her name]" on these files. It's clear this has been my work, everyone on the team knows that. She's not wrong because she technically did create this new file, but barring 3-4 lines of additions to link back to the parent file, there has been no value addition, and all of the code is still mine. How do I approach this?
Almost certainly, the code is not "yours" or "hers", but belongs to the company due to the contract you have with them. Whose name is at the top really shouldn't matter in terms of ownership.
If you don't write your name above files and she does, it's probably time for a little chat about "code standards", because now it's inconsistent. When you sit down as a team and talk about what to put in the code and what not, try and get her to give some arguments for putting a name at the top. It's unlikely she has any and the blocks go, but if she does, maybe there's a point and you can add yours.
Also, I'm assuming you have version control. (If you don't, GET WITH THE TIMES! Your entire code base is hugely at risk). All version control systems track who wrote a line, and who deleted it, so anyone who wants to know who really wrote something should have no problems just looking up the commits that created that code and they will see exactly what happened.
And finally, code written in a team in general is not really "owned" by any one person; it is owned by the team as a whole. Most teams work with the understanding that anyone who has the rights and freedom to commit to the codebase has full responsibility and ownership over everything in it. It seems both of you don't feel that way, so that might be something to talk out. The feeling that someone is "changing your code" is not productive in a team. What they are really doing is "changing the code", and you should make an objective judgement of whether it's for better or worse and reply based on that, not on whatever attachment you have to the stuff you wrote some time ago.
Mostly, you mention it to your manager, calmly, and ignore it thereafter.
If s/he really wants to take primary responsibility for supporting that code in the future -- which is the main result when someone puts their name on code -- that's less annoying maintenance and repair work for you, right?
Go write the next chunk of function, demonstrating to your boss that you have the creative insight and coding chops to do more than just refactor. This will take care of itself.
Personally, I don't care who a file is supposedly created by. If I wanted to know who has done how much work, as a developer, I know where to look.
It matters very, very little indeed who has created a file. What matters is who filled it with code, and what matters even more is who made that code work.
Created by Ian R
to any files you create in the future.
Watch what she does when she refactors those new files.
If she removes your signature then she crosses an obvious ethical boundary and you can legitimately appear annoyed when you mention it to your manager.
If she adds her own signature under your own
Created by Ian R Refactored by [her name]
then return to the files that you originally created and change them to match the new ones.
If she complains about that then she becomes the one calling attention to her original encroachment.