62

I've had a technical interview with one person (software development) and I don't usually request for code samples. Reasons aside, this one person offered to show me code that they've been doing for their current employer.

Should I accept? Could I keep a copy?

Here are the reasons why I think I shouldn't:

  • It is another company's property
  • I don't yet have any legal arrangement with this interviewee or their company
  • Even if I didn't ask, there's no proof of that, so I could not defend myself if i got into trouble

Here are the reasons why I think I should:

  • It is really valuable information, specifically when evaluating on code quality and cleanliness
  • They said it was fine, since they could always write it again
  • The most raw information I can receive from a candidate helps in validating my assessment with other evaluators

For context, I work in the US, but I was seeking for answers not giving legal advice, but rather is this is common/uncommon or advised/unadvised for companies to do.

Alpha
  • 833
  • 1
  • 8
  • 13

13 Answers13

134

No, you should not accept their offer, and you should absolutely pass on this candidate. This is horribly unprofessional and in the USA would widely be considered unethical.

Anyone willing to offer code from their current employer without properly explaining why they can do so is someone who clearly has a disregard for intellectual property. The reason they gave you is laughable.

You don't want that person at your company. Why would you expect them to treat your IP any better?

Why immediate no-hire

My answer ignores the "how to accept the code in a way that doesn't get you fired or in legal trouble" piece of the question, because it's irrelevant because you should not accept the code samples and not hire this candidate. It would also be very different if the candidate had a good explanation for why you could see the code (e.g., it was open sourced and available on GitHub).

But then you wouldn't be asking this question. You would have just clicked on their GitHub link.

If someone is interviewing for a software development position and doesn't make it 100% clear to me when volunteering to provide proprietary code why it's permissible, I don't want them on my team.

Why should I trust this candidate with my company's code if we hire them?

Why should I even trust the candidate wrote the code they give me (another advantage of GitHub vs. proprietary)?

If I, as an interviewer, have to ask a candidate who tells me they would just "write it again" for me whether they have appropriate IP and license permissions to share that with me, it proves they don't have a proper professional understanding of how important this is. Part of being a professional software developer involves knowing and respecting this, particularly given how easy it is to copy an entire codebase.

I don't want that person working for my company.

jwodder
  • 123
  • 1
  • 3
  • 7
enderland
  • 110,742
  • 49
  • 328
  • 478
  • 30
    unless, of course, the other employer has open sourced this code or already has an NDA in place specifically around this project and that specifically allows this code to be shared – atk Oct 22 '16 at 17:06
  • 27
    @atk sure. But that would fall into "properly explaining" and this is what the OP said: "They said it was fine, since they could always write it again" – enderland Oct 22 '16 at 17:25
  • "and in the USA would widely be considered unethical" if the question wouldn't be specifically asking about it, you could drop "in the USA", because this is widely considered unethical. – I'm not paid to think Oct 23 '16 at 00:34
  • You know that the candidate is illegally providing third-party IP. Dispose of it unless you intend to provide it as proof to law enforcement. If that company finds out you had a copy of their own IP illegally, it can taint your own code bases, and your dev team gets to go through a 2 week auditing process while very expensive lawyers and P.Eng.'s get to interview your staff (happening a few companies back when a lazy junior dev copy-pasta'ed Apple code into a core S/W stack. ) – Cloud Oct 23 '16 at 01:06
  • 18
    Maybe it's because I've had remarkably nice and patient managers, but if he's a junior developer, I think he should be given the benefit of the doubt. Don't accept the code, of course, but don't make the situation a deal-breaker, either. This is an opportunity to teach the candidate why what he suggested is a Bad Idea and see how he reacts. His follow-up reaction can then feed into your decision (not) to hire him. – Pedro Oct 23 '16 at 02:39
  • 4
    Depending on the person's experience, though, you may want to send them a note -- if they're fresh out of college, for example (and the previous employer was someone they interned with or did a co-op with) they might have no idea this is unethical. –  Oct 23 '16 at 03:22
  • I am curious @enderland if you would change your opinion if the user had offered to show you what his code does, instead of the code itself? You do mention "validity of code" but I'm curious if showing functionality is an issue as well? I was also going to ask if he had permission, but that falls under your "properly explaining" comment, imo. – XaolingBao Oct 23 '16 at 05:03
  • 2
    @XaolingBao the issue is being willing to show me proprietary code with an explanation that effectively says, "I don't care about my company's IP." There is the possibility it's a naive mistake, in which case it could be corrected, but if I'm interviewing for a fulltime position that's not a risk I want to take. – enderland Oct 23 '16 at 12:56
  • 1
    This answer assumes the code in question is not allowed to be shared. There are many cases when a company may allow a departing developer to share some of the code base with interested third parties. If that is the case this answer is exactly the opposite of correct. – coteyr Oct 23 '16 at 23:29
  • @coteyr in that case, the interviewee wouldn't have told the OP: "They [the candidate] said it was fine, since they could always write it again" and instead would have said what you just said. – enderland Oct 24 '16 at 01:30
  • 1
    If it's a junior dev, hopefully you will tell them the reason they were not considered. It could be a dumb mistake due to ignorance. –  Oct 24 '16 at 07:49
  • @enderland should a person in OP's situation notify candidate's employer about this issue? Is it a good idea or it could damage one's reputation? – CodingFeles Oct 24 '16 at 10:21
  • 3
    How much of the boilerplate garbage code your employer owns is revolutionary to such an extent you would even care? The answer is bugger all. – Gusdor Oct 24 '16 at 10:26
  • 1
    @Gusdor ask your current employer and their legal department, "hey, most of our code is pretty boring and not really that unique. I copied and forwarded a bunch of it to someone who works for a different company, do you care?" – enderland Oct 24 '16 at 12:08
  • 2
    @enderland @coteyr in that case, the interviewee wouldn't have told the OP: "They [the candidate] said it was fine, since they could always write it again" and instead would have said what you just said. Justification aside, "It was fine" could refer to the current employer giving permission. In which case, the vagueness of their answer would not constitute violating IP, just poor communication. Don't fall into the same trap you're accusing the candidate by making assumptions. I agree with your point, but I think OP should verify whether the candidate has permission to share IP before nixing – MoondogsMaDawg Oct 24 '16 at 14:28
  • 2
    It's a little funny that they are claiming they could "just" write it again, which implies it's easy, but didn't bother to do so. So even if they were correct it would still be a red flag. – psr Oct 24 '16 at 16:20
  • 1
    @enderland, it would depend greatly on the programming language and context. HTML, CSS, and JavaScript on a public website are drastically different the user authentication service that runs on a secure server. – zzzzBov Oct 24 '16 at 16:40
  • @I'mnotpaidtothink You may be surprised at the variation in norms around IP around the world. In Korea the expectation for university classes is often the class chips in for one copy of a textbook then takes it to a book photocopy service that are common just off of campus and makes a copy for everyone who chipped in. The US view is not the only view. – Myles Oct 25 '16 at 20:25
  • @Myles it's certainly not (and it isn't the one I have). But that example from Korea is a bit different. I doubt that Korean book authors and publishers would agree to this practice in general. It's also education, which is not necessarily the same as a workplace. Third, this is not much different from what a library does. – I'm not paid to think Oct 25 '16 at 20:37
65

Ask the candidate about the situation.

You actually don't know whether the candidate has been given permission to disclose this code. Rejecting them out of hand without knowing that is an overreaction.

Ask them explicitly if they have permission. You will presumably get one of these answers:

  1. Yes I have permission. With a plausible reason. It's up to you if you take them at their word. If it's clearly not critical to the company, and they have told you they have permission, you are not going to get into trouble.
  2. I didn't think about permissions. Remind them that all their work is confidential and any employer who hired them would expect code to be treated confidentiality, including you. Delete any copies of the code you have. Pursue or not, depending on if you think they have learned their lesson.
  3. I don't care about confidentiality. Instant reject. Don't forget to delete that code.

The one response you talked about was "It's fine, since I could always write it again." Your answer to that is going to be "Then write it again, and give me the new version."

DJClayworth
  • 84,823
  • 25
  • 192
  • 283
  • 9
    In the US, IP is serious business, you wouldn't even want to engage with a candidate at this level, it is way too risky, not just for the interviewer, but also the company they work for. I was in a similar situation as an interviewer once, and best I understand it, the only correct response as the interviewer is to immediately and categorically decline such an offer and notify the hiring manager of what transpired (the hiring manager can then follow up with the legal department if deemed necessary). – njuffa Oct 22 '16 at 19:38
  • @njuffa "This code has been open source for ages, sorry I thought you would know that. It's my mistake for not properly communicating that." That would be lucky if it were the case, but I think it's perfectly fair advice to err on the side of communication. –  Oct 22 '16 at 19:46
  • 7
    @djechlin I see no way of making a determination of the legal status of some code in the course of a 45-minute interview, and it would be way too risky to simply believe the assertions of the interviewee. Depending on what business you are in, it may be risky even to study a piece of open source code, if it is under a viral license like GPL. – njuffa Oct 22 '16 at 19:53
  • @njuffa "it's under the MIT license which is posted on its github" sgtm –  Oct 22 '16 at 20:13
  • 19
    ""Then write it again, and give me the new version." - Select all, Copy, Paste, delete a few comments, done that! You have no way to know that the candidate actually "wrote it again". You don't even know if the candidate wrote the first version you were offered - anyone at his/her current employer might have written it. – alephzero Oct 22 '16 at 21:23
  • It could be very generic code the company just would not consider propriety. He might say most of this is already in the public domain as I posted code on SO. I had permission to post on SO. – paparazzo Oct 22 '16 at 23:16
  • 1
    @Paparazzi If a piece of code is trivial enough, it might not fall under copyright or patent restrictions; and, a trivial piece of code would also be useless for evaluating a candidate. – employee-X Oct 23 '16 at 03:56
  • @jpaugh I did not say trivial and I don't have a question. – paparazzo Oct 23 '16 at 09:42
  • @njuffa How is it risky to just look at code under GPL? – Marc Stober Oct 23 '16 at 13:49
  • 1
    @MarcStober "Risky" may have been too strong a word, "potentially problematic" may be better. It may be best to avoid any possibility of "subconscious copying" to ensure "independent creation" of your works. – njuffa Oct 23 '16 at 14:30
  • @Paparazzi I only meant that any piece of code which the lawyers okayed to use from another company would be trivial. If the code was generic in the sense of "open source," then of course, there would be no problem. – employee-X Oct 24 '16 at 17:04
  • @njuffa I find your statement mysterious as well. Do you mean, problematic/risky for a devs, or hiring manager? As a dev, I look at open source code quite often, and quite prefer it (at least personally); if your industry has such strict legal parameters, I suppose we'll never find ourselves as co-workers. – employee-X Oct 24 '16 at 17:08
  • @jpaugh You don't know lawyers would only OK trivial. It could be a C# implementation of TF-IDF Cosine Similarity in which the algorithm is in the public domain. – paparazzo Oct 24 '16 at 17:10
  • I see where you're coming from, now. If the algorithm is public domain, then that's a different story, again. But without further context from the developer, the OP (and the OP's lawyers) must assume that the code is proprietary. In that case, copying even trivial sections, while it might be legal, might still garner a lawsuit. (Example: Oracle's claim in Oracle vs Google to own rights to an API is laughably ridiculous to me (as the whole point of APIs is to standardize interactions between different users), but the courts have taken it seriously till now.) – employee-X Oct 24 '16 at 17:13
  • @jpaugh I am not a lawyer. My layman's understanding is: (1) Research has shown that subconscious copying routinely occurs in humans (2) US courts have held that subconscious copying is not a valid defense in copyright cases, important is only a factual finding that copying occurred (3) incorporating any code under a viral license into a code base subjects the entire code to the viral license's provisions. Therefore: When working on closed-source code, I never read patents (risk of "willful infringement") and also no relevant GPL'ed code (risk of "subconscious copying"). Your take may differ – njuffa Oct 24 '16 at 17:44
  • @njuffa Now I understand. By "viral" you mean self-replicating, referring to the GPL's restriction against reusing it under a different kind of license. I thought you meant it was risky to use any open-source code at all, including, say, MIT-licensed code, which allows reuse in proprietary contexts. – employee-X Oct 24 '16 at 17:55
  • 1
    Thank you for this answer. It surprises me that so many people are assuming that the code in question is proprietary, when we've only been told that the candidate wrote it for his or her current employer. It could be for an open source project of that employer, for all we know. – David Conrad Oct 25 '16 at 10:33
15

Sharing code with an interviewer is a blatant violation of the Software Engineering Code of Ethics and Professional Practice:

2.05. Keep private any confidential information gained in their professional work, where such confidentiality is consistent with the public interest and consistent with the law.

From your question, I'm guessing that the candidate did not get permission to share the code. Code is owned by the employer, and confidential, unless stated otherwise; so, in this case, this is unethical behavior and you absolutely not accept the code. In fact, dismiss the candidate immediately.

Edit: To clarify, the ACM's SE Code of Ethics is not law. It is a simple set of guidelines as to the "do's and don'ts" of our industry. However, many universities and employers are adopting the code as our standard set of ethical guidelines, making sure that students and employees are aware of the code, and follow its practices. E.g. in my computer science degree, I've had at least 4 significant projects involving the SE Code. Many employers in my area also test candidates with ethical questions during interviews, expecting them to have knowledge of the SE Code and to employ it in their responses.


Aside:

You mention that you want to be able to gauge a candidate's ability to write code, assess its quality an cleanliness, etc., right? Well, have them do some simple programming task that requires a bit more thought that the typical FizzBuzz questions (which are designed to weed out non-programmers, or incompetent programmers).

Personally, I would aim for a question about describing a real world system in code, and not some complex algorithmic "mathy" question, but of course what you ask is dependent on your industry.

Chris Cirefice
  • 1,529
  • 1
  • 11
  • 21
  • 1
    Thanks for the feedback. Yes, having a programming exerceise is something I'm debating myself -- but that's probably for another question. Great stuff bringing up the Code of Ethics -- I think most of us found out it exists with your answer. – Alpha Oct 24 '16 at 22:39
  • It would only be a violation if it is confidential information, which assumes facts not in evidence. – David Conrad Oct 25 '16 at 10:34
  • I have to wonder - what percentage of programmers in the real world are even aware of this stunningly verbose document of the ACM's, much less feel the need for it? Or even the ACM itself for that matter. Not that I disagree with the noble intent... – MickeyfAgain_BeforeExitOfSO Oct 25 '16 at 12:13
  • @mickeyf Many universities (at least in the US) are making ethics a part of the curriculum for a computer science degree. I think it's a good idea to have a set of ethical guidelines for our industry, just as many others do. It helps clarify what our responsibilities are to ourselves, our employer(s) and the public. – Chris Cirefice Oct 25 '16 at 12:44
  • @DavidConrad well, considering that the question was even asked in the first place, I think it's fair to assume that the candidate did not explicitly say they had permission from their employer, meaning that we can assume that it's confidential information. – Chris Cirefice Oct 25 '16 at 12:46
  • Software Engineering Code of Ethics and Professional Practice - erm, I never subscribed to this... and I suspect few others did either. Seems like a self-appointed authority to me. It is almost certainly a violation of the employee's current contract - which is the only code they are bound by. – Ant P Oct 25 '16 at 13:21
  • @AntP Of course you didn't subscribe. ACM isn't an "authority", nor is the SE Code. See my answer edit for clarification. – Chris Cirefice Oct 25 '16 at 13:41
  • @ChrisCirefice that's my whole point - citing an ethical code meaningless unless that ethical code is already established and accepted by the parties you are citing to. – Ant P Oct 25 '16 at 13:46
  • @AntP I disagree. On reason I posted this answer is to make people more aware of the existence of the code. Moreover, those that do know about the code can cite this particular passage as a means to determine the ethicality of, e.g., the question asked by the OP. How do you think such guidelines start to be adopted? By spreading the word and using them in practice to solve problems. That's exactly what I'm doing here. – Chris Cirefice Oct 25 '16 at 14:03
  • 1
    Spreading the word and trying to get a code adopted is one thing (the need for a de facto written code of ethics in software engineering is beyond the scope of this discussion) but citing it as an answer to a question is only valid if the code already has established authority in the group within which it's being cited. You can't invoke the rules before the rules have been agreed - it's meaningless. – Ant P Oct 25 '16 at 14:07
  • It may have been appropriate to mention the code as an aside, but treating it as the basis of your answer doesn't mean anything unless its authority has been established already. – Ant P Oct 25 '16 at 14:13
  • Let's continue this discussion in chat. But I think we'll have to agree to disagree here, not much more that either of us can say, and we've both made up our minds. Let the votes decide! – Chris Cirefice Oct 25 '16 at 14:48
  • @ChrisCirefice It is absolutely not fair to assume, and there's no reason for OP to assume anything when OP can simply ask the candidate. – David Conrad Oct 27 '16 at 07:19
10

I would decline the candidate's offer of his employers code AND I would further notify the candidate that he is no longer under consideration for employment with the firm.

Whatever code from his employer he is offering for inspection, rest assured that at some point in the future when he'll be looking for another job, he will do to you what he is doing to his current employer.

Of course, the picture gets worse for your candidate if your candidate signed on an NDA with his current employer because now, he is in possible violation of that NDA. Again, rest assured that if he is willing to violate his current employer's NDA, there is nothing to stop him for doing the same to you when at some time in the future, he is interviewing with his next prospective employer.

If you need to evaluate your candidates' programming capabilities, review their Githubs and/or give that candidate a take-home project of your devising. Then have the candidate review their code with you.

Vietnhi Phuvan
  • 72,342
  • 8
  • 133
  • 268
  • This seems harsh but I do think its the right answer; informing them why is a courtesy that they will hopefully learn from in the future but I do think it is a serious enough issue that I'd struggle to trust such a candidate with our own code base. There's the obvious "Oh but it's open source" get-out and that might mean I wouldn't go in all guns blazing from the start when talking to them about this, but that's about as far as I'd go. – Rob Moir Oct 23 '16 at 13:22
  • 1
    @Rob Moir - I wouldn't take somebody's word "It's Open Source" at face value. What if it were your code that this candidate is unilaterally declaring as Open Source? If it's truly Open Source, then it should be in a public Github repository for all to see including their current employer. Having an employee who has zero understanding of Open Source licenses declaring part of your code as Open Source - that's an existential threat to your code base. See the terms of GPL v2, for example.Under the terms of the GPL v2 license,if you include any GPL v2 code in your app, then your app is Open Source – Vietnhi Phuvan Oct 23 '16 at 13:42
  • Believe me, Vietnhi, I share your concerns and wouldn't take their claim at face value; it would just buy them a chance to explain themselves before I consigned them to the trash pile but it would need to be a good explanation that was backed up by more than just fast talking. – Rob Moir Oct 23 '16 at 14:05
  • I amazes me that programmers say this stuff at the same time as other interviewees are asking "if the company I'm interviewing at wants my facebook username and password should I supply them". Yes, saying in an interview that you will disregard confidentiality agreements is a bad idea! And if a candidate does that you should not hire them. – Móż Oct 24 '16 at 22:34
  • @VietnhiPhuvan Open source existed long before Github was created. – David Conrad Oct 25 '16 at 10:35
  • @David Conrad - so what? You're not handing me code out of your private repository and claiming it's Open Source. If your allegedly Open Source code is not stored where everybody can see it, screw it - I am not interested. I want to see both your hands with open palms, and they had better be clean. – Vietnhi Phuvan Oct 25 '16 at 18:06
  • @VietnhiPhuvan There are innumerable places it could be stored "where everybody can see it" that are not Github. Github has no monopoly on open source development. – David Conrad Oct 27 '16 at 07:18
9

The easiest way to think about it is: slightly modify the situation. Imagine if they wanted you to sign an Non-Disclosure Agreement before showing you the code. But you had never expected to look at their code. Would you sign? No. You would want the company lawyers to look at the NDA first. The NDA doesn't just apply to you, it can apply to your entire company. You don't want that responsibility.

You have no idea if the interviewee has the right to that code. You have no idea if it owned by another company (one of their customers), if it a company secret, or even worse owned by the government.

I would politely decline the offer to see the code. I would also make sure that I highlighted in my notes that they offered, and I said no.

I would discuss this issue with my managers and others doing the interviews. It might even be seen as a negative in our evaluation of the candidate.

mhoran_psprep
  • 72,299
  • 8
  • 131
  • 233
  • Upvote for recommending to (1) document, in writing, what transpired (2) notify the hiring manager right away. The likely outcome (in my experience) is that the hiring manager will cancel the rest of the scheduled interviews and dismiss the candidate. – njuffa Oct 22 '16 at 20:30
4

Everyone is addressing the issue of the company's permission to release this information, but I think one aspect of the issue being overlooked is this:

Is the data proprietary in nature?

Is the code being offered proprietary in nature? Is it a library written that solves a general ubiquitous problem or serves as a common cog in many systems that does not give the recipient of that code any real advantage over or unique ability compete with this employer? For example, is the code he is offering a library of mathematical functions that enable a language that does not include built in trigonometric functionality to do trigonometric operations and nothing else? If so, I really don't see how this in any way harms the IP of the employer, in fact I think things like that should be released publicly on GitHub. On the other hand, if this code is a key part of a proprietary system that reveals the schema and mechanism of any internal workflow, internal financial data, or functionality of the company's applications, then this is a problem. Again though, if he is simply revealing something that solves non-proprietary problems ubiquitous to the coding community, then I would be inclined to say it is no harm - no foul.

Still it would be courteous to ask before sharing.

  • 2
    It may be no harm caused (in fact I suspect it would be no real harm caused even if proprietary). However it this case, it demonstrates a kind of lazy attitude. The candidate could consider writing some code specifically to share, but instead is willing to take an easier route that may or may not have moral concerns attached. Some might call that pragmatism, or in this answer's case not being "courteous", but as an employer dealing with any potential employee working with IP, I think concerns go beyond that. – Neil Slater Oct 23 '16 at 07:06
  • yes! thank you. very little code is actually proprietary information. mostly it is just code. – Rostol Oct 25 '16 at 01:28
  • 1
    The purpose/use of the code is irrelevant if it doesn't belong to him. He may have written the code, but that doesn't mean he owns it and is free to share it. – Chris Schneider Oct 25 '16 at 14:39
  • All the code I write for work is proprietary in nature. – HLGEM Oct 25 '16 at 17:42
3

The situation is fishy but I agree it's better not to jump to conclusions before you have to (as an interviewer you might just have to). Showing you a screenshot of code demonstrates a different color of judgment than dumping you a repo. I'm less interested in ethics of any action a candidate took and more in judgment and thought process that led to said actions, which can permit some wiggle room, some of the time. But this?

They said it was fine, since they could always write it again.

Did this actually happen? Translation: "I own everything I wrote and don't bother trying to convince me otherwise. I either don't know about basic business ethics and laws or I just don't care." I would hard-pass on this candidate.

  • Thanks for putting my thoughts in words. Yes, that was off putting. – Alpha Oct 22 '16 at 19:52
  • @Alpha thanks. enderland's answer was pretty comprehensive but I thought the way that line jumped out to me was particularly telling. –  Oct 22 '16 at 20:13
  • Sounds more like a "this is highly general-purpose and non-specific code that has no intrinsic link to my current role and could have been written by me or by anyone else at any time in the same form" argument to me – Lightness Races in Orbit Oct 24 '16 at 00:55
  • @LightnessRacesinOrbit that's a great example of an opinion that isn't relevant to whether a developer owns something they wrote. For instance you could maybe use that opinion to convince the company to license the code e.g. as open source. –  Oct 24 '16 at 04:59
  • 4
    @Alpha honestly the more I think about this it really just sounds like ignorance. At some point in my life I learned that what the interviewee did is wrong. I definitely didn't learn it in kindergarten or during my non-business, non-engineering college major. Is it really that surprising if the interviewee's boss didn't explain this? If I were loose with my ethics, that would imply I understand them well enough to know this might off put a future employer. Not saying "hire," just trying to figure out what to make of this candidate. –  Oct 24 '16 at 05:05
  • @djechlin: Can't disagree with that – Lightness Races in Orbit Oct 24 '16 at 08:55
2

Its okay, if he is just giving an idea as per his work. That is the only way to represent yourself in any interview. You explain your past experiences and solutions.

I cant imagine that someone keeping exact code with him in any interview. Or if he has or providning thorugh email then what is the gaurantee that he has written that code. May be by this he is trying to grab an opportunity. Simply throw him out with respect :D

user59158
  • 21
  • 1
2

No. And No.

But...

We don't know yet the experience level of the interviewee.

In many fields, especially those that are creative in nature, a 'portfolio' of previous work is required, and not bringing it to an interview is enough reason for no hire.

A resume/CV/developer story is cool, but doesn't tell as much as the exact logos that were created in the graphic design gig, or the short story you had published, or a video of a lecture you presented. It can even be code/software you create for a class or on your own time. And an internet search for "interview portfolio" finds some passionate views that such a portfolio is a good idea.

Say this is their second job out of college, they got their first job with a portfolio, and a respected mentor/professor/parent not in software engineering told them they always needed a portfolio for any interview. Mentioning it without actually bringing in and handing over the proprietary code may actually be a step in the right direction, and indicative that they understand intellectual property generally, but don't know how to handle the specifics yet.

If this position is very junior, that is not necessarily a problem, and actually could be used by the interviewer to see how they treat new information (in a field they aren't familiar with, law) that contradicts respected authority. That requires an experienced and motivated interviewer though, in order to polish diamonds. An interviewer that takes the time to pose a question here about a specific case may just be that interviewer.

On the other hand, if this is their 5th job, 10+ years in the field, and cavalierly throw around intellectual property, I'm not sure you could turn that around.

CWilson
  • 456
  • 4
  • 13
1

No, you should not look at the code sample. It doesn't really help in the interview decision because you cannot be sure of the following:

  1. Did he write it?
  2. How long did it take?
  3. How much help from the internet did he get?

None of these questions can be definitively answered in an interview.

Now, present white board and give a technical challenge to solve in code. That way you can see how he thinks about code, does he know the language? Or rely on intelisense? You can add constraints and see how flexibly he thinks.

All of these help you decide how much support this person would need to do the role you are trying to fill.

Michael Shaw
  • 1,497
  • 9
  • 10
  • I think this is good advice but it doesn't directly address the question that was asked – Bradley Thomas Oct 24 '16 at 21:49
  • 2
    I disagree. Having code and explaining it will allow him to talk of design decisions that he already knows about, so if I don't get a good explanation out of that, I know I can weed him out. A new problem might be challenging, ambiguous, or way to easy, or not fit for the length of an interview (which should not abuse the interviewee's time). Yes, I won't know who and how it was written exactly, but the discussion about will tell me that. – Alpha Oct 24 '16 at 22:46
1

For a more practical reason to say "no": If you have a good system for evaluating candidates, you shouldn't be using extra material from one candidate that you wouldn't ordinarily look at from other candidates.

That said I'm going to disagree slightly with some of the other people who answered here, in that if it's a minimal amount of code, not specific to the previous business, it's not such a big deal in the whole scheme of the discussion that goes on during an interview and which, necessarily, will touch on what a candidate did for a previous employer. Relying on Open Source contributions or making a candidate write sample code just for you has its own issues because that's making them doing unpaid work and might not be a good example of they work they'd do on the job.

Marc Stober
  • 147
  • 6
1

First before you can answer the "is common/uncommon or advised/unadvised" you have to answer another question.

Does the candidate have the right to distribute the code?

If they do then this is common and advisable. Some examples of where the developer would have this right:

  • Open Source Project
  • Agreements with companies for existing IP the developer wrote on his own time.
  • Agreements with previous employers to use part of a code base when looking for new work.

As a freelancer, I do "work for hire" which means the code I write is the property of the person that pays for it. That said, I commonly make arrangements to open source, or retain rights to, parts of my work. A good example is a modification I made to active merchant to add a card processor. I spoke with the company, and with their permission, open sourced those modules and added them back into Active Merchant. If someone asked me for a code sample, I could provide that work with no need to get new permissions.

I also keep agreements with clients to be able to talk about and share parts of their code with perspective employers.

It's very bad to assume the developer does not have permission to share the code in question. They very well may have all the permission they need.

If they do not have permission to share the code in question, then you should just pass on the candidate. It's usually illegal (IANAL) and certainly unprofessional to share code when you don't have permission to.

Establishing permission to share code, at this level is easy. Just ask. You don't need any fancy paper work, or long legal stuff. Just ask the candidate. Your not going to use the code in your projects/software so there is no real risk there. They (the candidate) are on the hook for sharing, your not, so long as your not asking them to provide that specific piece of code. (Remember IANAL)

coteyr
  • 9,486
  • 1
  • 21
  • 34
0

I would just ignore any future communications with this person. It's highly unethical and probably illegal what they're suggesting and I would see no need to engage in any further dialogue with them. Their email address would go straight to my spam filters.

I wouldn't bother informing them or anything else. I don't have a productive reason to. I already have all the information I need about them.

Kilisi
  • 222,118
  • 122
  • 486
  • 793
  • 1
    If the interviewer has time to ask on SE about a specific case of a specific interview, they probably have time to write a rejection email. Not saying everyone needs to, and not saying @Kilisi should make the time. But I would. And I expressed that disagreement with a downvote. – CWilson Oct 25 '16 at 14:08