This is a version of the document I used at Question as its Tech Lead.
Permission to use this on my portfolio was granted by my gracious former business partners.
General C++ Engineer Interview Goals and Process
We are interested in...
- Whether we can trust this person's code output with minimal need for oversight and supervision
- Whether we (as programmers) will get along with this person on the team in a shared codebase
- Whether artists and designers will get along with this person on the team
We are not interested in...
- Whether they can answer trivia questions or brain teasers
- Whether they remember things - internet usage and asking questions is perfectly fine
Job abilities we want in a new hire...
- Synthesize Algorithms - such as have all AIs in the world lay a mine if there are no other mines within X meters... and do this at a cost of O(1) per tick
- Debug - You notice a problem. Walk me through what youʼd do to find the cause and fix it
- Architect Systems - How would you write a save/load system or a UI system?
- Optimize Code - Knowing where memory lives and how it gets moved (copy vs pointer manipulation). Understanding big-O notation
- Read other peopleʼs code - Easier to write code than read code. Ideal situation is a programmer who can confidently take over ownership of another programmer's system
- Use the common features of a programming language - in our case, C++, but I consider this one of the least important of the programmer stats
- 3D Math - We donʼt expect existing knowledge of 3D math, but we do need somebody to be able to look it up and learn it to the point that they can confidently use dot and cross products to write aim and movement code within a 3D space
- Get along with others - to avoid the “wizards fighting” problem
Interview Strategy
Algorithmist
Check for their ability to avoid O(n) when appropriate in favor of O(1) or at least reduce n by a meaningful amount. The ideal candidate will identify this need and use tricks such as amortizing calculations across multiple steps.
- "Describe how you would implement enemies placing AOE hazards" - We want to see how they avoid mines being too close to other mines placed by other NPCs.
- "Describe how you optimize AI in a large open world MMO" - We want to see their method of relevance management for memory and performance
Ask 3D Math questions that prove that they understand the uses of dot product (for aiming) and cross product (for orthovectors) - We want to filter out engineers who trial and error this stuff or never progressed past Pythagorean theorem
- "Describe how you would implement tunable aim assist?"
- "Describe how you implement ranged weapon aim for a third person camera?"
Computer Scientist
Common C++ syntax
- Meanings of const; difference between "const char*" and "char* const"; when const_cast might be acceptable, and its dangers Meanings of static Forward declarations to avoid large includes C++ casts (especially static_cast vs. reinterpret_cast, we don't care much about dynamic_cast)
- Meanings of static and its relation to the order of initialization problem
- Forward declarations to avoid large includes that bloat compile times
- C++ casts (especially static_cast vs. reinterpret_cast, we don't care much about dynamic_cast)
Performance and memory management.
- How might this be bad, and how would you fix it? "void MyFunction(MyClass c);" - we are testing for Reference vs Pointer vs Copy, which tends to thwart most folks who only deal with GC languages
- "Why is fragmentation bad, and how do you address it?" - We want to hear the words "object pooling".
- Heap vs. Stack (or static) - We want an understanding of where in memory variables are allocated
- "What's your optimization process?"
- "What's your debugging processes?" - We want questions that steer towards data breakpoints, setting instruction pointers, and changing watch window values
Domain Expert
Each of these categories is highly dependent on the position being applied for. We would try to ask open-ended questions that relate to problems that somebody on the team has solved before as if picturing an alternate universe in which the candidate might solve the problem another way that was equally legitimate or reach the same set of conclusions after a Socratic method style discussion.
Try to ask something close to what they've done, before
- What are some typical challenges with visual scripting? How do you address these challenges?
- What are console issues that plague AI programmers and how do you overcome them? - If they don't know about consoles having weaker CPUs than dev machines, go ahead and inform them of that and see if they have any tricks for reducing CPU costs with minimal loss of parity with the expensive version
- What are console issues that plague graphics programmers and how do you overcome them?
- What are possible ways that Hackers can cheat in an online game, and what countermeasures can you employ?
- What methods can you use to mitigate bandwidth limitations for games that potentially have lots of replicating actors ?
Architect
Try to ask something relevant to the job you are hoping they can do. We are specifically looking for candidates that will minimize the amount of technical debt their first pass would introduce into our codebase.
- What makes a good system for X and what are the important aspects of how you'd architect that? - X can be anything they have expertise and interest in (Locomotion, UI, Music, Combat, Save/Load)
- "How would you refactor a giant chain of if-else statements?" - possible answers might be interfaces, virtual functions, table lookups, etc.
- Ways to deal with multiple causes affecting the same thing (i.e. player muting or pausing the game) - We want to see if they have a recipe for this, such as using an array of object pointers to turn something on/off when its empty or not empty
- Ways to deal with order of initialization problems
- What are some of your techniques for reducing cognitive load when making tools?
Colleague
- You've never done a thing before, but are given a task to do it. How do you approach this? - We want to hear them talk about written specs and iteration. We don't want them to be the type of developer that can only do things they've already done before.
- What's a code thing you feel strongly about? Imagine another coder does the opposite. What do you do? (role play example would be spaces vs. tabs)
- You got bugs because another coder is breaking your stuff. What do you do?