r/programming • • Sep 22 '20

Google engineer breaks down the problems he uses when doing technical interviews. Lots of advice on algorithms and programming.

https://alexgolec.dev/google-interview-questions-deconstructed-the-knights-dialer/
6.4k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

0

u/[deleted] Sep 22 '20

[deleted]

23

u/badtux99 Sep 22 '20

Better ways exist, especially for hiring experienced engineers who have a track record. Asking them to explain work they claim they've done that is relevent to the problem set you're trying to solve is simply common sense. If they can show they actually understand what they claim they did, then you can believe their track record. This isn't rocket science, there's actual studies and research papers that have been done on this shit. Google's process is oriented around new college hires, and IMHO that's deliberate -- they don't want to pollute their googleness with olds who have actual experience solving real-world problems and can point them to already-existing algorithms and software, because that's no fun. Re-inventing everything from scratch is what's fun.

66

u/elcapitaine Sep 22 '20

To be fair I've talked to google interviewers and they understand that their process is heavily, heavily flawed. They just dont have a better way.

Maybe they should try actually conducting an interview. Not a quiz. Ask about past experiences like every other industry maybe? Sigh...

71

u/ProcyonHabilis Sep 22 '20

Having tried that, I can assure you that you will get lots of people who are adept at sounding like a good candidate, but can't seem to code to save their lives. Interviewing is hard.

31

u/hardolaf Sep 23 '20

I worked in defense right out of college. We learned through decades of collective experiences that you can learn a lot by having a relaxed interview environment, require the candidate to present and explain a previous project that they worked on, and by making the candidate believe that the engineer hanging out with them at lunch and giving them a tour was on their side. We very rarely couldn't figure out someone's skill level and capabilities in the process.

No need for complex trivia questions or algorithm questions that in reality you'd look up. The only real trivia we'd ask is to have people explain fundamental concepts in their field to us as if we were new grad engineers. From what we could tell, we had a much lower false positive and false negative race than the major tech companies.

8

u/ProcyonHabilis Sep 23 '20

Yeah I agree with all of that, that approximately the same as my best answer for how to go about doing an onsite. The problem with that is it is difficult to do efficiently. The earlier screening stages are the part I don't have a great solution for.

3

u/hardolaf Sep 23 '20

We did resume review and phone screens. We were targeting a 70% on-site to offer rate as anything less was seen as wasting time and money. We could normally weed out weak candidates by having HR and engineering phone screen a candidate. HR to cover basic things and engineering to probe into their work history and determine what they actually say they did. Often with simple questions related to resume items to determine if they were lying. Phone screen results would be turned into a score and 'best fit for role' designation which the hiring managers would use to select who to interview.

→ More replies (3)
→ More replies (3)
→ More replies (3)

50

u/munificent Sep 23 '20

Google interviewers do ask some questions about the candidate's work history and resume, but that ends up being of limited use as a hiring signal. When you focus too much on that stuff, what you end up hiring is:

  • People who are really skilled bullshitters.

  • Extroverts on the bad end of the Dunning-Kruger scale.

  • People who are culturally similar to the interviewer.

Those are all anti-goals for Google's hiring process. Asking abstract algorithm questions is definitely weird and not entirely related to what the job actually entails, but it less subject to those pernicious biases.

9

u/HettySwollocks Sep 23 '20

People who are culturally similar to the interviewer.

/\ This is so true, and I'll be honest I did exactly this early on in my career. I'd build a mental picture of what I thought they'd be like when in actual fact I was just trying to hire myself.

It dawned on me one day when I was interviewing this guy who I just thought was a arrogant prick, he demonstrated his coding ability well but something about him just rubbed me up the wrong way.

As we were in a bit of a bind to find a new developer I begrudgingly gave him the green light. He turned out to be shit hot, a genuinely nice guy who I became personal friends with.

It turns out that's just how he converses, once you get past the brashness and just accepted "Yeah that's just Dave" it no longer mattered.

Once I discovered this fact I felt really disappointed in myself, how many people did I turn down because I couldn't see through my own inadequacies? Now I make damn sure not to make the same mistake, I'll throw it to fellow interviews to cross check any negative feedback.

→ More replies (1)

4

u/ggtsu_00 Sep 23 '20

Then you end up only hiring people who maxed out all their stat points on interviewing skills, but 0 points on actual technical skills. They will then go on to fast talk their way out of every work assignment, pass off their work on to others while taking credit for their work, are constantly always blocked by something trivial, suck up everyone else's time and eventually you have to fire them after you find out they putting all their tasks up on Koder and Bountify.

21

u/mihirmusprime Sep 22 '20

There are far way too many candidates to do that. You have a bunch of candidates that say they are experienced Python developers for a Python related job and now what? There's no way to filter out from the best from the rest without some kind of technical challenge.

52

u/elcapitaine Sep 22 '20

Except every other industry manages to interview and hire candidates without some sort of special test. They look at past work, references, and ask questions in an interview. What makes us so special?

And if we do insist on a technical challenge, why are they not related to the actual jon? Why is it just something pulled out of Cracking the Coding Interview?

To me, it's just that as an industry we're lazy when it comes to interviewing.

25

u/SanityInAnarchy Sep 22 '20

They look at past work, references, and ask questions in an interview. What makes us so special?

Some of them have certifications that are actually meaningful. Aside from that, though, I'm a little curious how well it actually works, given how many people can pass an interview like you describe and yet fail FizzBuzz.

And if we do insist on a technical challenge, why are they not related to the actual jon? Why is it just something pulled out of Cracking the Coding Interview?

I'd guess it's that you still want it to be something the candidate hasn't seen before, so you can see them actually solve a problem, not just regurgitate a memorized answer. The more real-world context you give a problem, the more you end up with either trivia, or a problem too large to solve in a 45-minute whiteboard interview.

If you're not Google, and you've got few enough candidates that you can spend a couple hours on a single interview, you can do way better -- the best technical interview I had was with a tiny startup, they just had me plug my laptop into a projector and gave me a few small problems to solve, complete with unit testing and whatever tooling I wanted to bring into it, even searching the Web if I wanted.

But you'd also have different priorities. Google cares more about keeping bad candidates out than they do about making sure to get all the good candidates -- they have enough people trying to get in that they'll get enough good candidates -- and they don't have enough time to try to optimize for both.

9

u/SJC_hacker Sep 22 '20

They do have the time. I spent a total of about 9 hours interviewing with Google, split over 8 separate interviews, including six coding coding interviews. This was divided up into initial screening of two separate coding questions, then final interview consisted of four separate coding questions (it should have been three, but they screwed up and gave me an extra one).

So the question is do we give one problem to solve over five hours, or five different problems to solve in hour each.

The problem with all the little problems - one the questions that I didn't get right, was straight out of a 'Hard' Leetcode problem I hadn't practiced yet.

I just interviewed with another SV company. Coding interview was three problems of increasing difficulty. The second question was LeetCode problem, that I *had* encountered, and was able to solve. I only got halfway through the third problem. But apparently this was enough to get to interview with hiring manager.

So the gridning LeetCode does seem to help.

I do actually find some of the LeetCode problems interesting, and they do come up in actual use cases, from time to time . For example, implement an LRU cache in an optimal way. Caching is a pretty common problem in that comes up in a actual systems, from CPUs pages to databases.

Other LeetCode problems are just annoying and really esoteric.

4

u/SanityInAnarchy Sep 23 '20

Another advantage is, you get enough interviews with enough different people that it's less likely one bad interview (or bad interviewer) will sink you (or let in someone who sucks). And they have time, but in aggregate -- no one interviewer had to spend an entire day on you, the way they did at that startup.

The idea that you need to study for such an interview is... suboptimal, but I don't think it's an indication that the interviews can't work. Turned out you could solve those problems, given the right preparation.

→ More replies (2)
→ More replies (3)

0

u/[deleted] Sep 23 '20

[deleted]

→ More replies (1)

9

u/[deleted] Sep 23 '20

Except every other industry manages to interview and hire candidates without some sort of special test

Finance is literally worse

31

u/[deleted] Sep 22 '20 edited Sep 23 '20

Every other industry doesn't have anywhere near the response we do.

Part of the issue you're facing is that you seem to think that it's a problem that good candidates can fail a software engineering interview.

It's not.

The businesses only care that bad engineers don't get hired. They really don't care if some of the good ones are stuck in the mix with them.

That's what happens when literally 10,000 people interview for one job posting. Seriously. Probably more for a Google or a Facebook.

What do you call the guy who came in #2 spot out of 10k engineers to be interviewed for a SWE spot at Google?

Still looking for employment.

→ More replies (4)

6

u/Belgand Sep 22 '20

Or bring in a portfolio. Musicians aren't expected to rattle off answers about music theory on the spot and then use them to compose a new piece while the interviewer watches and literally judges them. Engineers don't sit down for some story problems before doing an egg drop against one another. It's ridiculous.

4

u/alkanshel Sep 23 '20

I'm pretty sure I'd be sued if I presented code from my prior employers...

3

u/Kered13 Sep 23 '20

And not everyone works on personal projects in their free time, nor should they be expected to.

→ More replies (1)

6

u/eterevsky Sep 22 '20

Probably because it's much harder to do in other industries. Seeing the candidate code, even in imperfect artificial conditions is miles better than a "soft" interview that are just useless

→ More replies (2)

3

u/eterevsky Sep 22 '20

First of all, it is also done. Secondly, in my experience, such questions are more subjective and give less hard data than having a candidate solve a problem and write 30 lines of code in real time.

3

u/bduddy Sep 23 '20

Ever had an interview? 99% of them suck too.

→ More replies (1)
→ More replies (3)