72

I was asked to participate in an interview with a candidate for a junior programmer job within the company I work in. The interview includes a colleague of mine an HR representative.

Studying the solutions provided to the problems (the initial test), I have noticed that one of them looked quite advanced for a newbie and felt it was not solved by the candidate. I could quickly find the exact solution (same indentation, same structure, just a few variable names changed, so it's clearly copied).

The coding platform explicitly states that completely copying a solution is not allowed (only API documentation, StackOverflow etc. can be used)

I have already told the other colleague about what I found, since the job opportunity is within his department and I recommended to favor candidates that provided their solutions, even if they have less points.

I am wondering how should I react to this during the interview.

  • tell the candidate - this would clearly embarrass him and might also make him cheat more elaborately in the future
  • do not tell the candidate - this could be interpreted as unfair (feedback is incomplete)

Question: How to deal with a candidate that copied at the test?

[EDIT]

Thank you all for the constructive comments and answers. Indeed the process is not OK, as most of the coding problems are at least 2 years old. Unfortunately, I cannot control the process, but I can make a suggestion to my manager to change it (i.e. ensure that problems are changed/updated).

The interview - the candidate showed a modest knowledge and he was unable to demonstrate he grasps the concepts required by the code he has written. My colleague suggested that we think he might have used some code from somewhere else and he was surprised that we figured it out.

Alexei
  • 5,762
  • 8
  • 29
  • 53

7 Answers7

220

You're making assumptions here, we have no guarantee that the candidate did cheat, just a very large suspicion that they did. Rather than confronting them, since you already have an interview with them, ask them to walk you through their solution. Make sure they understood what they wrote and how it works. This should quickly highlight if the person cheated or not.

There is always a chance that they either managed a very similar answer, or are the user who answered the question on SO, and calling someone out when you could be in the wrong isn't the best way to go. It's better to investigate and prove that you are right.

You never know, maybe they are that good and came up with the same answer? If so, you have a strong candidate for the job (Assuming the answer was good) and you haven't burnt any bridges by outright calling them a liar.

If it turns out they did cheat, they should be able to understand they were caught from your questioning. Just let them go with a thanks, but no thanks and leave it at that. Confrontation, especially in an interview setting is not the way to go.

Draken
  • 9,733
  • 7
  • 47
  • 58
  • 36
    Philosophically speaking, I have no guarantee that he did cheat, but having virtually no experience (from CV) on Web development and writing a convoluted JS code that is virtually the same as an SO answer is extremely unlikely. – Alexei Jan 16 '18 at 17:27
  • 64
    Indeed it is, however innocent until proven guilty. You don't know who originally wrote that SO answer, it could be your applicant. It's most likely not and they will fall over on the first query into their code, but better to let them make the mistake rather than you accuse them – Draken Jan 16 '18 at 17:29
  • 174
    "Innocent until proven guilty" only applies to courts of law. The rule for interviews is "No Hire until proven Hire." – stannius Jan 16 '18 at 19:57
  • 2
    If the instructions state you should not copy from the internet, then the person didn't follow instructions or didn't have enough sense to indicate they have already posted the answer. In that case, why make little changes to variable names? If someone has spelling mistakes in their CV, my assumption is they can't spell and not that someone else wrote their CV which would be worse. –  Jan 16 '18 at 20:39
  • 87
    When I was taking an intro programming course in junior high, the instructor was positive my best friend and I were cheating. For tests, he would seat us in opposite ends of the room, write the questions on the board (so we couldn't somehow see mimeographed questions ahead of time), and watch us like a hawk. Still, our answers can back letter-for-letter identical -- even things like comments and variable names. He never figured it out: we were just very similarly minded and solved the same problem the same way. – Michael Lorton Jan 16 '18 at 20:49
  • 13
    @Draken There is no decision in your company that affects your bottom line more than the hiring process. In terms of risk per minute, interviews are the riskiest behavior you do at work.I would rather erroneously reject a good candidate than erroneously accept a bad candidate. And I wouldn't waste time on someone that appears with high confidence to have cheated. – corsiKa Jan 17 '18 at 02:10
  • 1
    I would say a seasoned programmer knows about this issue and would deliberately avoid looking like their own posted SO answer. That's basically what I would do. After answering such questions, I would Google it just to avoid exactly this scenario. I think you can lean towards assuming they cheated than not. I also do agree with corsiKa. – Nelson Jan 17 '18 at 04:53
  • 2
    @JeffO, the instructions stated, to quote the question, "completely copying a solution is not allowed (only API documentation, StackOverflow* etc. can be used)."* It really depends on how long the snippet was. Regardless, this answer gives the best approach. – Wildcard Jan 17 '18 at 05:14
  • 4
    @Alexei "... is extremely unlikely" But that's not the point. We all here agree with you that it's extremely unlikely. Draken didn't say that you should accept their solution--he provided you with a smart way to verify their knowledge that doesn't create unnecessary drama. You asked what you should do about the candidate. Ask him in person to explain his solution is absolutely the right answer to that. You learn what you need to know, and you avoid having to start a confrontation. – GrandOpener Jan 17 '18 at 10:39
  • 6
    ""Innocent until proven guilty" only applies to courts of law." - no, it only legally applies. It's still a good way of thinking, as it removes bias. Your rule for interviews is unnecessary here (and redundant, if you'll pardon the pun), as the discussion is about how to decide whether or not to hire. – Rob Grant Jan 17 '18 at 11:45
  • @Wildcard - Not really. Even if it's a few lines of code and all you changed were the variable names that's pretty much a complete copy for all practical purposes. –  Jan 17 '18 at 20:52
  • @Alexei When you say "experience" are you counting experience that doesn't come from an education establishment? The StackOverflow survey has shown (every year) that most programmers are 'self-taught'. – Pharap Jan 17 '18 at 23:28
  • I like the notion that the candidate needs to understand the answer. Sometimes a solution really is as simple as referring to StackOverflow, but I've had situations where otherwise decent devs would copy a solution from there into our app without knowing why it works. The bad part about that is that some unnecessary stuff can also be pulled in if it was copy and paste with no additional thought. – ps2goat Jan 18 '18 at 00:18
  • 3
    If nothing else, he clearly violated the terms of the SO licence by neglecting to provide attribution to the original post(er), which is a black mark for me. – Lightness Races in Orbit Jan 18 '18 at 01:31
  • 1
    @Pharap - by "experience" I mean relevant experience mentioned in the CV which can be projects involving that language/framework, courses, SO answers etc. – Alexei Jan 18 '18 at 07:43
  • 1
    "but having virtually no experience (from CV) on Web development and writing a convoluted JS code that is virtually the same as an SO answer is extremely unlikely" Why test candidates that claim to have no JS experience for JS experience at all? This is just a waste of everyone's time. – pmf Jan 19 '18 at 09:00
  • Uhm, don't you feel like you're ignoring the (large?) set of people who could explain an existing solution without being able to come up with it? – user541686 Jan 19 '18 at 09:15
82

How to deal with a candidate that copied at the test?

I would not waste your time telling the candidate anything, they will of course deny they cheated. If you are sure he cheated, let the hiring manager know, and recommend he look at other candidates.

If someone will cheat, what else will they do if you hire them?

Short answer: Forget about the cheater and move on to other candidates.

Neo
  • 84,783
  • 53
  • 276
  • 322
  • 11
    But what if he got it from stack overflow? – Sandra K Jan 16 '18 at 18:06
  • 3
    @SandraK Is that an attempt at a joke because we're currently using Stack Exchange, or do you think it matters? – Matthew Read Jan 16 '18 at 18:10
  • 36
    @MatthewRead OP said "copying a solution is not allowed (only API documentation, StackOverflow etc. can be used)". What if the candidate got the solution from Stack Overflow is what I meant. I did not get your comment. – Sandra K Jan 16 '18 at 18:13
  • 14
    If that's exactly what it said, it's ambiguous as to whether you can copy a solution from StackOverflow. As written, it's not just ambiguous, it's baffling. If it's trying to say that you can't copy solutions from any site but can use StackOverflow the same way you can use any other site, why mention StackOverflow at all? It's not an exception or additional restriction. – David Schwartz Jan 16 '18 at 20:01
  • 1
    My guess is they were trained by a college professor who used no tools to see who cheated on their programming work. –  Jan 16 '18 at 20:36
  • 13
    @DavidSchwartz Schwartz No, it's not ambiguous at all. The poster obviously meant that they're allowed to use the site as a resource. That obviously doesn't include copying an answer directly. It's a matter of common sense and parlance. When someone says you may look something up on StackOverflow they are not telling you it's okay to copy an answer directly; they're telling you it's okay to use the site as a resource to learn a concept you were otherwise unfamiliar with. Trying to find a loophole to get around what everyone knows is obviously cheating doesn't make it okay. – BooleanCheese Jan 16 '18 at 21:51
  • 3
    @DavidSchwartz I agree with BooleanChese here, if it's unclear whether you can copy a SO solution, what should we infer about a candidate who copied a solution while changing all the variable names? – Pierre Arlaud Jan 17 '18 at 08:59
  • 3
    @PierreArlaud It could be a candidate who – like some of us – is somewhat unsure whether "use Stackoverflow" means "just read about something on it" or includes lifting snippets of code. Name changes could be to fit with other bits of the code (that they did write). In my job, I will happily lift snippets from SO (credited, and often adapted): probably their biggest fault is not including an acknowledgement that they had done so. I'd go with asking them to explain how the code works, and if they can do that, then no problem. – TripeHound Jan 17 '18 at 09:38
  • The colleagues I've had the most trouble working with were the ones who routinely misunderstood directions and plowed ahead anyway. Might be OK anyway if the job is one where there's significant flexibility in what gets done, or the opposite where requirements are so explicitly written that there's no possible confusion. – user3067860 Jan 17 '18 at 21:15
  • 2
    @SandraK: Using Stack Overflow, and directly copy/pasting from it without any original thought, are not necessarily the same thing. There is a "right" way and a "wrong" way to use SO. – Lightness Races in Orbit Jan 18 '18 at 01:30
  • 3
    @LightnessRacesinOrbit Candidate got the right answer and changed some variable names. That is not copy/paste without thinking. – Sandra K Jan 18 '18 at 01:48
  • 2
    @SandraK: Changing some variable names is not "thinking". – Lightness Races in Orbit Jan 18 '18 at 12:11
  • @SandraK At best, it's thinking about how they might hide the fact that it's copy/paste. That's just more evidence that it was deliberate cheating instead of an honest misinterpretation of the instructions. – Ray Jan 18 '18 at 20:23
50

From what's written (in the question and in comments that were later moved to a chat), it seems the rules presented to the candidate said that using SO is allowed, they found the solution on SO. Therefore, it doesn't appear to me that they cheated, and it would be unfair to disqualify the candidate. But it would depend a lot on the exact wording of the rules were as they were presented to the candidate.

In comments you said,

SO and/or other documentation can be used for small things (e.g. how to efficiently sort some array or list in some language)

Surely this isn't the exact language that was presented to the candidate? If it wasn't explicit what is a "little thing" and what is a "big thing", it seems to me the candidate used resources that were explicitly allowed.

It's your company's obligation to present a question that can't be answered by copy & paste from SO, if you want to allow candidates to refer to SO, but not to copy & paste.

Your best resolution at this point is to use your face to face interview time with this candidate to find out whether they actually have the required knowledge for the position, and revise your screening questions before you present them to the next candidate.

The Photon
  • 678
  • 4
  • 8
  • 12
    Agreed, he found an advanced solution that worked well. Do you want a candidate that would come up with an inferior solution when a better one is easily available?? If you want to avoid copy/paste, then give a task where full copy/paste would be impossible. If you don't so that and reject the good solutions, then I guess you deserve your average developers. – akostadinov Jan 16 '18 at 21:18
  • 22
    You've hit on the big issue here: this was a bad screening question. "Open book" tests should be more advanced than a simple SO question can answer. Moreover, how would you know if another candidate just paid someone to write his answer? Chalk it up to bad screening and interview him. I applaud him for knowing the answer was right. I would still ask him to walk me through his solution, since I don't want programmers who copy/paste from SO without understanding why the answer is what they need. – Bloodgain Jan 17 '18 at 00:11
  • If this is what happened (and I suspect it is), their biggest fault is probably not including an appropriate CC-by-SA acknowledgement. If they can adequately explain the code (whether they wrote it or lifted it), you might want to mention that in the future. – TripeHound Jan 17 '18 at 09:41
  • 1
    @BloodGain obviously the why the answer is what I need is because it worked. lol – BirdLawExpert Jan 18 '18 at 16:25
6

If your company is looking for genius level coders - then select from other candidates who fill the criteria.

If not, you need to redefine your concept of cheating - is it cheating to surf Stackoverflow, API docs, Github to find solutions to problems?

What legal repercussions of this alleged cheating exist? Will the company be sued? Then this candidate is not for you.

Is your source code open? Every reason to hire them as they've proved they're very apt at problem-solving.

If you have any doubts consider that this 'newbie cheater' got the highest scores. What will they do in 5 years time given the opportunity to work with other professionals in a team that can guide them...

And be straight-up in your discussion: let them know that they exceeded expectations (score wise) but voice your doubts and concerns - you'll both learn something new. Diplomacy is a difficult trade -perhaps let the HR rep handle that. Do the good cop bad cop routine.

Imho, if a candidate is code-lit enough to get you what you need then he will definitely be an asset, maybe even take your job when you retire.

The interview could also include a live code test as specified in the comments to assess the junior programmer's understanding of the required languages.

NexusInk
  • 61
  • 1
  • We just had to endure some "Ethics and compliance" lectures. It seems in future you can't sell code you produced if it contains copied material, even if it's from a help site and intended to be copied. We have inspectors who come and actually do a web search on portions of code, to see if it has been plagiarised. Copied code has to be credited properly, and licenced if necessary. Or else you really can be sued. – RedSonja Jan 19 '18 at 09:56
  • @RedSonja Is this status quo regarding the legal aspects for Closed source-code products? What about GPL or MIT (to name but two) licensed code? As far as I know, it is valid (read legal) to utilize freely licensed code in proprietary licensed software – NexusInk Jan 19 '18 at 15:50
  • @RedSonja Are you in the US? This is absolutely not the case in the US – Kyeotic Jan 20 '18 at 05:59
  • I am not a lawyer so I don't know much about copyright law. But in the lecture we heard it was stated that you have to have a valid licence where relevant - we can all agree with that. Even free code has some restrictions if you read the small print. They like you to credit it. Now we have customers who buy the source code from us, not just the executable, and use of copied code is a sensitive area. We state that it's all our own work, and then it isn't. Yes, it's tricky. – RedSonja Jan 22 '18 at 08:11
4

It seems that most people here, make the implicit assumption that moral should be determinant to choose the right candidate. I believe this is a wrong approach. In a job selection process, your goal is to select the candidate which will be the most profitable for the company.

Now, I'm not saying that the moral question (to cheat or not to cheat) shouldn't be determinant. I'm just saying that this question shouldn't considered obvious.

Edits :

  1. The Photon objected that an employee who would cheat in pursuit of profits puts the company at risk of legal and other hazards.

Yes, this is the general people reasoning, but the candidate may believe it wasn't cheating or he wouldn't cause real harm and would know where to stop in real life situation (maybe).

  • We should ask ourselves if all people who ever cheated a school exam in their life, are a danger for their company;
  • also the capability to take risks is desirable for the position;
  • even in some cases the benefits for of cheating are larger for the company than the drawbacks; or even
  • the company would benefit from having someone to bear the blame in their place for some actions (in software prod. for an example : there are known cases of companies having stolen GPLed code in their software. They might be glad to have someone to fire when it is discovered).

For sure, I would not recommend such malpractices, but I just want to illustrated that one shouldn't see thing in black and white. There is much gray in real life situations and one should probably examine such case with a broader point of view than just stick to morals.

  1. If the candidate cheats on a well-designed test (I don't think this one is) then you lose the chance to evaluate their skills.

Maybe, a well designed test would be one that take this thinking in account, and a candidate able to cheat such a well designed test, might be considered smarter that the test design itself.

More edit : As a conclusion, I would add, that IMO, for those reasons but depending on your needs, the wisest choice might be to confront him with your observations and give him the opportunity to justify his action.

Camion
  • 159
  • 4
  • 11
  • An employee who would cheat in pursuit of profits puts the company at risk of legal and other hazards. 2. If the candidate cheats on a well-designed test (I don't think this one is) then you lose the chance to evaluate their skills.
  • – The Photon Jan 16 '18 at 23:04
  • Yes, this is the general reasoning, but the employee may do that believing he wouldn't cause real harm and would know where to stop in real life situation (maybe). Are all people who ever cheated a school exam in their life, danger for their company ? also in some cases the benefits are larger than the drawbacks, or even the company would benefit from having someone to bear the blame in their place for some actions (in software prod. for an example : there are known cases of companies having stolen GPLed code in their software. They might be glad to have someone to fire when it is discovered). – Camion Jan 17 '18 at 04:48
  • For sure, I do not recommend such malpractices, but I just want to illustrated that one shouldn't see thing in black on white. There is much gray in real life situations and one should probably examine such case with a broader point of view than just stick to morals. – Camion Jan 17 '18 at 04:48
  • 1
    Oh and, about the "cheating on a well designed test", I would add that a well designed test would be one that take this thinking in account (e.g.: to evaluate the capability to take risks) , and that an employee able to cheat a test, might be smarter that the test itself. – Camion Jan 17 '18 at 05:00
  • If the candidate doesn't think that cheating will cause harm, that's a reason not to hire them, not a reason to hire them. – The Photon Jan 17 '18 at 17:15
  • 2
    "a candidate able to cheat such a well designed test, might be considered smarter that the test design itself." Anybody else immediately think of Capt Kirk and the Kobayashi Maru ? Reboot version, of course..... – Dragonel Jan 17 '18 at 22:43
  • @The photon : There are cases where a good cheating is desirable. In all generality I would agree with you for many kinds of reasons, but it is generally a good practice to think things outside the box. Take as an example, the debate between Emmanuel Kant and Benjamin Constant about the right to lie : Is it wrong to lie to murderers who ask you about you friend hidden in your house ? Social construct is based on respecting the rules but social evolution is based on transgressing them. The important point is that society need transgression to be kept low, but not to be eradicated. – Camion Jan 18 '18 at 10:28
  • By the way, it is interesting to compare the amount of likes and the reaction on my reply with the others and with the question. It illustrates well the fact that society has a certain amount of questioning about it's rules and uses, and that this amount needs to be kept in a certain range which is small but not null ... And I believe the optimal amount is something that comes from natural selection : the right amount gives and evolutionary advantage to the groups which are near to it. Not enough hinders the group capability to adapt to circumstances, but too much breaks the trust. – Camion Jan 18 '18 at 16:17