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.


One thought on “What kind of engineer does Facebook want to hire?

Leave a Reply

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