Live data from Hacker News

Algorithms Interviews: Theory vs. Practice

danluu.com

31–40 of 77 posts

Re: Algorithms Interviews: Theory vs. Practice

#31
post #22
post #19

Opening statement: > When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down" In 20yeara I've never heard someone say anything like that.

If we are one query from bring down the site I don't want to be anywhere near that site.

If you haven't had a single query bring down a service at least once, you just don't have enough industry experience with services.

It's surprisingly easy to bring down complete complex services system with a unlucky degenerate case.

Re: Algorithms Interviews: Theory vs. Practice

#32
post #3

> At one point, after getting a promotion and a raise, I computed the ratio of the amount of money my changes made the company vs. my raise and found that my raise was 0.03% of the money that I made the company, only counting easily quantifiable and totally indisuptable impact to the bottom line. Would profit/revenue sharing help with this?

No. Profit sharing gives you money based on the overall profitability of the company. However, even if your contribution is enormous, it's unlikely to make more than a barely perceptible change to the overall profitability of the company, meaning the impact on your own pay will be tiny.

Profit sharing works by trying to make employees feel connected to the success of the business, but they don't make sense based on any kind of effort/impact/reward calculus.

Re: Algorithms Interviews: Theory vs. Practice

#33

>"I’ve done maybe 40-ish "real" software interviews and passed maybe one or two of them" I'd say that about mirrors my experience as well. Is this really that common? Here I was thinking that I'm just an idiot.

It sends me into morbid down spirals. I'm almost angry and don't see the point of this. Why not ask for a Nobel Prize in theoretical physics. Two actually.

Re: Algorithms Interviews: Theory vs. Practice

#34
> When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down".

I think people who say this just don't get what's really going on here. If you look at these types of interviews, a big part of what they select for is: 1) Some sort of problem-solving skill that's a mix of raw intelligence and/or ability to solve problems by pattern-matching to things you've seen before. 2) Ability/commitment to work on something that may not be that intrinsically motivating, in the context of getting/maintaining a certain type of job.

These interviews select exactly for that. To pass, you usually have some mix of: - raw intelligence. - ability to pattern match to similar problems you've seen before. - ability and motivation to spend time preparing for these types of interviews, even if they're not really what you care about doing.

That's really what they're trying to capture. It's not a perfect filter (you will still have some false positives and plenty, plenty of false negatives), but it works "well enough".

You really only need one Dan Luu per like 10 or 100 engineers at a FAANG. Most people aren't going to be optimizing at the level he is, they're going to be doing work that's mostly a mix of problem-solving by pattern matching, and ideally, they're motivated enough to have that job for as long as possible.

Re: Algorithms Interviews: Theory vs. Practice

#35

>"I’ve done maybe 40-ish "real" software interviews and passed maybe one or two of them" I'd say that about mirrors my experience as well. Is this really that common? Here I was thinking that I'm just an idiot.

I'm almost 50. I pass about two-thirds of all my on-site interviews, but have 100% failed my FNG interviews (I got an offer from Amazon 15 years ago but declined because I didn't want to move to Seattle). I've failed Google 4 times, Facebook 3 times, and Netflix twice. I think my biggest problem is because I'm so old, their expectations are even higher than what I realistically am. I'm okay being hired as a "senior s…

"Almost 50" means you're in your 40s. And you probably started interviewing in your mid-40s, at the latest, if you've already interviewed 4 times.

The gist of your comment might be correct, but I think we shouldn't perpetuate the mindset that mid-40s or even 50s is "so old."

In almost all knowledge-worker professions, age and experience is acknowledged as an asset. I think software companies are just starting to realize that, as the "move fast and break things" companies are now weighed down under technical debt and imposing hiring freezes on recent grads and junior engineers.

I feel like I'm in my prime in terms of experience and productivity, and though I may not want to work 70+ hour weeks or chug beers at the office anymore, I'm a considerably better engineer than I was 20 years ago. I think many of us intuitively know that, and we shouldn't let ourselves become victim to self-defeating SV groupthink.

Re: Algorithms Interviews: Theory vs. Practice

#36
This topic comes up pretty often, and I think most people agree algorithm interview questions aren’t effective and screen for the wrong things. The question though is, what is a better way to interview? I don’t think I’ve seen any consensus, let alone anything backed by data yet.

Re: Algorithms Interviews: Theory vs. Practice

#37

> When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down". I think people who say this just don't get what's really going on here. If you look at these types of interviews, a big part of what they select for is: 1) Some sort…

This exactly. But I also think that what happens is once people get inside Google or FB, there's a second level of filtering to actually get put on good projects. Most of the engineers they have just need to do what theyre told. A few get picked to help write the next generation computing platform, distributed deep learning, etc.

Re: Algorithms Interviews: Theory vs. Practice

#38

I actually suspect that one of the main purposes of the algo based interview process is a motivation check. It takes time to prep for these interviews. Lots of time. So if you get a candidate that is crushing problems, it can either mean two things: 1) They are exceedingly brilliant and they can program decently 2) They have studied hard, they can reason and code decently Combine that with a system design portion and…

But it isn't working well as they are all starving for talent. When your problem is that you can't find enough people and your pipeline is designed to be a strong filter, you are just exasperating the problem and need to rework your pipeline.

That is you see a lot of talk about this because "the system" isn't working. Some companies are trying new things, but you have to find them among all the ones who don't spend the time to try to find a better way.

Re: Algorithms Interviews: Theory vs. Practice

#39

I actually suspect that one of the main purposes of the algo based interview process is a motivation check. It takes time to prep for these interviews. Lots of time. So if you get a candidate that is crushing problems, it can either mean two things: 1) They are exceedingly brilliant and they can program decently 2) They have studied hard, they can reason and code decently Combine that with a system design portion and…

3) they just graduated from college and still remember all that stuff.

It’s an age screen. People in their 40s don’t have time to prep for those kinds of questions. Nor do people with children who might need a work life balance.

Re: Algorithms Interviews: Theory vs. Practice

#40

> When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down". I think people who say this just don't get what's really going on here. If you look at these types of interviews, a big part of what they select for is: 1) Some sort…

> Ability/commitment to work on something that may not be that intrinsically motivating, in the context of getting/maintaining a certain type of job.

I remember a blog post which was ranting about the current culture at trendy big tech companies (has since been deleted [0], probably the author still wanted a career at such a company) in which a quote resonated with me a lot: 'we're not problem solvers, we're problem endurers'.

Someone solving hundreds of leetcode problems to prepare for an interview just signaled that they are willing do do basically any tedious piece of work you throw at them.

EDIT: [0] Found it: https://web.archive.org/web/20160308032127/https://medium.co...

Post reply on HN