How to ace a programming interview: Words of wisdom for college grads
It seems like yesterday, but it has been almost 13 long years since I joined Citrix as a developer out of grad school. Aspiring for a programming job, I remember preparing for and attending quite a few interviews. Yes, interviews made me nervous, but coding interviews were also fun.
Today, I am on the other side of the fence - as a hiring manager, but I still have a soft corner for college recruiting. In fact, I am a big believer in it. My group has been routinely engaged with the college hiring process, both for internships and full time positions. College grads bring fresh ideas, energy, enthusiasm and optimism. They can learn and adapt quickly.
This Fall, I gave a talk at the Washington State University to Computer Science and Engineering students on this very topic – tips and tricks to ace a software developer interview. The following is a synopsis of my talk that I hope you will find useful.
Tip # 1: Brush up on your fundamentals
A college degree teaches you fundamentals and interviewers want to know exactly that – how good your basics are. So go back and pull out your textbooks from previous semesters - data-structures, operating systems, algorithms etc. No you can’t squeeze 3-4 years of learning in a few weeks but you’ve got to go back to the basics and make sure you’ve got all those concepts in your head.
Tip # 2: Start with the why
One of the most inspirational talks that I’ve heard is Simon Sinek’s TED Talk Start with the Why. He talks about why it’s important to grasp and articulate the “why” before going into the details (such as how and what). That tip applies directly to how you prepare. Pivot your understanding of all fundamental concepts around the why instead of trying to memorize definitions. For example, instead of simply memorizing “what is virtual memory?”, understand “why virtual memory?” What kind of problems would you face as an application developer if there is no virtual memory offered by operating systems? Once you grasp the why, your understanding of the how and what become so much easier. Learning not only becomes fun but your knowledge is also long-lived.
Tip # 3: Practice and be curious
Writing code is like any other art – like music, painting etc. The more you practice, the more confident you become. There are tons of coding questions online. Try to do as many as you can. When you practice, be curious – for example, put a breakpoint, attach the debugger and closely observe and understand state changes (stack, heap, registers etc.) as you step through your code.
Tip # 4: Don’t just stop once you have the correct output
The best developers I’ve seen are the ones that nurture their code and keep improving it. They are never satisfied with the first cut. They keep on iterating over it - whether its readability, removing duplication, using design patterns, cleaner data structures etc. until they are satisfied. So when you write code in an interview, it is your chance to show off your skills. It’s ok for your “version 1” to be the “meets minimum bar” quality. But you need to be able to articulate how, where and why you would improve. Of course, if you have the time, actually demonstrate it.
Tip # 5: Don’t jump into coding
This is by far the biggest mistake that I see young developers making. Never go straight into writing code, without formulating a design or even before that, asking clarifying questions about the requirements. Real world problems rarely deal with just writing code. They always start with conceptualizing a fuzzy idea. And then designing for it. When you finally get to writing code, come up with a broad outline (either comments or stub functions) first. This not only makes it easy for you to catch any glaring issues with your design, but also makes it easy for the interviewer to follow your thoughts.
This is especially true when dealing with open-ended problems. Often, there is no single right answer to an open-ended problem solving question (like “design Facebook”). Interviewers are more interested in your approach rather than in the end-result. Remember, a technical interview question is really just an excuse so that you can demonstrate your problem solving skills.
Tip # 6: Keep talking
There is an ancient proverb – “speech is silver; silence is golden”. That is almost always true, except in interviews where it is actually the other way around. When asked to formulate a programmatic solution, you need to constantly speak your mind - this could be asking relevant clarifying questions (like in #5), speaking out your thoughts on possible design approaches etc. It has two benefits.
- It helps interviewer know where you are in your thought process.
- He/she can help you get on track if you aren’t currently.
Tip # 7: Use the whiteboard
We’ve heard the saying - “A picture speaks a thousand words”. It’s very true in interviews. Drawings help organize your own thoughts logically. It gives you a chance to steer the interview in a direction that you are comfortable and confident with. By leaving behind a tangible record of your interview, the interviewer can refer to it later, before reaching a conclusion. Use the whiteboard generously (after politely seeking permission from the interviewer, of course J).
Tip # 8: Be honest but make educated guesses
Interviewers approach questioning like a binary search. They want to understand, in the shortest amount of time, what your depth of knowledge is. So they typically start with a question of average difficulty and then depending on your answer, make subsequent questions either more difficult of less difficult. So be aware of your own “breaking point”. If you don’t know the answer, be ready to admit it because honesty is appreciated. But what really impresses interviewers is when you can logically reason your way to the answer from first principles - “I don’t know the answer, but if I were to guess it would be _____________ because of ___________”. Honesty also goes a long way in a wrap-up interview. When asked “So how did your day go?”, be honest. Talk about what you thought went well and what didn’t. Knowing your own pitfalls is viewed positively.
Tip # 9: Start fresh with each question.
Interviews will typically consist of more than one question. Approach each one with a fresh attitude. If you fail to hit a home run on one of the questions, don’t let that throw you off for the rest of the interview.
Tip # 10: Be a good listener
All successful interviewers have one common trait – yes they talk but they are also excellent listeners. Interviewers want to mostly see you succeed. They will give you cues as long as you can latch on to them and demonstrate reasonable progress. So keep your ears and eyes wide open!
Engineer @ Uber | Masters @ Georgia Tech | Nonprofit President
7 年I enjoyed reading the article and nice job! I hope you don't mind if I self promote my youtube channel, but if you are someone who wants to review data structures (Stacks, Queues, Linked Lists, etc.) , check out my Youtube Channel where I talk about data structures and implement them in Python. https://www.youtube.com/user/vert3737
PhD in Astronomy. Former Lowell Obs. & PSI. Ex Team Lead ITS @ NAU, Citrix CTP, President CUGC Steering Committee, NVIDIA NGCA (vGPU).
9 年Great tips, Prasanna, as I have seen many candidates struggle with pretty much all of these points during interviews I've witnessed. As part of talking, I'd also note that the interviewer should feel free to ask questions along the way. That's an important part of closing the information loop and better assures that the issue is on track. One more suggestion would be to at least periodically look at your audience; even if you are writing furiously on the white board, turn around once in a while and make eye contact with your audience to let them know you are aware of them and that communication should always be a two-way process. You can also read a lot of good body language that way to see if you're on the right track or if your audience seems to be engaged or not.
Senior Software Engineer in Test
9 年Thank you so much for sharing this
Sr. SDE @ Amazon
9 年Thank you for sharing!
Software Development Manager at Netflix. We are hiring - We are remote friendly.
9 年One characteristic I look for in an interviewee is how they react when presented with incorrect information. I like for them to realize what I said was wrong, for them to be confident that their answer is the correct one and then to politely and convincingly show me why I'm wrong. This interaction happens quite often in teams and how the differences are resolved will make or break the team.