11

I am starting a new big project for an important company. My boss provided me a code base of not so functional code and said "Just be careful with this, it is used to manage sensitive information."

After this, I began to review the code and its the the biggest, most complex code base I have seen in my Life, so I decided to get to work. But pretty soon I hit a brick wall and ran out of ideas.

The only solution I saw was to cut the specific part of the code that was giving me trouble while giving as little information as possible and post it on a webpage to ask some experts. It actually worked pretty well, soon enough I got a working solution and was able to continue with the project.

The problem is that I forgot to remove the code and the question from the web page. A couple of months latter, my boss finds out and starts screaming about copyright infringement and how I may get arrested for this.

I am really stressed about this, I did a lot to take all traces of the code off the net.

My Boss is still mad about it, but I really did this to impress him, and to show him that I was able to live up to his expectations. He was the first to believe in me after I got out of college.

In a case like this what should I do smooth over the situation?

closed as off-topic by gnat, paparazzo, Dukeling, DarkCygnus, JasonJ Oct 27 '17 at 18:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking advice on company-specific regulations, agreements, or policies should be directed to your manager or HR department. Questions that address only a specific company or position are of limited use to future visitors. Questions seeking legal advice should be directed to legal professionals. For more information, click here." – gnat, DarkCygnus, JasonJ
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 32
    Your boss told you to be careful with the code (which implies even more so than with other code you see in the course of your employment), and you posted it on the web for the world to see, presumably without first asking for permission to do so. As good as your intentions perhaps were, it seems perfectly reasonable to me for your boss to be upset with you over such a breach of confidentiality. You might perhaps address this in your edit by elaborating more fully on what steps you took to understand the code before making it publicly available. – a CVn Oct 27 '17 at 12:46
  • 14
    FWIW, the preferred way to ask a question on a site like Stack Overflow is to create a small program that reproduces your problem - that should be different enough from the actual code that there shouldn't be copyright issues. – Dukeling Oct 27 '17 at 13:42
  • 3
    When you posted the code, did you change the variable names? – scaaahu Oct 27 '17 at 13:50
  • 16
    You showed 15 lines of code and you could not modify variable names? – scaaahu Oct 27 '17 at 14:10
  • 4
    "The problem is that I forgot to remove the code and the question from the web page." - No, if you post something on the Web you should assume that it is there to stay. This also applies to StackOverflow etc. – Brandin Oct 27 '17 at 17:59
37

In cases like this what should I do?

Learn your lesson, never do it again, and never, ever, ever think that you can completely delete anything that has been posted to the web.

As for smoothing over the current situation, the only thing you can really do is apologize to your boss (which I assume you have already done) and show that this will never happen again.

  • Okay, I already promised to do that, and I did everithing I could to do what is right, you don't really need to kick me while in the ground, I know I did wrong, I came here looking for ideas that could help me in some way to repair what I did, not to increase my anxiety... – Sobyro Oct 27 '17 at 13:17
  • 28
    My answer wasn't meant to kick you -- I apologize if it came across that way. You made a mistake, you cannot undo or fix the original mistake, so the only option left is to apologize, let it go, and don't make the same mistake again. – Dan Pichelman Oct 27 '17 at 13:25
  • 2
    @Orybos This, in no way, kicks you while you are down. It is superb advice, and is written very kindly. Taking it as insulting/mean/whatever is counter-productive. I recommend you give another look at this answer and really take it to heart. – user76296 Oct 27 '17 at 18:03
  • Look up the guy that got arrested for running The Silk Road. He posted on SO and that's how the FBI nailed him. – Nelson Oct 28 '17 at 6:50
24

All you can do is apologize and demonstrate that you've learned the lesson.

There's not much you can do about it now and I'm sure that you'll be more careful about asking for coding help in the future.

Don't forget that it's often better to ask within your own team first.

  • 1
    Just a side note sometimes there is no team... – JonH Oct 27 '17 at 16:55
11

I don´t think 15 out of context lines from a 5000 lines code are likely to be legally considered a copyright infringement. Would have to see the actual code to judge though. ;)

You could try to analyze what you really exposed, but most likely your boss is more upset that you have gone against his expressed orders, and the trust-issues it carries to the future.

I would recommend you find out all the levels where you did wrong and then go with an honest apology together with the assurance you won´t do something like that again. Taking full responsibility and showing remorse is the first step to build trust in these situation.

Points to think about:

  • Breach of confidentiality
  • Insubordination
  • Not communicating when you needed help

Now these are big words for a probably not so big incident. Don´t beat yourself up about this, but understand how this is inappropriate at a workplace. In your defense, you did what you did to get the job done for your employer so there is no malice involved. You learned your lesson and will not do it again. If your boss get´s that message from you, chances are that it´s soon forgotten.

  • 3
    I'm not sure if its been tested in court, but logically a small snippet of code presented for both educational purposes and commentatary seems a classic case of fair use, so I wouldn't be too worried legally. – T.E.D. Oct 27 '17 at 17:30
  • 2
    @T.E.D. I think violating trade secrets and maybe committing gross misconduct would trump that – Neuromancer Oct 27 '17 at 17:45
  • 4
    Copyright infringement doesn't actually matter in this case. Your company would just fire you, not sue you for copyright infringement. – Brandin Oct 27 '17 at 18:00
  • Ask Google and Sun/Oracle about if 15 lines can be copyright infringement. – Ramhound Oct 30 '17 at 0:56
3

I worked at a place where the Senior Programmer posted 16 lines of code, trying to figure out a solution. We had no restrictions, we only cared about getting the work done.

Months later, CIO comes across the post. He laughed, then saw that the 16 lines of code had a hardcoded SU style username and password. He then cried while he had to change credentials for the entire company and update code.

Lesson - never publish something on the internet that you don't want to be public. That post still is around and referenced.

Apologize and let your boss know you learned your lesson. Don't do it again.

  • 3
    Maybe real lesson is don't hire "senior" programmers who hardcode credentials :) – Affe Oct 27 '17 at 18:25
  • @Affe it was a requirement in the thing we were using at the time. – Anthony Genovese Oct 27 '17 at 19:56

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