2

I have a problem with my colleague. The problem is, he just copies my code and uses it on Stack Overflow and his own blogs. It hurts me a lot. I can complain to my boss directly, but that could create a huge problem for him. He can even lose his job and I don't want to do that.

I talked to him once about that. Told him about plagiarism, but he just made a joke. How can I politely make him understand that its not fair or a good thing to copy someones code while portraying it to be your own?

  • Your personal copyrighted code or code you write for your company? – Petter Nordlander Apr 6 '13 at 6:50
  • 6
    There is a huge difference IMHO. If your co-worker publishes your companys code (written by whoever), that is matter between the company and your co-worker. I.e. if you think it's inappropriate that the companies code is published in blogs, tell your boss to handle it. Your private code is something else. Why do your co-worker even have your private code in the first place? – Petter Nordlander Apr 6 '13 at 8:30
  • 4
    it hurts? wow I for one would be happy to have such a colleague. They will take all the legal risks of having company code posted publicly while I could take all the advantages of being able to publicly refer to my code when needed, along with additional bonus of it being proven worthy of copying by someone else. Interviewer: what's your experience in Mumbo Jumbo framework? Me: well my Mumbo Jumbo code was good enough to be copied by that guy into his blog article, "Mumbo Jumbo smart tricks". Interviewer: wow. – gnat Apr 6 '13 at 10:32
  • 5
    @gnat Are you serious sir? Should I really be happy for that? – Vinay Apr 6 '13 at 10:34
  • 2
    @vini - So you are not concerned about them copying your work so much as misusing company property? Have you talked with your manager to make sure that they do not have permission to use the code? Some companies give that permission because the exposure is more valuable than a few snippets of code that are not trade secrets. – IDrinkandIKnowThings Apr 8 '13 at 12:36
6

Why are you upset?

So you want him to stop copying your code. Why?

Told him about plagiarism

So you're offended that you're not getting credit?

I really respect company which I work for. I'm living in a good way because of the payments I get from that company. The code belongs to their product which is their main source of income. Many have struggled for that. Obviously, if some one tries to do bad on some thing which I like and respect it hurts me.

It's a sense of honor toward the company?

The first thing to decide is what part of this bothers you. Is it the company code? The personal code? The lack of credit? The potential harm to the company? Without understanding that portion, any suggestion will fall flat because it won't resolve the underlying source of your hurt.

Don't Bite Off More than You Can Chew

You say, "He can even lose his job and I don't want to do that." If you can't live with him losing his job, then you have to ignore the problem. You can control whether you tell or not, but you cannot control the consequences. He reaps what he sows. So do you.

Removal from Stack Overflow

If the code is your personal code, and you can show it, then feel free to flag the posts in Stack Overflow for moderator attention. Since this site licenses all answers under a Creative Commons license, if it stays up and is good code, it will spread. Best to prevent that by taking action now to get it removed, rather than later.

Discussion with your Coworker

If you go the above route, your coworker will likely notice (his reputation would probably change and/or he would get a friendly reminder not to plagiarize code). You may want to discuss it with him first and say, "Hey, I saw you using my code on Stack Overflow -- I'm glad you think it's good enough to help people out with, but without any attribution I lose ownership of my property, and I'm not too happy with that. I'd appreciate it if you take it down."

The Nuclear Option

For the company code portion, I would not get involved directly (in the sense of bringing it up to anyone face to face). It will just end poorly for you. An anonymous gmail address sent to a manager with details on where the company code is posted, and how to confirm it is the company's code would probably get the message across without having to get involved personally.

If you do go this route, don't mention anything about the Stack Overflow to him (especially if it's company code on Stack Overflow). He will know it's you.

  • 1
    I'm a stake holder at that company. Yeah... its too much for me to bare as a least experienced one at that place. I would like to ask you one question. Should I inform these things to my big boss as a responsible one? please bare with me I'm really confused. – Vinay Apr 11 '13 at 12:50
  • I strongly discourage directly telling your boss because it will create a very difficult situation for all three people involved (you, coworker, boss) that nobody wants to deal with. An anonymous e-mail that can't be attributed to you will be a much more effective tool that will make it easier for the proper action to be taken. – jmac Apr 12 '13 at 0:15
  • "I'm a stake holder at that company" Tell him to take it down or you go to the boss. – Mawg Feb 22 '17 at 14:45
  • If it is not IP, as in, if it is not pertinant to the running of the business and could have multiple applications and has variable names changed then why does it even matter? Code is just code and he is helping people. On the other hand if he is wasting company resources by spending lots of time on SO to get imaginarty internet points then he should stop. – MarkJL Apr 28 at 15:03
7

When you write code for a company it is not your code any longer. That is work product for them, they own it. It being dispersed on the internet for free is something your employer needs to know about.

Your co-worker will probably take it more seriously if you point out he is violating trade secrets or copyright of his employer instead of just hurting your feelings. Many people take their job security more seriously then their co-workers feelings.

If you respect and think no harm was meant, get your coworker to stop. If you can not your employer should know. It becomes more important you notify them if the code you are writing is being uploaded and it is unclear who is uploading it, you do not want to be blamed for that.

  • Easpecially as OP says in acomment above "I'm a stake holder at that company" – Mawg Feb 22 '17 at 14:46
  • Code is just code, snippets are not IP, the entire program is. If he could sit at home and write the lines himself or copy, paste, edit from a file he knows exists, what is the difference? – MarkJL Apr 28 at 15:05
7

Before anything else, ASSUME GOOD FAITH. It's far more likely that your coworker is simply unknowledgeable or unskilled in such things than that he is acting with intentional malice. Accidents happen and, be they by ignorance or omission, they're still accidents.

After that, you should understand that you do not have the power to make anyone do anything. It does not sound as though you are in a position of authority over your coworker. This means you have two options:

  1. Inform your coworker that he is doing something impolitic and convince him it's in his best interests to stop doing so, or
  2. Inform someone who has authority over this coworker.

Which you select will depend upon the license of the code:

  • If the code is open source, then your coworker should adhere to the attribution clause of the selected license.

  • If the code is closed and therefore proprietary, then your coworker should at no point be posting it without permission of the license holder (be that you or your company).

If it's your code and is under an open source license, it should (theoretically) be enough to remind your coworker that, while you're honored he wishes to use your code as examples, he needs to follow the stipulations of the open source license. Should he opt not to adhere to the license... Well, at that point you can either bring (expensive and ultimately unfulfilling) legal action or you can learn to turn the other cheek.

If the code is proprietary, licensed to your company, then you should inform someone with authority over the coworker. Before you do so, you should understand that should there be any negative ramifications to this person for his actions they are NOT YOUR FAULT. When he was hired he received the same documents and conversations about proprietary information that you did. If, after all that, he has still chosen to release this information then it is his choice. He knew what he was getting into.

Do not confront your coworker about his mistake in divulging company code. This is above your pay grade. You do the hard job of writing code and keeping the product running and growing. Your manager does the hard job of dealing with the squishy human parts of the equation. The company has given (him|her) the authority (and liability) to deal with these matters. It has not given that authority to you. Taking it upon yourself can lead to a lot of headaches for everyone. Please allow your manager to handle it, if only so you'll be free to work on the tough technical problems.

Send an email to your manager (not his; follow your chain of command), with direct links both to the original code in your source repository as well to the places where your coworker has posted the code. Do not make statements of judgment in this email. Simply declare that you have found $X code posted in $Y places by $Z coworker and provide supporting documentation for it. If the company deems that some action is necessary, they will take it from there.

Good luck.

2

Kortuk in his answer states:

When you write code for a company it is not your code any longer.

That is only partially true. It's company's code as far as economic copyright goes. You still retain moral rights.

Berne Convention, which is recognized worldwide, protects attribution and integrity. Article 6bis states:

Independent of the author's economic rights, and even after the transfer of the said rights, the author shall have the right to claim authorship of the work and to object to any distortion, mutilation or other modification of, or other derogatory action in relation to the said work, which would be prejudicial to the author's honor or reputation.

So if your coworker is attributing your code as his own, he's neither in the clear nor is it just between him and the company.

On the other hand, I don't think it's a good idea to escalate it to legal issue.

  • 1
    Interesting point. Still, the root issue seems to remain. I think VM did a better job then I did of explaining options because of the way the question read I assumed the coworker was ignoring his complaints. To me the economic issue is larger, it sounds like proprietary code and although my feeling might be hurt by someone taking credit for my code it is different to steal from the company I work for, and seems more severe to me. Anyway, thanks for teaching me something :) – Kortuk Apr 9 '13 at 14:06
1

Is he copying the code for reuse? Why isn't in a class reusable module? Is he copying a pattern that is used commonly in the code base? That is how new developers to a project learn coding standards of the project. Is he might copy your code on the basis of 'why reinvent the wheel?' Unless you're planning to publish a book or paper about your great code why are you worried about it?

Employers have better things to do than police blogs for code he got from a co-worker. If the code is not some great original algorithm that your or the employer plans to make proprietary and tons of money on why care where he posts it? Would it be better if he posted it to a forum rather than a blog?

Maybe he didn't copy your code. Leibniz and Newton both came up with calculus, and there is evidence that Archimedes beat them to it.

Even if he used copy and paste to print out 'Hello, World!' you couldn't say he copied you code because there is nothing original about it. You don't have to be happy about. But you could make yourself the bad guy that people don't want to work with in the scenario if you continue complain about it.

-3

One suggestion: as you peruse Stack Overflow, look at the really pathetic code, or the questions that get voted down instantly. To the extent that you can incorporate such constructions without causing harm, use them, so that the stuff that gets 'stolen' sends post readers into a rage. If your working companion starts feeling abused, maybe he'll quit messing with your stuff.

  • 1
    I'm not convinced this will solve the problem. You'd have to incorporate a heck of a lot of bad code into your project to make this affect the other party, and there's a reason those posts are downvoted -- the content is harmful, which means if used in the project, it would harm the project. Consider an edit to clarify and back up this post according to our site guidelines. – jmort253 Jun 15 '13 at 22:47
  • That might, by itself, not be the right approach. However, the fundamental idea is to remove the positive reinforcement that comes from posting content on public sites. 'Bad' code is not a good idea, it causes harm. However, variable naming conventions, formatting conditional blocks, and details in the composition of SQL statements might give good programmers the willies. Another approach is to publish first, such that by the time the other party copies it the content is already visible, and their entries are duplicates. – Meredith Poor Jun 16 '13 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.