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?

  • Well he she did create the files. I would talk to the person and then you boss.
    – paparazzo
    Sep 27, 2016 at 0:55
  • 4
    Do you use a VCS?
    – enderland
    Sep 27, 2016 at 1:03
  • 11
    You are having a XY Problem here. Writing author/creator name on files is just noise, and that should be removed. In a typical project, you could expect most files to be modified by multiple people, so what is gained by putting in an "author"? If you need to know who modified what part of the code, go through the commit log and be done with.
    – Masked Man
    Sep 27, 2016 at 6:23
  • 1
    Yes, we do use VCS so the commits do have my name. I work for a contracting firm so the code will finally be delivered to the client. I feel its disrespectful to just have the other person's name on the code when someone else put efforts to building it, and would be disappointed if the full time opportunity went to her instead.
    – Ian R
    Sep 27, 2016 at 6:51
  • 2
    You should just enforce a coding standard across the team to get rid of those names from the top of the file. They don't serve any useful purpose anyway. By the way, let me guess, your team doesn't do a code review before committing the code? If so, that is a bigger problem that needs attention much more than whose name is on the file.
    – Masked Man
    Sep 27, 2016 at 18:03

4 Answers 4


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.

  • 8
    It could even be an automatic template, I have seen some IDE's do this when you create a new file (which she did to make it into smaller units).
    – R-D
    Sep 27, 2016 at 6:25
  • Yes, we do use VCS so the commits do have my name. I work for a contracting firm so the code will finally be delivered to the client. I realize it works both ways - if the clients don't like the code, its better not to have your name on it, but that is not the case here. I was the only person working on the module (which is why I never put my name down) and took a leave of absence when this refactoring occurred. I feel its disrespectful to just have the other person's name on the code when someone else put efforts to building it.
    – Ian R
    Sep 27, 2016 at 6:48
  • 3
    Like I said; both of you seem to miss the idea of "team ownership" here. Talk about it as a team.
    – Erik
    Sep 27, 2016 at 6:59
  • 2
    Erik, I totally get team ownership here - its why I did not have my name down in the first place! I'm the last person to be petty about putting my name down on code, but it seems that that is the reason for this quandary. I realize it seems that I'm insecure about this, but the point is that if you or anyone else saw the code today and found sections to be well coded and documented and saw the other person's name, what would your inference be? This code is well over 5 months old and no one will lookup commit messages to see who actually wrote the code.
    – Ian R
    Sep 27, 2016 at 7:41
  • 1
    Honestly, putting their name on code isn't a good thing for them. Guess who's in hot water when something stops working? Oh, there's a name here... and it's not Ian. You typically don't even need to worry about this at all, if the company is remotely functioning properly. People will know. I put my name on code when there are really bizarre sections that are really unique, and I don't want people wasting time debugging it. It's not to take credit.
    – Nelson
    Sep 28, 2016 at 8:05

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.

  • 7
    Encouraging this kind of code ownership is one of the most destructive things you can do in an organisation. Sep 27, 2016 at 6:16
  • 4
    Seriously, don't do this. This kind of passive aggresive approach never ends well for any of the parties involved, regardless of who is "right".
    – Masked Man
    Sep 27, 2016 at 6:27
  • 1
    An eye for an eye is not the solution in this case , better discuss and sort things out Sep 27, 2016 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .