I have written some code that implements an interface that is common between a project I am working on and a different project that a coworker is working on.

It was understood and agreed upon that this code would be common between the projects, and thus one person would write it and both would utilize it.

He asked for help related to the file, and when I opened the file on his project, I noticed that he had changed the "Author:" line from my name to his, without modifying any other portion of the code. This irritates me because I feel like he is trying to take credit for something that I did. I have always been very open in sharing my knowledge with him and providing guidance and assistance, and now I feel somewhat stabbed in the back.

I know it's technically the company's source code and neither of us "own" it, but I feel like he may be taking away an opportunity for me to get acknowledged and rewarded for doing a good job on this code.

How should I pursue correcting this?

  • 8
    Assuming you're using a vcs, it will be extremely obvious to anyone else what's happened. – Glen Pierce Jun 23 '18 at 15:32
  • 5
    This would be one of many many reasons to have a mandatory code review for everything. – deviantfan Jun 23 '18 at 15:39
  • 13
    sometimes the IDE does that automatically when you touch a file. – bharal Jun 23 '18 at 15:47
  • 2
    Does the code itself need to go between the two projects? That's going to cause a lot of bugs. It would be best to have a single library so you only have to change the code once when you make a change, and have both projects use that same library. This isn't a workplace issue, it's a software engineering issue, which is why this isn't an answer, merely a comment. But it's one you should consider to prevent lots of bugs (bugs he'll happily give you credit for ;-) – corsiKa Jun 23 '18 at 16:43
  • 8
    I would rather question why the heck your company is using author remarks (python's __author__ etc.) in source code files at all. They are useless: If someone has a question, he can check your VCS to see who edited the majority of code in the file. Also, at some people multiple people will have worked on a file. Now the author comment is even more useless. – ThiefMaster Jun 23 '18 at 18:47

Simply ask him why he changed your name with his name. If he doesn't provide any explaination, firmly state that if you wrote that code, you're the one to be held responsible (for questions, blame or acknowledgment) for that part of code and thus changing it IS wrong. If he apologizes, good. If not, document everything and keep an eye on future commits. If he contributed to the source code, then he deserves to put his name along with yours, also I wouldn't escalade this to your superiors if he stops after that conversation.

| improve this answer | |

In many countries, there is the right of authorship, which is independent of copyright. It basically means that you only can claim that you wrote the code if you wrote the code. Simple enough. The fact that you wrote the code while being employed at your company doesn't change the fact that you wrote it. The fact that he didn't write the code means he has no right to claim authorship.

Well, you ask him why he made the change and give him a chance to undo it. Or you can just fix the problem the next time you edit the file for any reason. I hope you use some source code control system.

To make this clear: Your company most likely owns the copyright to the code (unless you have a really, really unusual employment contract), but that doesn't change the fact that you wrote the code and nobody else. So neither your boss, nor your bosses nephew, nor any random coworker have the right to claim otherwise.

| improve this answer | |

As you say they're often asking for help, there's a large chance that given they need that file to work with the code they are writing, that in their mind they see the job as a whole and so all files needed are part of the project they are making. So adding themselves as the author is not so much taking credit for your code but that code as part of other code which they are writing.

If you have version control then this won't be an issue anyway (as a side point, with version history "author" is just duplicate meta info to write and maintain, we don't use it).

As per the other answer, my first action would be to approach them. But that depends on your workplace and relationship - at mine that's not an issue but maybe it could be for you.

All this said, I know such things can bother us when it's ourselves that are affected, but it's not really something to be that bothered about. The fact you often help this co-worker and write good code that others use in their project (etc) are things likely already be known by those you care about knowing that you were the author.
So you'll already have credit for being a good dev. No point in potentially harming a good reputation with a debate for a trivial bit of credit.

Approach the other dev if your relationship can stand it, otherwise let it go and perhaps just broach it if it happens again. But I suggest doing so with the presumption that it could be a genuine mistake for some reason.

| improve this answer | |
  • It's not really a trivial bit of credit if at some point bonuses are discussed and someone usurps your work. – gnasher729 Jun 23 '18 at 23:00
  • @gnasher729 if bonuses are determined by "author of code" then another job should be found ASAP. That's just my opinion, but determining if a dev is good or hard working (etc) is incredibly hard, and even total jobs or even total lines of code is not a good metric as the code itself would have to be viewed. – James Jun 24 '18 at 10:15

You must log in to answer this question.

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