Live data from Hacker News

Algorithms Interviews: Theory vs. Practice (2020)

danluu.com

11–20 of 69 posts

Re: Algorithms Interviews: Theory vs. Practice (2020)

#12
The goofy thing is that these questions feed back into dev culture and create a perception that people who’ve worked at a FAANG must be a god of programming.

Call it what it is: your intellectual laziness in evaluating people and your own bias towards “winners.”

Regression to the mean is very real. I doubt an org of sufficient size can truly beat it, if only because not every employee can do well in every situation/project, regardless of their skill level.

Re: Algorithms Interviews: Theory vs. Practice (2020)

#13
post #9

I have definitely seen senior developers put quadratic and even exponential algorithms into production and cause global outages. Code review didn't help, because their code was reviewed by other people who were interviewed to the same low standard. I continue to insist on algorithm & data structure interviews for software engineer candidates. Not every project needs them as much, but in large enough institutions, eve…

CP (Competitive Programming, Olympiad/leetcode puzzles) uses Computer Science (Algos & DS) the same way as e.g. Physics and Biology use Mathematics, i.e. it is a completely different discipline with its own trivia knowledge and tricks that has nothing to do with a software engineering.

Re: Algorithms Interviews: Theory vs. Practice (2020)

#14
post #10
post #9

I have definitely seen senior developers put quadratic and even exponential algorithms into production and cause global outages. Code review didn't help, because their code was reviewed by other people who were interviewed to the same low standard. I continue to insist on algorithm & data structure interviews for software engineer candidates. Not every project needs them as much, but in large enough institutions, eve…

Annoying counterpoint, of course, I've seen senior developers also stall out on avoiding quadratic code to the point that they didn't get the code delivered and then the project got scrapped. The most widespread failure I have seen, by far, is to write code that is so abstracted out that it isn't really clear on how to get the necessary parts inline to get at efficient code. You'll have an obvious path on how to load…

But computational complexity is a separate concern from level of abstraction.

Re: Algorithms Interviews: Theory vs. Practice (2020)

#15
A standard CS master student's understanding of algorithms is very very bad. I wasn't necessarily any better at the time either; so I think ability to learn is more important than knowing algorithms fresh out of school.

The level of algorithm skills I deal with in code reviews is to correct and explain the redundance of statements like

bool variable = true...

if (variable == true) ...

So I don't dare expect a deep understanding of O notation and algorithm efficiency.

Re: Algorithms Interviews: Theory vs. Practice (2020)

#16
post #9

I have definitely seen senior developers put quadratic and even exponential algorithms into production and cause global outages. Code review didn't help, because their code was reviewed by other people who were interviewed to the same low standard. I continue to insist on algorithm & data structure interviews for software engineer candidates. Not every project needs them as much, but in large enough institutions, eve…

>their weak solution can easily cost the company and its other engineers far more than it would have cost to interview engineers properly and compensate the fewer qualified engineers commensurately.

Anything that supports this? Because I don't believe it at all

The only thing that I can think of that could cost company a lot is data corruption / database being destroyed

Unless it is very specific case like HFT

Re: Algorithms Interviews: Theory vs. Practice (2020)

#17
post #13
post #9

I have definitely seen senior developers put quadratic and even exponential algorithms into production and cause global outages. Code review didn't help, because their code was reviewed by other people who were interviewed to the same low standard. I continue to insist on algorithm & data structure interviews for software engineer candidates. Not every project needs them as much, but in large enough institutions, eve…

CP (Competitive Programming, Olympiad/leetcode puzzles) uses Computer Science (Algos & DS) the same way as e.g. Physics and Biology use Mathematics, i.e. it is a completely different discipline with its own trivia knowledge and tricks that has nothing to do with a software engineering.

Knowing how to do math is generally useful as a biologist or physicist. Sure there’s trivia or whatever but knowing how an array works is definitely important for software engineering, just like knowing how to do algebra is also important for biologists.

Re: Algorithms Interviews: Theory vs. Practice (2020)

#18
post #10
post #9

I have definitely seen senior developers put quadratic and even exponential algorithms into production and cause global outages. Code review didn't help, because their code was reviewed by other people who were interviewed to the same low standard. I continue to insist on algorithm & data structure interviews for software engineer candidates. Not every project needs them as much, but in large enough institutions, eve…

Annoying counterpoint, of course, I've seen senior developers also stall out on avoiding quadratic code to the point that they didn't get the code delivered and then the project got scrapped. The most widespread failure I have seen, by far, is to write code that is so abstracted out that it isn't really clear on how to get the necessary parts inline to get at efficient code. You'll have an obvious path on how to load…

I’m curious for more details. I imagine this has to be more interesting than “Just write the double for loop.” “No.” “Ok I guess we’re canceling this project.”

Re: Algorithms Interviews: Theory vs. Practice (2020)

#19
If you don’t know Dan or haven’t read enough of his work to get this,

> I can't pass algorithms interviews! When I say that, people often think I mean that I fail half my interviews or something. It's more than half.

is insane.

Dan’s day job is (or was, on the occasions that I’ve worked with him) to identify and solve the weirdest, gnarliest scaling and performance bugs in extremely large systems. If Dan isn’t passing your algorithms interview, it’s not testing what you think it is.

Re: Algorithms Interviews: Theory vs. Practice (2020)

#20
post #13

Earlier quoted context omitted.

CP (Competitive Programming, Olympiad/leetcode puzzles) uses Computer Science (Algos & DS) the same way as e.g. Physics and Biology use Mathematics, i.e. it is a completely different discipline with its own trivia knowledge and tricks that has nothing to do with a software engineering.

Knowing how to do math is generally useful as a biologist or physicist. Sure there’s trivia or whatever but knowing how an array works is definitely important for software engineering, just like knowing how to do algebra is also important for biologists.

"knowing how to do math", is roughly how one who does not know any math beyond the tricks describe above describes mathematics.
Post reply on HN