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

12

u/LUV_2_BEAT_MY_MEAT Sep 22 '20

My company has you write a small simple program like fizzbuzz, then has you make changes/enhancements to it. For an example we might ask a junior dev:

  • Implement fizzbuzz

  • Now we need it to handle numbers 1 - 200

  • Now we need it to print "foo" on %7==0 and "bar" on %9==0

  • Now we also want to want to output not only to standard output but also to another interface

  • Now it reads the input number array from an HTTP get

Or whatever. The difficulty scales to experince level. I like this because thats what you'll do at your job - negotiate requirements, write code and maintain it. You'll get a feel at how good they are at writing maintainable code, as well as their views on testing/refactoring. We let them bring their own computers and do it in the own language/IDE if they want. We'd even let them google stuff if they asked.

11

u/nokoko Sep 22 '20

What would you do if you received 2k resumes per day, every day selected the best 100 to take your test and 90% of the candidates pass it with a perfect result? Who do you hire at the end of the month?

11

u/LUV_2_BEAT_MY_MEAT Sep 22 '20

The best cultural fit? The most relevant work experience? Other actually relevant things to the job?

6

u/nokoko Sep 22 '20

Does the job at your company involve anything harder that what is in the test, or is it a good representation of the complexity in the day to day work? If that's the case then you don't need to hire the best engineers, so the approach is understandable.

The challenge in hiring at big companies is that you want to present a hard problem (they want the best engineers) that can be completed quickly (people's time is valuable) and does not weed out people because they lack some exact domain knowledge. There are not many of such problems.

7

u/LUV_2_BEAT_MY_MEAT Sep 22 '20

But thats the whole problem: DS/A questions don't give you the best engineers, they give you the people who are best at solving DS/A questions. DS/A is a learned and practiced skill. Theres a whole industry now in getting better in those types of questions that exists for the sole purpose of doing well in these interviews. While these types of questions might provide partial insight into their abilities, things like technical discussions are equally telling: describing past projects, why the did the things they did, why they chose the technologies they chose, what didnt work, what they'd do differently, etc. The coding exercise I described is part of that holistic approach. I know you mentioned people's time is valuable, but again, if you don't take a little more time you dont want the best engineer - you want the best DS/A solver.

2

u/nokoko Sep 22 '20

Unfortunately these metrics are very subjective and hard to use to rank 1000 people and select the 100 best candidates in an unbiased way.

The challenges in the interview process between large and small companies differ a lot, so anyone copying FAANG practices in a 50-employee shop is making a mistake. Similarly, you can't really think that any approach that works well at a small company can be applied as-is to a top tech firm that attracts so many more candidates.

2

u/KrypticAndroid Sep 22 '20

I like this one. I’ve done something like this before and it felt relevant.

1

u/[deleted] Sep 22 '20

This sounds reasonable but I really hate fizzbuzz because it seems like there should be a trick to it and there isn't.

3

u/LUV_2_BEAT_MY_MEAT Sep 22 '20

Thats one of the reasons Gayle Laakmann McDowell gives too for not using it. Which is part of the reason I actually like it.

4

u/[deleted] Sep 22 '20

I'm guessing your logic is that real life problems often don't have clever solutions and you want to see if candidates can realise that sometimes the dumb simple way is better than trying to make everything elegant?

Which is a valid point, but the problem is that you aren't giving them a real life problem - you're giving them an interview question and interview questions are like 90% trick "seems impossible but if you notice this one thing it's really simple" questions. By giving them an interview question that seems to have some elegant solution you're pretty much saying "there's a trick. Find it." - an impossible task.