I think the programming/algorithms questions are probamatic. They by and large depend on seeing some trick. Take the array 1..n one. It's an 'aha' type question. You either see the trick, or not. I saw it after a minute, but rolled my eyes. How does that in any way predict whether I can solve hard problems in production. I give myself pretty high probability of not having that 'aha' moment in an interview; whether I did or did not tells you nothing useful.
Not to mention that this is not exactly an obscure trick. If you've seen it a few times it is trivial to remember the trick and apply it. It's been awhile since I've looked at the 'interview questions exposed' type books or websites, so it didn't leap immediately to mind. Would you really select against me because I haven't read such things?
edit: my phrasing was way to strong and unfriendly. I reworded the first sentence.
I agree that the summation solution is an "aha" moment. But I don't think a reasonable interviewer would require someone to get that answer, and I can see how this problem could showcase a candidate's thought process and ability to reach incremental solutions.
For example, a naive approach is to sort and find the element where arr[n] == arr[n+1]. From here, the interviewer can see if the candidate is aware that most sorts are O(nlogn). A better candidate knows that with a fixed range, you can sort in O(n). Maybe the candidate will go with a hash table or set and check for the duplicate that way. I've interviewed people who look good on paper but don't intuitively grasp how to use hash tables, so this is a useful screening exercise.
My point is not that this question isn't simple, it's just that there are a number of ways to approach it besides the "aha" moment that give you insight into how a candidate works.
As an interviewer, I'm far more interested in soft skills than hard skills. I just want to know that they can actually program, which I can usually tell by how they talk about accomplishments in the face of some probing detail questions. Good programmers want to take a difficult problem, shoot it, mount its head on the wall like a set of antlers, and brag about it to anyone who will tolerate that. So competence shines through without a lot of tech question grilling.
Soft skills, on the other hand... is this person an asshole? Inflexible and dogmatic? Timid? Boring? That stuff drags down a whole team.
I also like to use the opportunity of an interview to focus on the softs skills. Although I think there´s a company and a job for everyone. Sometimes you might want to hire a timid or boring person to perform a task on their own, on a night shift, or even the culture of the company is intended to be boring, I mean there´s a lot of reasons you can hire timid, boring... even assholes are handy sometimes!
-1 for forcing sign in. What if I don't care about saving my progress? What if I'm not a member of any of those services? Answer: 10 second pageview guaranteed to not become a return visiter.
Here's where I think I diverge from most people on this topic. My personal view is that I think by the time you bring someone in for an interview, you should already know that they can code, whether that's through code samples they provide or through Github accounts or whatever.
TL;DR; Don't waste your applicants time or your own
## The Interview
Interviewing should have two parts, imo:
* Confirming that I actually wrote the code I sent you and know what it means
* Confirming that you want to sit next to me for the next six months
I can tell you right now that if I take time off my current job to go sit in your office for an interview and you ask me basic questions like "What is MVC?" or "What's the difference between a POST and a GET request?", I'm going to thank you for your time and walk right out.
Why? Because my Github profile, which is featured prominently on my resume, contains examples of both. Half my projects are MVC projects, and many of them use 3rd party APIs (or are even APIs themselves!). The fact that you're asking me basic definitions means you didn't even pay attention to the stuff I sent you, so you're wasting my time and yours. You could have already figured this out ahead of time. Instead, you asked me to take time out of my day (probably during work hours) to ask questions whose answers I've already provided.
(Please note that this only really goes for non-entry-level positions. For entry-level applicants, such as kids fresh out of college, you may not have very many code samples to work with. That's fine. In that case, send some problems for them to work on at home. Hopefully, these are dumbed-down but real-world problems your company has faced in the past.)
## Phone Screen (aka verifying authenticity)
The first thing you should do is take a gander at my Github profile or my code samples. Then you call me up at a prearranged time and ask me questions about that code. Make me prove that I wrote what I said I wrote.
* I noticed you made this combat simulator (www.bitfalls.com/2013/08/autofight-php-job-interview-task-part-1.html). Walk me through your thought process.
* Your code appears to be a custom MVC. Why did you choose to go with a custom one versus say, CodeIgniter or Symfony?
* This project is an API for Nerd Nite scheduling. First of all, what's Nerd Nite and why did you make an API for it? Second, explain how you scraped the data, organized it, and output the results.
The above three questions will give you way more insight into my programming style and thought process than "What is an MVC?". Please. Don't waste my time. As a senior engineer with 7+ years in the field, I shouldn't need to prove the equivalent of my ABCs to you. It should be understood.
I personally would also skip the whole "live coding" thing via Stypi or whatever. Waste of time, imo. You've already got code samples and you can ask me as many questions as you want about it. I shouldn't need to write code in front of you to establish my credentials.
## What about people who lie?
There are people who lie about their resume and their qualifications, but that's exactly why you should tailor your questions to fit the code samples provided. If I don't get excited about that code and I can't eloquently explain why I did what I did or how it works, then maybe I didn't write it after all. It also gives you an insight as to my personality: I clearly took time out of my day to write this code. Why? What prompted me to write an API for Nerd Nite schedules?
The answers to those questions should give you an idea of whether I can actually program or not. Questions like "What is MVC?" can be looked up in a dictionary. Explaining code samples is much more difficult.
## What next?
Once you've established that I wrote the code I said I wrote, then Step 1 of The Interviewing process is mostly done. Now you bring me into the office to determine Step 2 -- am I someone you want sitting next to you for 8+ hours a day for the next six months? Do I fit in with company culture?
You could give me a problem to solve on the spot, but hopefully it's more of a higher level thing rather than a "write code on a whiteboard" thing. The reason I say this is because at this point you should already have seen my code. You should know by now that I can build a class. The question you need to answer now is: given an arbitrary problem, can I solve it or at least come up with a reasonable thought process?
Bonus points if it's relevant to the job. (i.e., if your job never requires you to write binary trees from scratch, don't ask the applicant to do so.)
## Finally
Between the phone screen (technical) and in-person interview (personal), you should have a good idea of whether you want me on your team or not.
Occasionally for small teams, you may decide that you need to know something about time, creativity, independence, and other similar qualities that you can't really get from code samples. If this is the case, then I suggest doing the contract thing, where you give them an assignment on contract. Once the assignment is finished, you hire them or pay them for the work completed (or hopefully both).
I really, really, really despise whiteboard coding. I don't think it's indicative of anything, and I think you will find a lot of false negatives (i.e., rule out good candidates) using the whiteboard method.
A few other thoughts:
* I should meet my potential future boss at the in-person interview
* I should meet at least one of my potential future coworkers
* Be respectful of my time. Most interviews take place during work hours, so I've taken time off work -- and probably lied to my boss about where I'm going! -- to meet with you. The least you can do is not waste my time.
* Be familiar with my resume and code samples. I took the time to write them, you should take the time to read them. It will answer way more questions about my abilities than a 20 minute quiz on technical terms will.
The more informal the in-person interview is, the better. The technical qualifications should already be accepted by the time I walk in the door. At this point, it's a two way street as we figure out whether we want to work together. I'm interviewing you just as much as you are interviewing me.
(Note: These are just my opinions about how I interview others. It hasn't failed me yet. On the other hand, almost every job I've ever interviewed for has completely wasted my time on that front.)
I can tell you right now that if I take time off my current job to go sit in your office for an interview and you ask me basic questions like "What is MVC?" or "What's the difference between a POST and a GET request?", I'm going to thank you for your time and walk right out.
Oh yeah? Well, if I'm being interviewed, and someone doesn't ask me those questions, I'm going to walk right out!!
Wait is 7 years all I need to be a 'senior engineer'?
And what do I do if I don't like to release my code publicly? Should I not be hired by any company if I'm not personally a fan of open source (hypothetically)?
I agree with most of these points, but my team lead brought up an excellent point while we were interviewing someone - my team lead had the candidate do a stupid easy algorithm question just to see whether the candidate was the real deal, and explained to the candidate is that anyone could list a Github profile as part of their resume.
The candidate was understanding, and did it - he didn't have to have exact syntax, I was happy enough seeing psuedocode since I already took a peek at the Github profile that was a part of his resume.
It only wasted a few minutes of his time whiteboard coding, and it wasn't intense, so it gave him a nice easy way for him to explain his thought process. I asked relevant questions to the code that he wrote, and it lead to a good discussion on some things.
I felt that we were mutually happy with the experience, as he subsequently accepted our job offer.
On the whole though, asking stupid questions is a waste of both side's time.
"Know that they can code" and "know how they code" are different things, and it's possible the latter could effect how well they fit into your team. Whether an interviewer can actually do a good job assessing that is another question...
THIS - So true, I am a Ruby developer and could probably earn an extra 20k if I changed jobs tomorrow, however I will not sit through an interview being asked stupid questions like "What is MVC", "solve this big O problem" or implement some algorithm that I will only ever need to use during interviews & can then forget about...that type of interview is very telling of the companies work environment & the type of people you will have me working with.
I will send you code samples or show you my contributions to open source projects so that you know I can code, happy to discuss these until you are happy.
What is far more important is to find out about me, do you like me, can you work with me & tell me honestly about your dam culture - do you expect everyone to be at there desk at precisely at 8am, work a minimum of 80 hours per week? How is productivity measured? Do you expect me to attend some "team building" weekend nonsense when I could be spending time with my wife instead.
>In that case, send some problems for them to work on at home. Hopefully, these are dumbed-down but real-world problems your company has faced in the past.)
As an entry level applicant, I can't stress how important this was to gaining insight into both how I function when given a deadline and what kind of work is in store for me. It also lets me know what I might need to study in the future or what I need to study immediately.
As the last round of a 3-hour interview I met the engineering manager whose first question was, "Do you know Perl?" and I said no and he said "Sorry, we need someone who knows Perl" and sent me home. After 3 hours of wasting my time! Not naming names, but Screw you and burn in hell for eternity SAP!
Please allow googling in an interview. How many people today actually write code without a Google search? I bet 90% of the Google engineers do that and still able to write really brilliant code.
Love this! Was in a coding interview once where they just gave you a problem and you were given laptop and time to code out a solution using whatever you would normally use ie stack overflow. First interview I've had where I felt like it was a fair test of my programming capabilities.
Of course this requires that you design the question in a way that is not completely google-able, but real world programming is not just about solving a trick question but being able to be resourceful enough to find a real working solution.
That's definitely the way to go. If you try to "remember" an answer you read or even previously completed while in an interview there's a good chance you won't instantly recall the answer and often the problem is slightly adjusted from your first encounter. It makes it difficult to see the problem with new eyes http://lesswrong.com/lw/k7/original_seeing/
There are some serious benefits to bringing up your prior exposure to a question in a positive light. When sending out problems interviewees are likely to encounter again I include the group's "déjà vu guide" http://codingforinterviews.com/seen-question-before
I see that and want to do it by appending backwards off the end of the string, then move the pointer to the new beginning. Is that "creating a new string"? Or just making a poopy on the floor for the garbage collector?
"Double the length of the old string and then cut it in half" isn't against the rules, right?
Nice site, could not do the practise questions though since I am not member of any of the social sites needed. Suggeting the option to proceed without the saving feature.
Any time I've been a part of hiring new talent, I'm looking at three things:
1. How you process information. I'm not going to be impressed if someone at the table says 'Microsoft' and you cringe.
2. Can you admit to not knowing everything? You'd be shocked how big of an issue this is.
3. Are you willing to adapt? In a smaller team, you have to bend and be willing to take on new challenges.
This is really very true in the corporate world. The better you know how to communicate, the more likely it is that you will succeed in your chosen profession.
Just as a heads up, after I finish an interview question neither button works (I'm an expert or review later). Clicking on each doesn't seem to do anything. The only way for me to see additional questions is to head back to the homepage and re-click 'run some practice questions.'
Doesn't look like there's a whole lot of coding in that coding interview. Apparently the article assumes that "coding interview" involves a whiteboard, rather than a keyboard.
We segment our interviewing into different sections. One person will do a specific functional competency evaluation which consists of writing code in an IDE to see whether you can write code. This portion of the interview is not about analytical thinking skills, people skills, or "tell me about a problem you've solved". It's about writing code. The interviewer is looking to see how many hints you need to get at working code, how well your solution is structured, and getting an overall feel for how you program.
> Leave yourself plenty of room. You may need to add code or notes in between lines later. Start at the top of the board and leave a blank line between each line.
That's a good idea I'll adopt. It looks messy when you start trying to shoehorn in a missed line somewhere.
This reads even better as a "how to be a more insightful and incisive thinker and presenter", and anyone who just wants to use this excellent advice for interviews is missing the point!
[+] [-] RogerL|12 years ago|reply
Not to mention that this is not exactly an obscure trick. If you've seen it a few times it is trivial to remember the trick and apply it. It's been awhile since I've looked at the 'interview questions exposed' type books or websites, so it didn't leap immediately to mind. Would you really select against me because I haven't read such things?
edit: my phrasing was way to strong and unfriendly. I reworded the first sentence.
[+] [-] typpo|12 years ago|reply
For example, a naive approach is to sort and find the element where arr[n] == arr[n+1]. From here, the interviewer can see if the candidate is aware that most sorts are O(nlogn). A better candidate knows that with a fixed range, you can sort in O(n). Maybe the candidate will go with a hash table or set and check for the duplicate that way. I've interviewed people who look good on paper but don't intuitively grasp how to use hash tables, so this is a useful screening exercise.
My point is not that this question isn't simple, it's just that there are a number of ways to approach it besides the "aha" moment that give you insight into how a candidate works.
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] beat|12 years ago|reply
Soft skills, on the other hand... is this person an asshole? Inflexible and dogmatic? Timid? Boring? That stuff drags down a whole team.
[+] [-] FLUX-YOU|12 years ago|reply
The previous 3 I get, but these two? Maybe we should be interviewing for the ability to get work done without being affected by other people?
[+] [-] mchicote|12 years ago|reply
[+] [-] obituary_latte|12 years ago|reply
[+] [-] HeyItsJames|12 years ago|reply
http://www.interviewcake.com/all-questions
[+] [-] Deestan|12 years ago|reply
[+] [-] dkhenry|12 years ago|reply
[+] [-] hermannj314|12 years ago|reply
[+] [-] Jemaclus|12 years ago|reply
TL;DR; Don't waste your applicants time or your own
## The Interview Interviewing should have two parts, imo:
* Confirming that I actually wrote the code I sent you and know what it means
* Confirming that you want to sit next to me for the next six months
I can tell you right now that if I take time off my current job to go sit in your office for an interview and you ask me basic questions like "What is MVC?" or "What's the difference between a POST and a GET request?", I'm going to thank you for your time and walk right out.
Why? Because my Github profile, which is featured prominently on my resume, contains examples of both. Half my projects are MVC projects, and many of them use 3rd party APIs (or are even APIs themselves!). The fact that you're asking me basic definitions means you didn't even pay attention to the stuff I sent you, so you're wasting my time and yours. You could have already figured this out ahead of time. Instead, you asked me to take time out of my day (probably during work hours) to ask questions whose answers I've already provided.
(Please note that this only really goes for non-entry-level positions. For entry-level applicants, such as kids fresh out of college, you may not have very many code samples to work with. That's fine. In that case, send some problems for them to work on at home. Hopefully, these are dumbed-down but real-world problems your company has faced in the past.)
## Phone Screen (aka verifying authenticity)
The first thing you should do is take a gander at my Github profile or my code samples. Then you call me up at a prearranged time and ask me questions about that code. Make me prove that I wrote what I said I wrote.
* I noticed you made this combat simulator (www.bitfalls.com/2013/08/autofight-php-job-interview-task-part-1.html). Walk me through your thought process.
* Your code appears to be a custom MVC. Why did you choose to go with a custom one versus say, CodeIgniter or Symfony?
* This project is an API for Nerd Nite scheduling. First of all, what's Nerd Nite and why did you make an API for it? Second, explain how you scraped the data, organized it, and output the results.
The above three questions will give you way more insight into my programming style and thought process than "What is an MVC?". Please. Don't waste my time. As a senior engineer with 7+ years in the field, I shouldn't need to prove the equivalent of my ABCs to you. It should be understood.
I personally would also skip the whole "live coding" thing via Stypi or whatever. Waste of time, imo. You've already got code samples and you can ask me as many questions as you want about it. I shouldn't need to write code in front of you to establish my credentials.
## What about people who lie?
There are people who lie about their resume and their qualifications, but that's exactly why you should tailor your questions to fit the code samples provided. If I don't get excited about that code and I can't eloquently explain why I did what I did or how it works, then maybe I didn't write it after all. It also gives you an insight as to my personality: I clearly took time out of my day to write this code. Why? What prompted me to write an API for Nerd Nite schedules?
The answers to those questions should give you an idea of whether I can actually program or not. Questions like "What is MVC?" can be looked up in a dictionary. Explaining code samples is much more difficult.
## What next?
Once you've established that I wrote the code I said I wrote, then Step 1 of The Interviewing process is mostly done. Now you bring me into the office to determine Step 2 -- am I someone you want sitting next to you for 8+ hours a day for the next six months? Do I fit in with company culture?
You could give me a problem to solve on the spot, but hopefully it's more of a higher level thing rather than a "write code on a whiteboard" thing. The reason I say this is because at this point you should already have seen my code. You should know by now that I can build a class. The question you need to answer now is: given an arbitrary problem, can I solve it or at least come up with a reasonable thought process?
Bonus points if it's relevant to the job. (i.e., if your job never requires you to write binary trees from scratch, don't ask the applicant to do so.)
## Finally
Between the phone screen (technical) and in-person interview (personal), you should have a good idea of whether you want me on your team or not.
Occasionally for small teams, you may decide that you need to know something about time, creativity, independence, and other similar qualities that you can't really get from code samples. If this is the case, then I suggest doing the contract thing, where you give them an assignment on contract. Once the assignment is finished, you hire them or pay them for the work completed (or hopefully both).
I really, really, really despise whiteboard coding. I don't think it's indicative of anything, and I think you will find a lot of false negatives (i.e., rule out good candidates) using the whiteboard method.
A few other thoughts:
* I should meet my potential future boss at the in-person interview
* I should meet at least one of my potential future coworkers
* Be respectful of my time. Most interviews take place during work hours, so I've taken time off work -- and probably lied to my boss about where I'm going! -- to meet with you. The least you can do is not waste my time.
* Be familiar with my resume and code samples. I took the time to write them, you should take the time to read them. It will answer way more questions about my abilities than a 20 minute quiz on technical terms will.
The more informal the in-person interview is, the better. The technical qualifications should already be accepted by the time I walk in the door. At this point, it's a two way street as we figure out whether we want to work together. I'm interviewing you just as much as you are interviewing me.
(Note: These are just my opinions about how I interview others. It hasn't failed me yet. On the other hand, almost every job I've ever interviewed for has completely wasted my time on that front.)
[+] [-] danielweber|12 years ago|reply
Oh yeah? Well, if I'm being interviewed, and someone doesn't ask me those questions, I'm going to walk right out!!
This is how we debate interview tactics, right?
[+] [-] lquist|12 years ago|reply
You'd be surprised how many 'senior' engineers can't code their way out of a cardboard box.
Background: I've interviewed hundreds (if not thousands) of engineers.
[+] [-] diminoten|12 years ago|reply
And what do I do if I don't like to release my code publicly? Should I not be hired by any company if I'm not personally a fan of open source (hypothetically)?
[+] [-] Bahamut|12 years ago|reply
The candidate was understanding, and did it - he didn't have to have exact syntax, I was happy enough seeing psuedocode since I already took a peek at the Github profile that was a part of his resume.
It only wasted a few minutes of his time whiteboard coding, and it wasn't intense, so it gave him a nice easy way for him to explain his thought process. I asked relevant questions to the code that he wrote, and it lead to a good discussion on some things.
I felt that we were mutually happy with the experience, as he subsequently accepted our job offer.
On the whole though, asking stupid questions is a waste of both side's time.
[+] [-] dllthomas|12 years ago|reply
[+] [-] codex_irl|12 years ago|reply
I will send you code samples or show you my contributions to open source projects so that you know I can code, happy to discuss these until you are happy.
What is far more important is to find out about me, do you like me, can you work with me & tell me honestly about your dam culture - do you expect everyone to be at there desk at precisely at 8am, work a minimum of 80 hours per week? How is productivity measured? Do you expect me to attend some "team building" weekend nonsense when I could be spending time with my wife instead.
[+] [-] FLUX-YOU|12 years ago|reply
As an entry level applicant, I can't stress how important this was to gaining insight into both how I function when given a deadline and what kind of work is in store for me. It also lets me know what I might need to study in the future or what I need to study immediately.
[+] [-] sgustard|12 years ago|reply
[+] [-] yeukhon|12 years ago|reply
[+] [-] billnguyen|12 years ago|reply
Of course this requires that you design the question in a way that is not completely google-able, but real world programming is not just about solving a trick question but being able to be resourceful enough to find a real working solution.
[+] [-] kabdib|12 years ago|reply
So I told them. "Look, I did this problem on my own a little while ago." They chuckled and made it harder, which was fine. :-)
[+] [-] bcjordan|12 years ago|reply
There are some serious benefits to bringing up your prior exposure to a question in a positive light. When sending out problems interviewees are likely to encounter again I include the group's "déjà vu guide" http://codingforinterviews.com/seen-question-before
[+] [-] bastiaanus|12 years ago|reply
[+] [-] hiker|12 years ago|reply
[+] [-] beat|12 years ago|reply
"Double the length of the old string and then cut it in half" isn't against the rules, right?
[+] [-] column|12 years ago|reply
[+] [-] eDice|12 years ago|reply
[+] [-] gameguy43|12 years ago|reply
[+] [-] btilly|12 years ago|reply
[+] [-] buildit|12 years ago|reply
[+] [-] ChikkaChiChi|12 years ago|reply
1. How you process information. I'm not going to be impressed if someone at the table says 'Microsoft' and you cringe. 2. Can you admit to not knowing everything? You'd be shocked how big of an issue this is. 3. Are you willing to adapt? In a smaller team, you have to bend and be willing to take on new challenges.
[+] [-] bcjordan|12 years ago|reply
Definitely including this in next week's Coding for Interviews newsletter.
[+] [-] Fede_V|12 years ago|reply
Edit: Annoying that you cannot try practice questions without logging in though.
[+] [-] umsm|12 years ago|reply
This is really very true in the corporate world. The better you know how to communicate, the more likely it is that you will succeed in your chosen profession.
[+] [-] Pirate-of-SV|12 years ago|reply
There's a simple solution that requires no additional space.
Disclaimer: Code is not tested or given the love it deserves.
[+] [-] anonymoushn|12 years ago|reply
[+] [-] dhammack|12 years ago|reply
[+] [-] gameguy43|12 years ago|reply
[+] [-] gameguy43|12 years ago|reply
[+] [-] yixizhang|12 years ago|reply
Author of the site wrote solutions in Python, but obviously he/she doesn't understand Python. Isn't that against what the article suggested?
[+] [-] kevinpet|12 years ago|reply
We segment our interviewing into different sections. One person will do a specific functional competency evaluation which consists of writing code in an IDE to see whether you can write code. This portion of the interview is not about analytical thinking skills, people skills, or "tell me about a problem you've solved". It's about writing code. The interviewer is looking to see how many hints you need to get at working code, how well your solution is structured, and getting an overall feel for how you program.
[+] [-] bcbrown|12 years ago|reply
That's a good idea I'll adopt. It looks messy when you start trying to shoehorn in a missed line somewhere.
[+] [-] smtddr|12 years ago|reply
Also, someone should develop a vim & emacs clone with super big font so it'd be good on a big-screen for coding-interviews.
[+] [-] triplesec|12 years ago|reply