Thursday, November 13, 2014

The World's Worst strcpy, or: How I nailed an interview by getting stumped.

Let's say you got really lucky and landed yourself an interview at a job you really want. You study up for the interview, and prepare in every way you know how. You've studied the algorithms, the syntax, the code, the design patterns, and everything. And you're confident you can ace any little quiz they give you.

Then you come across a question that absolutely stumps you. Something like, maybe:
What is the function of the following block of code?

01 while(*a = *b) ;
What do you do?

In this article I will go through how to demonstrate good engineering habits—which emphasize knowing what you do and don't know, and engaging with information, over recall knowledge.