What kind of engineer does Facebook want to hire?

Andrei Alexandrescu, Research Scientist of Facebook, answered:

“First and foremost, the ideal Facebook engineering candidate should be good at coding.

We do care about one’s ability to code; code is quintessential for us, for engineers from front-end to back-end to system configurators to researchers.”

He gave an example. When you choose C/C++, a good warmup question is “Implement strstr()”.

The canonical solution looks like this:

char* strstr(char* haystack, char* needle) {
    for (;; ++haystack) {
        char* h = haystack;
        for (char* n = needle;; ++n, ++h) {
            if (!*n) return haystack;
            if (*h != *n) break;
        }
        if (!*h) return NULL;
    }
}

He also listed other requisites:

The ideal Facebook engineer is a great hacker, a strong generalist (and in addition possibly exceptional depth in some area), and an adaptable person comfortable working in small, fluid teams.

THE END

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>