Most active commenters
  • powera(4)

←back to thread

1764 points fatihky | 13 comments | | HN request time: 0s | source | bottom
Show context
DannyBee ◴[] No.12701869[source]
FWIW: As a director of engineering for Google, who interviews other directors of engineering for Google, none of these are on or related to the "director of engineering" interview guidelines or sheets.

These are bog standard SWE-SRE questions (particularly, SRE) at some companies, so my guess is he was really being evaluated for a normal SWE-SRE position.

IE maybe he applied to a position labeled director of engineering, but they decided to interview him for a different level/job instead.

But it's super-strange even then (i've literally reviewed thousands of hiring packets, phone screens, etc, and this is ... out there. I'm not as familiar with SRE hiring practices, admittedly, though i've reviewed enough SRE candidates to know what kind of questions they ask).

As for the answers themselves, i always take "transcripts" of interviews (or anything else) with a grain of salt, as there are always two sides to every story.

Particularly, when one side presents something that makes the other side look like a blithering idiot, the likelihood it's 100% accurate is, historically, "not great".

replies(28): >>12702181 #>>12702207 #>>12702219 #>>12702265 #>>12702346 #>>12702460 #>>12702555 #>>12702650 #>>12702692 #>>12702698 #>>12702714 #>>12702888 #>>12702998 #>>12703034 #>>12703135 #>>12703156 #>>12703184 #>>12703554 #>>12703778 #>>12704177 #>>12704657 #>>12705201 #>>12705560 #>>12705982 #>>12706518 #>>12707763 #>>12708151 #>>12714459 #
1. powera ◴[] No.12702714[source]
This is the SRE prescreen. At least it's the one I was asked in 2007, almost verbatim. Possibly too verbatim.
replies(1): >>12702724 #
2. powera ◴[] No.12702724[source]
Also, his answer on #9 is wrong, or at least <EDIT> his explanation of the conversation is terribly confusing </edit> With 10000 numbers, it's only efficient to create a lookup table with 8-bit integers, not with 16-bit integers.

Based on his LinkedIn profile, I don't think anyone at Google would have thought of him as a "director of engineering". Being an "R&D director" at some unknown company at 24 is entirely un-comparable to a director at Google, and since then he's worked at his own very small company. He was probably a candidate for Senior SRE.

replies(2): >>12702852 #>>12702976 #
3. rayiner ◴[] No.12702852[source]
Do you recall the question? Site's down. I recall thinking the right answer was to use POPCNT but maybe I'm misremembering the question.
replies(2): >>12703048 #>>12703137 #
4. spott ◴[] No.12702976[source]
Who's answer is wrong? Cause no-one suggested a 16bit lookup table.

His answer was to look at 64 bits at a time and do a [0] Kernighan style count. The "correct" answer was an 8-bit lookup table. Which is right is going to be highly dependent on the data and the architecture you are using.

[0] http://stackoverflow.com/questions/12380478/bits-counting-al...

replies(1): >>12703102 #
5. baby ◴[] No.12703048{3}[source]
just prepend "cache://" to the url
replies(1): >>12703136 #
6. powera ◴[] No.12703102{3}[source]
You're correct, I misread what he said the recruiter's answer was.
7. tgokh ◴[] No.12703136{4}[source]
Woah, I've never seen this before -- thanks for sharing!
8. powera ◴[] No.12703137{3}[source]
The question was "how do you do bit-counting of a bunch of numbers". The two canonical answers are "lookup table" and "using bit shifts and multiplying by magic numbers".

The fact that there's a machine instruction for it does makes it a bad question.

replies(1): >>12703196 #
9. mitchty ◴[] No.12703196{4}[source]
Honestly I would have said popcnt as well. Lookup table or bit shifts when I can have the cpu count the 1's? I guess i'd need to benchmark it to be sure. Either way I can't say its a good question.
replies(1): >>12703725 #
10. gcp ◴[] No.12703725{5}[source]
Popcnt isn't particularly well optimized in most micro-architectural implementations.
replies(2): >>12704215 #>>12704321 #
11. mitchty ◴[] No.12704215{6}[source]
Looks that way with a quick test. But it looks like there may be a better way with SSE3 PSHUFB: http://wm.ite.pl/articles/sse-popcount.html
12. rayiner ◴[] No.12704321{6}[source]
Is it? It looks like on most recent Intel CPUs, it's 3 cycle latency, 1 cycle throughput on a 64-bit register. A 8-bit LUT solution is going to less than 16-bits per cycle on any recent Intel/AMD CPU (maximum of two load ports).
replies(1): >>12704597 #
13. gcp ◴[] No.12704597{7}[source]
Hmm, much better than I remember. I guess this goes a long way to explain why this wasn't always seen in practice: http://danluu.com/assembly-intrinsics/