Hoo's Tech Interviews: Coding Interviews
Have a technical interview coming up and have no idea what to expect? Want to learn how to gain a competitive edge in the interview process over other applicants?
This is the second publication of a multi-part series on Tech Interviews for Hoo's. Each publication will include different types of tech interviews you might be exposed to, a general overview of how each kind of interviews work, and tips and techniques on the actions you should take during the interview to help you ace the interview and continue on with the rest of the hiring process.
The Coding Interview
The general object of these interviews is to determine if the applicant knows how to write clean, production-quality code that correctly solves the problem. These kind of interviews also provides insight into if the applicant is capable of following good coding practices (readable, maintainable, and extensible). Finally, as you work the Interviewer is examining other aspects to the applicant's problem-solving skills such as debugging skills, creativity, analytical skills, and the ability to use and extend prior knowledge to current problems.
Before You Begin Coding
- Make sure you understand the problem- ask questions, especially if any of the problem requirements seem unclear.
- Work through simple examples- do this before and after coding. This specific approach may help you notice additional cases or patterns you might have missed otherwise before you begin coding, and doing it after you finish coding helps to ensure your code actually solves the problem.
- Make a plan- as with writing any program, you don’t want to jump right into coding without considering the high-level structure and functions of your program.
- Choose a language- Unless asked for a specific language, it doesn’t really matter which language you choose as long as you understand the fundamentals (decomposition, object-oriented design, etc) and your interview can understand you. If all else fails, create your own pseudo-code.
While You’re Coding
- Don’t be afraid to think out-loud as this may help you work through the problem, but it will also allow the interview to follow your thought process.
- Break the problem down and define abstractions- this is important because being able to break down a complex problem into manageable sub-problems and then define related abstractions is a crucial and necessary skill for almost any technical position. Furthermore, working with sub-problems allows for easier development of helper methods and classes.
- Delay the implementation of your helper functions- this helps you maintain momentum towards the overall solution, and the interviewer may grant you implementation of the helper function for free if they deem it trivial enough.
- Don’t get caught up in trivialities- this includes obscure language syntax and library functions name. If you can’t remember the exact way to write something in your chosen language, then just make something up as close to the mark as possible and explain how you would look this up in the appropriate documentation.
Once You Have a Solution
- Think of edge cases- these are often the kinds of cases that cause most bugs within code. Furthermore, considering all potential edge cases demostrates a high-level of understanding of the given problem.
- Step through your code- this is most often done with a real-life example, similar to the ones you worked through before you started coding. Be careful however, sometimes mentally running through code will cause your mind to project what it wants to happen as opposed to what its actually happening within the program, so it’s recommended to physically work through the example!
- Explain the shortcuts you took- so that the interviewer is able to follow your line of logic and thought process.
Much of the information included within these blog posts was compiled from Career Center Website resources and Palantir.com, two resources which would be great places to look if you want more information on a specific type of interview. If you are also interested in the other publications of this series, Hoo's Tech Interviews, they can be found below: Hoo's Tech Interviews #1: Phone Interviews- https://career.virginia.edu/blog/2017/sep/hoos-tech-interviews-phone-int...