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

751

u/ambientocclusion Sep 22 '20

What a load of non-predictive crap. But at least it makes the interviewer feel smart, which must be the point.

436

u/DrunkMc Sep 22 '20

When I interviewed with Amazon they gave me tons of things to research and read. One of the websites started with a full page describing how the software interview is completely broken.......but it is what everyone does, so we're going to do it!

Something that I will NEVER fucking understand and I hate is white-board coding. The interview was 6 hours long, split into questions to understand you personally and the other half was white board coding. Not even pseudo code, they wanted full fucking syntax.......on a white board. I've been typing my code for 20 years and now you want me to write it? Also, in the packet was a note that this is awkward and you will be uncomfortable, so please practice at home.

Being able to copy, paste, and insert text quickly is all apart of coding and you're taking that away. Its INSANE to me. Especially cause to get to that point, I had to do a coding interview online where I can type and the interviewer could watch me type. I can so easily type and talk at the same time, but now I have to worry about being legible, spacing, oh shit, I forgot to declare something, but I can't insert, so I have to write it small inbetween two lines.

I remember I got dinged, because I did not use getters() in my white board code. He said that's not an object that, it's a struct. I was like, its just white board code, I would obviously use getters in real life. And he was very upset about that.

But yeah, software interviews are fucked. And apparently it still pisses me off, cause I did not mean to go on this rant.

133

u/percykins Sep 22 '20

I like where they insist you use actual syntax in whatever language you want. So I used Python... and had to spend my time explaining how list comprehensions work. Don’t insist I use a language that you don’t know!

81

u/gibtang Sep 22 '20

I once had a programming interview where I told the interviewer that I am going to use an associative array as I need store some key value data and it’s simple to understand. Then the interviewer piped in and ask why not a map instead to store key values instead of an associative array

60

u/the_gnarts Sep 22 '20

Then the interviewer piped in and ask why not a map instead to store key values instead of an associative array

A guy who interviewed me insisted that std::map in C++ was a hash table.

→ More replies (7)

25

u/GET_ON_YOUR_HORSE Sep 22 '20

Aren't these the same thing or are there differences escaping me?

38

u/schplat Sep 22 '20

Effectively yes. Map can actually vary based on the language. Map sometimes means take a function, and apply it to this iterable/list/tuple.

Dictionary is another reasonably common term because Python.

→ More replies (1)
→ More replies (5)
→ More replies (1)
→ More replies (8)

71

u/jl2352 Sep 22 '20

Something that I will NEVER fucking understand and I hate is white-board coding. The interview was 6 hours long, split into questions to understand you personally and the other half was white board coding. Not even pseudo code, they wanted full fucking syntax.......on a white board.

Should have written up Vim inputs for them to type out.

→ More replies (1)

0

u/[deleted] Sep 22 '20

[deleted]

39

u/BigHandLittleSlap Sep 22 '20

This is actually a pretty accurate summary of modern education teaching practical skills like wood working, metal working, engineering science, etc...

I was taught to do technical drawings with pencils, rules, protactors, etc...

Never once in my life did I use a pencil to do a technical drawing after school. Well before I finished my degree, 100% of the industry was using computer-aided design (CAD). My first job, while still in high school, was only using CAD software. Which I had to learn to use on my own. Because it wasn't taught at school.

Similarly, I studied computer science in a University setting. The labs were set up with the UNIX equivalent of Notepad. No debuggers. No IDE. All but one professor would scribble code on a chalk board. The final exams were almost all pen & paper, despite involving mostly coding exercises. When I got a real job, I had to learn how to use an IDE on my own, because it was not taught at school.

Physics was similar, most of the experiments involved 11 hours of taking measurements with pencil & paper, and 1 hour to write up the results... on paper graphs. That was already the era of 100% digital measurement and computer algebra system (CAS) for analysis in practically all fields, at least in the real-world.

Now, keeping all of that in mind, consider this: Google prefers to hire people straight out of University. They get the "best" graduates, people uses to the kind of thing I described, and within just a few years they're "senior" engineers and they're running the job interviews.

This is the problem.

→ More replies (5)

0

u/[deleted] Sep 22 '20

[deleted]

→ More replies (68)

146

u/scottyLogJobs Sep 22 '20

I was like, its just white board code, I would obviously use getters in real life. And he was very upset about that.

Hilarious. Yeah, part of the software interviewing game is whether your interviewer is borderline Asperger's whose only goal is to prove they're the smartest person in the room, rather than a real person. I had someone literally tell me I was "stupid!" for leaving Amazon for a girl back in my home state (who I ended up marrying). Another guy who was clearly on Adderall who kept interrupting me and told me he had interviewed 100 people for this position. Wtf?

Have fun!

44

u/civildisobedient Sep 22 '20

Another guy who was clearly on Adderall who kept interrupting me and told me he had interviewed 100 people for this position. Wtf?

What a horrible existence. I can't imagine a full-time job just interviewing people day-in, day-out... the same questions. Candidate after candidate, some denied, some get hired to do Bigger and Better Things! But not Mr. Interviewer. No... for him, it is a life of thankless drudgery. YOU MISSED A SEMICOLON YOU SHOULD BE ASHAMED. All for the benefit of the company.

22

u/scottyLogJobs Sep 22 '20

Pretty much. If you are interviewing someone and catch yourself evaluating someone based on their semantics or syntax, take a step back and ask yourself what you are actually trying to evaluate. Especially because these people are also the ones who are supposedly looking for "polyglots" who know multiple languages - guess who are the most likely to make syntactical mistakes?

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

39

u/Edward_Morbius Sep 22 '20

Another guy who was clearly on Adderall who kept interrupting me and told me he had interviewed 100 people for this position. Wtf?

30 years ago, I interviewed for a position at company. After several rounds of interviews, I was dropped. A few years later, I noticed that they were still interviewing for it.

10 years later. Still interviewing.

I retired a couple of years ago. They're still interviewing. I still get calls from recruiters. They stop when I explain that the company has been trying to fill the position for longer than the recruiter has been alive.

Not sure if they won't/can't hire anybody or can't keep anybody or what the deal is.

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

33

u/Prod_Is_For_Testing Sep 22 '20

I had a remote whiteboard interview with google. We used google docs to share code. I was expected to get perfect, compilable syntax. On docs. It was the dumbest fucking thing. I failed it and at the end this fucking bozo told me to practice leetcode problems in notepad for my next interviews to be more prepared. What the hell does that possibly prepare you for, other than this ridiculous dick jerk?

10

u/DrunkMc Sep 22 '20

Exactly!!! You only need those skills for interviews and will never reflect your work. So dumb.

→ More replies (4)
→ More replies (32)

93

u/hyperforce Sep 22 '20

What a load of non-predictive crap.

While I agree this is crap, I think the larger problem is the industry as a whole has not found a predictive method that also fits the constraints of the hiring org (time, money, etc).

Why aren't we spending more time on finding out what that is?

100

u/aoeudhtns Sep 22 '20

The way I also look at it: since we haven't found a predictive method, use the cheapest non-predictive method that gives you a minimum level of confidence. In other words, I use the traditional "tell me about your work experience" style and expand on things as we go, delving into rationale for technical decisions that they made and what they found easy vs challenging. Maybe throw a hypothetical based on something real from the team they're interviewing for and try to gauge their critical thinking ability. Etc.

In the absence of any work experience, then I quiz on retention from CS curriculum and try to gauge interest in the field. There's no career motivation like self motivation.

And of course, the candidate has to want to work for us, over somewhere else. I personally would bail out of these puzzle question interviews that have no bearing on the actual job.

99

u/[deleted] Sep 22 '20

One thing that I have started to do is to take a utility function from our codebase (something like a string parsing routine), obfuscate the variable names, then hand it to a candidate and ask what it does. This, IMHO, does a better job of testing what developers actually do (dig through code to add features or fix bugs) as opposed to what we like to think we do (use our brilliance to create the most fantastic software the world has ever seen).

44

u/aoeudhtns Sep 22 '20 edited Sep 22 '20

That is a great idea. And reading code is harder than writing it anyway. Plus I think interviewees would feel less on the spot, even though the task might be more difficult in reality.

Edit: I'm totally stealing this next time I do interviews.

11

u/Phailjure Sep 22 '20

feel less on the spot, even though the task might be more difficult in reality.

I think that's extremely true. If you gave me a programming puzzle with no time limit vs digging through some poorly commented code, I'd feel less stress with the puzzle. If you ask me to do it in 30 mins, no google, while I watch you, I'd rather have the code, because I cannot think creatively to solve the puzzle in that scenario. Reading the code has obvious places to start and things to do, implementing a solution while staring at a blank whiteboard just leaves me standing there wondering where to start (I somehow managed and got a job, but it felt terrible).

Focusing the interview on talking to people about their experience also helps a lot, and is easier for the interviewee. That and asking questions about the usual things they would run into in that position (and some exception cases that may have come up). We did that with our last few hires, it was really easy to catch the one bullshitter, and the guys we hired seemed knowledgeable, and turned out to be good at their jobs.

→ More replies (6)
→ More replies (4)
→ More replies (37)
→ More replies (27)
→ More replies (47)