I just returned from a college recruiting trip to Simon Fraser University in Canada, where I met a number of great students. The trip reminded me of common problems people have in technical interviews and the biggest things which I think helped me to succeed at mine and get hired by Microsoft.
Here are some suggestions for preparing for interviews, some curriculum ideas for Computer Science, and sample questions and things I look for during an interview.
Participate in Programming Contests
These have problem solving, require quick, clear communication (for teams), and require practical coding for algorithms and data structures. Nothing prepared me as well for my daily job.
Use Mock Interviews
These are great for getting used to the format, thinking about what you want to say about yourself and in what level of detail, and just getting comfortable with interviews. Nervousness is a common problem and practice can help.
Read Great Books
For Developers, Code Complete and The Pragmatic Programmer are absolutely fantastic. They are heavily focused on how to treat programming as a process and about what makes great code great. I consider reading and following them to be equivalent to several years of additional professional experience.
Unit Testing and Test Driven Development are things I wish we had throughout programming courses. If every CS student learned to write unit tests from the first day they wrote code, the industry would be better.
Debugging is something I would make a class of. The most common thing I teach people when they start to work is how to go from a bug to a hypothesis to a fix. Have students debug code they didn’t write and have examples of easy and hard to debug code. Have them analyze what happened, how the code helped or hurt debugging, and how they could’ve narrowed down on the real problem fastest.
Software Testing would be a great course. The industry knows a lot about solid practices to build different kinds of software and very little about solid practices for testing. Most testers I hire have talent but no experience testing.
Here are some sample questions (for a developer (SDE) candidate), and a few of the things I look for in each:
You chose the Development role. What attracted you to that role?
· Did they misunderstand the roles?
· Are there signs they might be best suited for another role? (Developer -> I love writing code and then making sure there are no bugs in it. Possible Tester?)
Tell me about a project which highlights your development skills.
· Were they excited about it? Why?
· Did they learn something?
· Are they thinking about the user? Are they focused on the overall goal?
Follow-up Questions about the Project, like:
· Tell me about a key challenge that came up. (Was it fixed? Did they learn something?)
· How did you test it? (Was there a process? Do you know how it worked? How was the relationship with testers?)
· What are the next steps for the project? (Do you know where it’s going?)
When you look at code, how do you decide whether it is bad code, good code, or great code? What properties does great code have?
· Do they prioritize their answer well and have a rationale for it?
· Does their answer suggest they’ve gotten better at coding over time?
Implement String Remove – a method which takes a string ‘text’ and a string ‘value’ and returns a new string which is like ‘text’ but with all instances of ‘value’ removed. For example, if I pass “Hello, Hello” as text and “el” as Value, “Hlo, Hlo” should be returned. Use the language of your choice.
· Do they have a process for programming, or just muddle through? (*Most important*)
· Do they think about an algorithm before coding?
· Do they understand allocation?
· Do they write a good loop? (Safest choice, progress each iteration, avoid off-by-ones?)
· Do they run through an example with the code and catch problems without help?
Follow-up Questions about Code, like:
· Can you walk me through how this works for the example?
· Can you walk me through how this works for (choose input which exposes a bug)? (Do they find it? Do they fix it properly?)
· What is the runtime complexity of this function? (Do they know? Do they worry about the cost of calls they’re making? Do they compare it to what they think it should take?)
· Could you make it faster? (Can they assess the minimum expected cost? Are they confident if they did choose a solution on that scale?)
· One problem is that you don’t know how big to make the final string up front. What are your options for dealing with this problem? (Do they know the space/speed tradeoffs and major choices?)
· How would you test this function?
· How would this function work for overlapping matches? (“banana”, “ana”) (Do they see this was ambiguous? Do they ask me what it should do here?)