While applying for jobs, on a couple occasions I’ve been given a technical question to do at home. Occasionally I feel the solution I provide I don’t fully understand because portions of code is copied from stackoverflow.com

Here are a couple examples:

Draw a star using css only. The full solution can be found here so I just emailed them the link saying I would just be copying it anyway (looking back, I wasn’t being serious at this point).

Another was writing an SQL query to retrieve information from multiple tables. I found the solution spread across 2 or 3 answers on stackoverflow, but one of them was complex enough I wasn’t able to get an intuitive sense of how it worked (before I submitted the solution).

In these situations, what’s the honest thing to do? I would feel more honest if I included a list of sources I used to come to the solution, and send it along with the solution. I’m trying to avoid giving the impression that I could do it all directly from memory vs looking up information, and I do feel bad about using information that I don’t 100% understand (for example you could just copy the sql code from here without understanding it). Part of my personality is it's really important to understand every little bit.

Though not directly related, it’s worth noting that a lot of sites, including stackexchange, don’t have clear licensing (or the licensing is disputed) for the code provided by contributors.

  • 7
    Personally, if there are no guidelines, I would expect developers to use the internet without citation (although I wouldn't have a problem with citation). HOWEVER, when they came in for an interview, if they had not taken the time to understand what they submitted before coming in, I would not even consider them. Commented Mar 2, 2018 at 14:15
  • 3
    "I just emailed them the link saying I would just be copying it anyway" - That is not a solution. Use the info to solve the problem as stated, citing the source if needed. In a real project, you'll have to take it on a case by case basis whether such copying is permissible. For a homework project, don't violate the guidelines and don't misrepresent your work (i.e. cite your source).
    – Brandin
    Commented Mar 2, 2018 at 15:14
  • 2
    why not submit the thing you don't understand, and then LEARN about it enough to talk about it?
    – bharal
    Commented Mar 2, 2018 at 15:42
  • 3
    It's worth asking yourself: why do you think that you are being given these technical challenges? Do you think that these companies are testing your ability to use a search engine? Are they giving you a bureaucratic bar that you need to jump over in order to get the job, or do they actually want to get some meaningful information out of your answer? While they may not explicitly bar you from looking up the answer, I think doing so may be missing the point entirely. Commented Mar 2, 2018 at 18:46
  • 2
    I think this really depends on the complexity of the problem and the job you're applying for. For example, if you're applying for a job as a SQL developer or a DBA and can't do a basic join without researching the solution, you're probably not qualified. On the other hand, if you're going to be working as a marketer or something like that and just need to do an occasional query, it's probably fine. Commented Mar 2, 2018 at 20:19

4 Answers 4


When faced with problems that you can't solve yourself, it's often worthwhile to submit your reasoning for how you propose to research and learn how to fulfill the problem.

Problem solving is a key part of software development, and not everyone knows the answer right off the bat, and it's good to demonstrate your problem solving processes.

The thing here to to break down the tasks and document how you'd go about solving each part (where to look, what search terms you'd use, what sources you trust). Obviously, start with the stuff that you do know first and establish this as a platform on which to build a firmer, research-based, answer.


Getting code examples off the net is something we do every day. There is no issue with this at all.

That being said, what would you do if (as part of your job duties) you had to troubleshoot existing code that was written by somebody else? This is part of being a professional - we have to look at code and try to understand what is doing in order to support those who pay our salaries (internal/external customers).


If you're asking about the ethics, if you've presented all relevant information, then it's up to them to decide whether it's okay or not. So if you say "Here's a solution. Here's how I got it (googling 'draw star with css', clicking on SE link, copying code). This is how much of the code I understand.", then it's their responsibility to decide how to evaluate that.

If you're asking whether it's okay as in "Will it cost me the job?", well, if your only options are to submit a solution that you don't understand, or nothing at all, the former is better. But a solution you do understand would be even better. Also, just as SE discourages link-only answers, you shouldn't submit a link-only answer as part of a job application. Especially when it's a link to as mutable a website as SE. What if someone decides to edit or delete the answer?


What do you mean honest? If you have been given a task with no well defined rules on how to go about it (did someone say something about google?), and you found a solution, it sounds honest enough. You are not cheating, if there are no rules set.

However, normally, in the next interview, you would be asked about your code. So if you do not understand it, it can backfire and cost you a job.

Finding code on the internet is one thing, using code you do not understand is a completely different thing (a big no).

I think the most honest thing to do, if you want that job, would be to submit code anyways (if there is no chance in hell you can complete assignment on your own) and to be completely honest when submitting (and afterwards) about parts which you do understand, and parts which you don't understand. That way you are still completing assignment and you are not lying about your knowledge.

You must log in to answer this question.

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