The Trouble with Interviews

Lately I’ve been submitting myself to a lot of interviews.  About half of them have featured questions posed by people seemingly unprepared to evaluate answers that deviated from a very specific, expected response.  This might not sound like a big deal; if you are wrong you are wrong, end of story.  Unfortunately it’s not that simple, some answers are more correct than others.  Here’s a paraphrased exchange to demonstrate:

Them:  How would you manipulate an object-space to world-space matrix such that it transforms from world-space to object-space?

Me:  Rotation and translation only?

Them:  Yes.

Me:  Transpose the upper-left 3×3 sub-matrix and set the translational column of the matrix to a new vector where the x component is the object space x-axis dotted with the negative of the translation, the y component is the object space y-axis dotted with the negative translation and z component is the object space z-axis dotted with the negative translation.

Them:  You are incorrect.

Me:  It’s equivalent to taking the inverse of the matrix but faster as it only requires six swapping operations and 3 dot products.  The optimization is possible by exploiting the properties of the matrix: namely the rotational component contains mutually perpendicular, unit length vectors.

Them:  You should always just take the inverse, it’s easier.

Perhaps I over thought this question.  Of course you can simply take the inverse but every graphics programmer knows that; it’s not even worth asking.  It’s frustrating that a more knowledgeable answer was dismissed as uninformed or some type of ugly hack.

Here’s another, similar exchange with a different studio:

Them:  Given a 3×4 transformation matrix that contains rotations and translations only how do you compute the inverse?

Me:  [same answer as before]

Them:  That is incorrect.  You simply negate the translational component and invert the rotational component by taking the transpose as you described.

Me:  But you must do the reverse in the opposite order which can only be encoded in standard matrix form by projecting the negative translation onto the original local-space basis vectors.  Negating the individual operations in isolation doesn’t work, they are not separable.

Them:  No.  Transformation matrices rotate and then translate points so it follows you can reverse a transformation by doing the opposite translation and rotation.

I suppose they wanted to know if I understood that a transformation matrix can conceptually be thought of as a rotation followed by a translation.  That particular bit of knowledge is not something that can be easily evaluated, it is purely conceptual and may not be the mental model the interviewee defaults to when envisioning the operation especially when dealing with someone who has an academic background in mathematics.  Furthermore, you can’t accurately evaluate such intuition if you are not prepared to recognize how that intuition can be embedded in a correct answer to a reasonable interpretation of the question.

I’ll stop with the transformation matrix questions even though I have two more almost identical examples.  Here’s another exchange with a different studio involving data-structures:

Them:  Are you familiar with Big-O notation?

Me:  Yes

Them:  What type of data structure would you use if you needed to insert and access objects by key in O(1) time.

Me:  That’s not possible, the best you can do is O(log n).  Typically this is accomplished with a self-balancing binary tree such as a red-black tree or something similar.

They then proceeded to ask me a bunch of vague questions about when and how binary trees turn into link-lists with linear access times.  As it turns out the answer they were looking for was “hash table” and they found it alarming that I mentioned a binary tree.  Alas, inserting and removing into a binary search tree is no better than a link-list when it becomes unbalanced but this is irrelevant as I specifically mentioned a self-balancing tree.  Moreover this is an unfair point to make since the question indicated worst case time complexity and a hash-table has the same problem which occurs when every object gets hashed to the same bucket and you end up with a single list (or tree) of all objects.

The confusion started with the previous question about big-o notation.  I justifiably assumed we were talking about what is possible in theory not what is practical in implementation.  It would have been better to drop the big-o phrasing and simply ask what type of container I would use if the insertion and access of objects by key needed to be as fast as possible.  In this case the person who asked the question seemed to have disregarded the fact that big-o notation refers to the worst case when considering the desired answer and then suddenly remembered and incorrectly applied it when judging my technically correct answer.

Another hiccup of the interview process I have found to be frustrating is the haphazard handling of radiometric terms such as using irradiance and radiance interchangeably or swapping the definition of intensity with the definition of irradiance.  This kind of nonsense needs to stop.  The industry has officially entered the age of physically based reflection models and global illumination.  Even if your game is stylized it can reap enormous benefits from a mathematically careful treatment of the rendering pipeline.  These things matter, we can no longer get away with a sloppy and cavalier attitude towards the physics and mathematics involved.  Formulate your question accordingly.  If a candidate claims your question is mathematically nonsensical…they might actually be right.

Projection transformations and clip-spaces are hazardous areas as well.  I’ve been asked numerous questions about these topics only to be told I am confused about the issue because my projection matrix or clipping algorithm isn’t consistent with DirectX, OpenGL, the PS3 etc.  The problem here is it’s difficult to talk about these things in a general way: the handedness of the coordinate system, configuration of the clip-space, memory layout of the projection matrix w.r.t. the hardware instructions available all matter.

If you find yourself giving an interview consider the following:

  1. Select your words carefully and use proper phrasing.  If you are looking for a laser specific answer ask a laser specific question and specify the exact scenario, API, platform etc. you have in mind.
  2. Be prepared to evaluate the candidate’s understanding of the topic; not whether or not they give the exact answer you expect.  Everyone’s brain works differently and no one will interpret your question exactly as you would.
  3. Prior to the interview brush up on the topics you intend to cover.  This will assist in your evaluation should the candidate approach the question from a correct but unexpected angle or demonstrate knowledge you are not aware of and may interpret is incorrect and/or unrelated.
  4. Clearly indicate when theoretical concerns are being discussed vs. practical properties.

In my experience interviews that are “tough but fair” are the most fun and rewarding even when an offer is not extended.  Flying across the country or driving 3 hours to engage in an uneven and seemingly random evaluation of my competency isn’t fun and I’m unlikely to accept an offer from such a place as its ability to consistently fill roles with the required talent is doubtful.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s