Showing snippet of previous employer's source code during interview?


Almost all tech interviews these days ask for code samples. Would it be okay for me to show them a small snippet (a file or two) of my previous employer's source code?

It's nothing that could be used by the company to compete against my previous employer.

Hiring Legal Interviews Code

asked Mar 9 '14 at 00:53
Patrick Stone
55 points
Get up to $750K in working capital to finance your business: Clarify Capital Business Loans

3 Answers


From an employer's perspective:

If I'm hiring an engineer, I would look at more than just a few snippets of code. What interests me more is how the person is using the overall architecture of the application.

If I'm an ex-employer, I would not feel comfortable with our source code being shown around -- which could potentially reveal a vulnerability.

Your best bet would be to create a small dummy application and put it on GitHub.

That would actually be better for you as well, since in most cases people aren't happy with everything about a previous application they've worked on (especially if there were other engineers working on it with you).

answered Mar 9 '14 at 02:52
Nishank Khanna
4,265 points
  • I definitely agree with this. Developers should have at least a small collection of their own code, and at least some of it should be something they can be proud of. You shouldn't have to resort to stuff that belongs to an old employer. Worst case scenario, you should be able to put something together without too much trouble. – rbwhitaker 7 years ago


Nishank Khanna has some really good points except for one: "a small dummy application". I would recommend you regularly contribute to open source projects on github as well as maintain at least one small open source project of your own. I am not directly in charge of hiring where I work, but I am almost always included in our panel interviews and I always check before hand if the candidate contributes to oss projects and I base most of my questions on what I found out from snooping on their github.

answered Mar 9 '14 at 03:17
Jake Johnson
11 points


Speaking as a hiring manager bringing in source code that you don't own without an agreement from your former employer in-hand is a disqualifying event.

Here's why - Even if your'e trying to be careful with it you're not respecting your former employers ownership of the code it paid you to write. So my company can't trust you to respect our policies either. Plus how can I be sure that you actually wrote the code yourself and aren't passing off something a coworker wrote?

I say this from experience having interviewees bring in code (once the entire codebase!) from former employers and I'll give you the same advice I gave them which is similar to other answers here. If you want to have a code sample (and you should) the best thing to do is to go write an application that scratches an itch for you or contribute to an open source project you are interested in. I can be more confident that you actually wrote it and you might even earn a little income from your itch-scratching application.

answered Mar 9 '14 at 05:55
11 points

Your Answer

  • Bold
  • Italic
  • • Bullets
  • 1. Numbers
  • Quote
Not the answer you're looking for? Ask your own question or browse other questions in these topics:

Hiring Legal Interviews Code