There are loads of interview questions on the web, but most are just a list of "do you know this" type questions focusing on things that any moderately capable developer ought to know. I'm in the frame to do some interviewing for blinkBox over the next few weeks, and we don't want to hire moderately capable developers, we want to hire the best software engineers.
What's the difference between a developer and a software engineer you might ask? Well a developer is a grunt who given a set of requirements can build a functional component or application. A software engineer can help to build a specification, work to that specification, work as a team, present their ideas either verbally or in writing, track work items and issues, manage continuous integration, create deployment scripts, and all the other things needed to create enterprise class applications. A good software engineer will also understand the platform they're building on so they can make appropriate design choices based on network latency, garbage collector impact, thread pool utilisation and so on.
So here's a bunch of questions which are quite varied and can help to determine whether someone is a great software engineer - it's not a comprehensive list, more a guide to help you structure an interview. If you think you can answer most of these questions and talk around similar subjects, and that you'd work well with a team of highly capable software engineers in a friendly and dynamic environment, then check out our jobs page.
Whiteboard coding
Coding on the whiteboard is a great way to assess whether someone has reasonable problem solving skills, and can keep their head under pressure. Typically interviewers aren't looking for code that will compile perfectly as it's pretty hard to write this without an actual compiler, but are looking for the approach you take. For example, do you clarify any assumptions about the problem, do you think about it before starting to code, do you work through it in your head to prove it is correct, and do you actually have confidence you have got the answer right?
If you're doing the interviewing and somebody gets stuck with a problem, then provide hints to help them along the way. In addition, I tend to ask people how they would test the method, including checking for errors and edge cases. So, without further ado, here are some ideas for whiteboard coding questions:
1a. Write a method that takes an array of characters and reverses them in place.
1b. Extend the previous method to take an array representing a sentence and reverse each word in the sentence.
2. Write a method that multiplies two integers together without using multiply or divide operators.
3. Write a method that removes an item from an arbitrary position within an array.
4a. Write a method that will remove all duplicates from an array.
4b. How could the previous method be made more efficient if the array was sorted?
5. Given a set of two-dimensional coordinates, find the one nearest to a target coordinate.
Design questions
Undoubtedly on recent or current projects you will have had design sessions where you make decisions about how components and APIs will look, and where you decide how the UI, service and data tiers (or whatever tiers you have) will talk to each other. I like to ask design questions that have already been covered, or are currently being considered, to see whether the candidate thinks in a similar way to existing people on the team. By "in a similar way" I don't mean whether they have the same ideas - different ideas are equally valid - I mean whether the consider the same sort of issues and compromises when formulating their answer. Here are some examples:
1. The service tier is currently used in-process by the UI tier, however it needs to cater for both web and mobile-web UI tiers, and in the future we may want to expose it via WCF services to allow external systems to utilise it. How would these requirements affect the way you design the public service API?
2. As well as performing individual operations on the database, we need to perform bulk operations involving many of the same type of individual operation. How would this affect your design of the database stored procedure API? What are the relative merits of the possible approaches here?
In addition to specific questions about the application platform, depending on the role of the person you might want to ask some questions about design patterns. You may not be using them, but if you don't even know about them then you can't evaluate whether you should.
1. Do you think that test driven development is a valid methodology? How can you use inversion of control patterns to facilitate test driven development? How can mock objects be used to speed up testing and development?
2. What is an ACID transaction and why is it important? What is a long running transaction and when would one be used? Should transactional semantics be controlled within a database, or from a higher level in a services layer? What are the advantages and disadvantages of each approach?
Knowledge questions
As I hinted at in the opening paragraph, I don't tend to ask questions which I expect people to either know or be able to look up on a search engine in about thirty seconds. Every day I spend quite a while looking things up, and there's no shame in that - the .NET framework is far too large for any one person to have a comprehensive knowledge of. However, there are certain underlying principles which you need to know to guide your development practices. For example, just because we no longer deal with direct memory management, you can't write efficient applications unless you understand the difference between the stack and the heap, and how the garbage collector works. These are some of the areas I'll typically discuss:
1a. What is the difference between the stack and the heap? Are structs always allocated on the stack or can they be allocated on the heap?
1b. How does the garbage collector work? How does it use generations to improve performance? Are there any problems with long-running garbage collected applications?
2a. What is type polymorphism and what is it used for? What is covariance, and why is it important in .NET 2.0?
2b. When would you use interfaces to implement polymorphism, and when would you use abstract base classes?
3a. Why are thread pools used? How would you decide whether to use a thread pool or create a thread manually?
3b. What are some of the features of .NET that allow you to implement asynchronous programming without manual threading?
Posted
Jul 30 2007, 11:05 PM
by
Greg Beech