I'm new to professional software development for a company. I had an interview, and it went well. They emailed me a technical challenge with a few different parts. They said there were no time limits, it's open book, and I can use the Internet. I have a tendency to overthink things and was wondering, in theory this means I can learn anything I don't know so I can answer the questions fully and correctly. Am I looking at it the right way?

One of the questions was to implement a responsive horizontal navigation bar for a website. I can't do this without consulting references. But it's not hard to find fully worked examples and their source code online. I would consider just copying them cheating, but does it really make a difference if I understand them and then copy the code? Obviously I wouldn't get someone else to do it for me and would only use existing examples on websites like W3Schools.

  • 71
    This sounds awfully like work-for-free maskerading as a technical test... Be wary
    – HorusKol
    Commented Mar 13, 2017 at 6:40
  • 17
    @HorusKol: If there are worked examples already online, this seems like a typical academic exercise. If anything, it will be too bland and theory-based to relate directly to work. Commented Mar 13, 2017 at 7:54
  • 11
    Just make sure you don't take a month to do. There was a similar question some time ago, I'm pretty sure they never contacted the candidate when he took a month to make it pretty. Commented Mar 13, 2017 at 10:14
  • 7
    Why not ask the company? Commented Mar 13, 2017 at 13:03
  • 4
    The main reason I'd not just copy a working example is that at a subsequent interview they may ask you to just "alter what you did last week" to add a feature, or ask you to explain how it works.
    – TripeHound
    Commented Mar 13, 2017 at 14:57

8 Answers 8


If I gave a developer a task such as 'Create a responsive horizontal nav bar', I'd be very disappointed if they spent hours creating it from scratch when there are so many viable and correct solutions already out there. You don't have time in the real world to create the perfect solution every time,

  • 6
    If I assign the task "create X" but instead you just copy and paste and turn in someone else's X, why shouldn't I be disappointed?
    – Brandin
    Commented Mar 13, 2017 at 7:52
  • 76
    @Brandin because this isn't high school any more. Copying isn't bad (As long as you follow licences). Someone who takes something of the net and modifies it to do the just instead of spending 10 times that amount of time trying "re-invent the wheel" is more cost effective of companies.
    – Snowlockk
    Commented Mar 13, 2017 at 8:33
  • 25
    @Snowlockk: I would note: copying is fine as long as you have a minimum understanding of how the thing works. Most notably, of how to use it correctly, what are its edge cases (if any), etc... do remember than once it's in your codebase, you're responsible for maintaining it. Commented Mar 13, 2017 at 8:51
  • 15
    @MatthieuM. In my experience what is on the net is very rarely a copy, paste and forget thing. Most times you need to modify it to fit what you want it to do. In the course of doing this you should you understand it.
    – Snowlockk
    Commented Mar 13, 2017 at 8:55
  • 3
    For the example given, my expectations would be like @Brandin 's for 'Create a responsive horizontal nav bar', but inline with yours for 'Create a page with a responsive horizontal nav bar'. To me the former reads as an explicit request to make the nav bar, not just to find and reuse something from elsewhere. Commented Mar 13, 2017 at 14:05
  1. Pretend you're doing this for a real job
  2. Be legal (i.e. educated on when attribution is necessary and follow licenses)

This naturally will involve pretty aggressive searching online and adapting full solutions. A full copy/paste is rarely what works in the real world even if it's often a good start.

"No time limits" may even be a hint of the form, "this will take you a very long time if you build things from scratch and mere minutes if you use StackOverflow."

  • 26
    point 2 is important
    – Kilisi
    Commented Mar 13, 2017 at 4:19
  • 33
    IMO the "unlimited time" is also a hint to "we're gonna ask how what you've choosen works, study it".
    – Martijn
    Commented Mar 13, 2017 at 8:07
  • 1
    While this is good advice, I feel it's a bit too strong for the Software Development world - using sources from the web is pretty common practice - as long as it's not being ripped directly, there should be no problem. That being said, that also depends on how the interviewer is 'grading' this project, so I'm not going to downvote this, on the grounds that someone doing the interview with little tech expertise might see a problem with direct copying (and really, it shouldn't be entirely copied anyway). So I'd say, just be careful.
    – Zibbobz
    Commented Mar 13, 2017 at 13:15
  • 4
    @Zibbobz I almost never copy & paste code directly, and even when I do I often end up modifying it later anyway; there's almost always some variable names that I can improve or other minor modifications to make. But for adapted code, or even for a technique I learned from a particular source (without actually copying and pasting any code), I always provide attribution, even if it's just a link in a comment to a StackOverflow post. Commented Mar 13, 2017 at 16:28
  • 2
    Regarding point 2. Source code licensing is extremely complicated. I always leave a link for where I found it from and hope that covers me. I know the knee jerk reaction is "consult a lawyer" but consider this situation in context, it wouldn't make sense to pay a lawyer to ask if you're attributing the code right for one question in a technical interview.
    – finjjj
    Commented Mar 13, 2017 at 16:30

If you are allowed to use the Internet, you're also expected to copy-and-paste from existing Internet sources. In fact, a well trained software engineer is also someone who can read somebody else's source code and modify it for custom use. Only inexperienced engineers would start from scratch when there's good existing alternative.

Obviously, the challenge is about how you would work if they hired you. Be smart, be efficient, modify existing solution but pay attribution and look at the license (GPL?).

  • 22
    "If you are allowed to use the Internet, you're also expected to copy-and-paste from existing Internet sources" - No.
    – Brandin
    Commented Mar 13, 2017 at 7:52
  • 1
    Regarding licensing: it's a nightmare. Some of the websites I find code at have license models so complicated I can't understand them. It wouldn't make sense to hire a lawyer each time you find code on the internet, so what is one to do? I always link back to where I found it and hope that covers me.
    – finjjj
    Commented Mar 13, 2017 at 16:32
  • 2
    Just find something that's uses the Apache, bsd, or MIT licenses and avoid GNU like the plague. Works for most situations. Also, most 'open' licenses are a lot more friendly if you simply 'use' them as opposed to digging into the code and tweaking it. Modern SO contributions are MIT: meta.stackexchange.com/questions/271080/…
    – Jeutnarg
    Commented Mar 13, 2017 at 17:22
  • @Jeutnarg Or use something licensed under the GPL (not LGPL) on purpose to keep the company from using it in their commercial/proprietary product...
    – user
    Commented Mar 14, 2017 at 10:00

If the company conducting the test has half a clue, and you're called in for another interview afterwards, you will be asked detailed questions about your work and quite possibly to make modifications to it as well.

So yes, you can and probably should make use of sources on the Internet, just make sure you understand how it works (as in, can explain every line if needed) and that attribution/licensing is in order.


As your hiring manager, I naturally want to assess your skill, and that includes your capability to re-use existing solutions, as well as your ability to think on the fly and to learn. I don't want employees who rush to meet a deadline, but give me low quality output - and on the other hand, I don't want employees who make awesome stuff, but take forever to do so. I need end-user quality and I need to meet reasonable deadlines, and this is one way to check if you fulfil both criteria. If you present a good solution in a reasonable timescale, regardless of the method, then you represent value for money as an employee.

The old adage holds true here: "Fast, cheap, or good - pick two." They want to know which two you are.

If I were you, I'd try to stop overthinking it, and feel free to use any community resources and code snippets. This is what happens with real developers in real jobs, and the fact that it's an interview shouldn't sway your methodology. So long as you understand the code, the solution works, and you aren't doing anything inappropriate, illegal or immoral, then I don't personally see a problem.

As for what is inappropriate, illegal or immoral, the industry you are applying for may have security or ethics regulations which prevent certain types of code being used. Showing knowledge of these limitations and being aware of the morality of using publicly-available code snippets will only show your hiring manager what a thoughtful and considerate developer you are.

  • Hi, flith, just dropping in as part of the community review queue. Welcome to The Workplace SE! While I think your answer presents a good foundation for your answer, I personally would read it afterwards and think, "So I still don't know which two to choose." Not to say that you should dictate the questioner's choice, but perhaps give OP the choices that you would pick/have picked in the past to help bring some experiential wisdom to your answer? Or if you feel that that's too personal, perhaps a pros and cons of the combinations? (Cont'd.) Commented Mar 13, 2017 at 7:55
  • (Cont'd.) But this is just my two cents as part of the community review queue, so feel free to totally ignore my comments. We're just happy to have your help :). Thanks! Commented Mar 13, 2017 at 7:58
  • 3
    If he can't figure out the right one by himself, I'm not going to hire him ;) but joking aside, that's a fair point. I'll update my answer to include some personal commentary on which way I'd go.
    – flith
    Commented Mar 13, 2017 at 8:04
  • 4
    @user3644640: not sure I follow you, the adjective responsive tells the OP what it should be - as far as I can tell, in the OP's question, the responsive refers to an implementation detail (responsive design that changes based on the browser's viewport size, for example) rather than any aspect of the developer's personality.
    – flith
    Commented Mar 13, 2017 at 8:33
  • 1
    @user3644640 the "responsive" is a tech term in web development. Commented Mar 13, 2017 at 11:55

Whenever I am asked to complete a technical coding test, I always google the internet for answers and read through three or four examples. Then I ignore everything they did and write it my own way. Let me go into more detail for why this is necessary.

Most of the answers you find on the internet are only going to be technically correct.

For example, if you have a question about how to do X there are very likely multiple ways to do this regardless of what language or frameworks you are using. Some of these will be scalable - some will not. Some will use methods that are rightly deprecated (Eval!) and some will not. Some will be out of date for modern programming languages, and some will not.

Most answers will NOT work in a real-world situation. Are they quick solutions? Yes, but they are usually quick for a reason.

With more then one way of doing something, you have a chance to demonstrate mastery, not just understanding.

This is your chance to demonstrate the specific expertise you bring to the table by being able to demonstrate that you understand the different approaches and when to use which one. For example, I will sometimes provide TWO different solutions, with an explanation of which solution fits which situation.

"You didn't say if this code was meant to be re-useable, I usually assume reuse-ability, but the fast example is here. However, if this was something I was expecting to re-use, I would structure it like so."

If you can Google a solution, expect that the interviewer can to.

I know in the past when I have looked at coding samples submitted by prospective employees, I have put portions of their code into Google to see if they copied it from somewhere. Typically if the code is presented that way, with no explanations, I will reject the candidate outright. If they provide explanations, good on them.

It's important - if you use any other copied code or if you use a framework - to explain why you selected what you did, and not just include them outright. Otherwise the interviewee will simply assume you googled what was best and don't understand the nuances of what you selected.

Interviewers should be more interested in your thought process then your technical skills.

Frankly, anyone can google enough code and with a low level of skill, slap something together these days. Really good technical tests will require you to submit a repository history along with your submission to ensure that they can follow along with how you developed it. This is much harder to fake, and gives a much better idea of how the candidate came to the solutions that he came to.

Copying someone elses code gives them no reason to hire you over anyone else, and no insight into how your mind works and if you are a good meld for their existing team and company culture.

Showing and explaining multiple approaches shows that you took the time to research the project, did not fire from the hip, and put care and consideration into even the most insignificant work that you do.

This cannot be stressed enough - as a hiring manager I want candidates who know what they don't know and have the capability to learn. And as a candidate, I want a job where going the extra mile will be recognized and mean something. Taking extra care, providing additional information and coding samples shows the company want kind of a candidate you are AND gives you a chance to feel out what kind of company they are doing to be.

While copying and pasting might be the quick solution - companies that accept candidates who are just able to copy and past technical test answers quickly and easily are going to have a much poorer base programmer then companies that reject them, and probably aren't a place you are going to want to work at for very long.

  • How odd that the bottom two answers (at this writing) are, in my view, the most helpful.
    – Wildcard
    Commented Mar 14, 2017 at 10:02

Slightly different background here but hopefully some overlap with your situation. The type of test we give to candidates isn't difficult but you're also unlikely to find an answer online as it requires a particular series of calculations to get to a particular number. Getting the right answer is great but the real challenge is to demonstrate that you can apply best practices (in the language of your choice). In terms of code there is no correct answer. We have certain general expectations but are also well aware that there are better developers than us out there.

All our candidates can program but not all supply code that demonstrates serious thought about the application, and anticipates having to work with a team of developers and testers or their code being run by end-users.

Things we like to see are:

  • a correct understanding of the problem and a simple solution to it,
  • tests (system, unit, even manual tests are better than nothing),
  • comments,
  • consistent coding conventions (naming, indentation, braces),
  • making values configurable instead of hardcoding,
  • no unused code,
  • validation of inputs,
  • helpful error handling,
  • minimal repetition,
  • encapsulation and other nice OO stuff (but only when it's genuinely useful to the situation at hand).

Bonuses are:

  • Documentation,
  • UI (as well as command line),
  • support for debugging,
  • detailed output beyond the specific value requested.

Some large organisations have technical challenges that aren't just getting work for free. I know that Sky, in the UK, set a developer challenge (as I have been through their process).

Usually though, there is a deadline (albeit a loose one). I was asked to put the code on github and they then checked the code and in the interview, this work was extensively reviewed. The task took about 8 hours or so to do (but this was mainly because I added bells and whistles to make me look good).

Everything from naming, project structure to checkin comments and extra things (UI etc) were commented on.

You have to think "Why are they making me do this?". It could be a 2 bit company that want work for free, but it may also be a company that want to see how you approach a problem and how you go about doing your work.

You need to make sure you submit code that you are happy with (so therefore need understanding) and reflects how you work. When you submit code, add comments, even send a brief explanation of your approach and why you did it using X instead of Y. This is a good way (for you) to demonstrate knowledge without being in a pressure of an interview, so you should view it as a positive.

You must log in to answer this question.

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