by prepend · 5y ago · 0 comments
It also helps a little with culture to weed out the “I’d use a library” or “I’d Google it” as the purpose is to just walk through how to code something.
I never asked anyone to write a linked list, but it is sort of straightforward to write in a short period of time.
I think that's the most honest answer, and someone in the field for 10+ years I _prefer_ those answers. I don't want someone reinventing a library if a good one exists, and I hope people Google answers (or use Stack Overflow) to find solutions that are a bit more vetted. I was at a company where they pushed for all their own coding and it was a _mess_. The amount of proprietary technology we had to maintain was ridiculous, and in most cases there was 3rd party libraries that would have handled the problem as well or nearly as well.
I agree that "I'd use a library" doesn't tell you how good of a coder someone is, but I'd much prefer a "lazy programmer" to an overly-clever, always-do-it-yourself programmer. If the point of the interview is to see how someone codes, have them code something in the realm of what they would actually be doing.
Also, to be clear, if you are incredibly clever _and_ know how to do it yourself, but seek to find the balance of when to use libraries vs when not t,o I find that the most valuable.
Background: Current FAANG employee, previously CTO of small startup
Saying "I'd use a library" isn't a reliable signal. If you hire based on it, everyone will just parrot it. On the other hand, being able to solve programming/math problems is a reliable signal. Linus and Jeff Dean are very good at such problems and it's not a coincidence.
True. That's why you shouldn't be asking a question where that's a good answer in the first place.
> Linus and Jeff Dean are very good at such problems and it's not a coincidence.
Sure. But being good at these problems also isn't what makes Jeff Dean or Linus good programmers. Being good at solving novel problems is. The problem with the linked list question is that half of your interviewees will have seen it before and half of them wont, thus giving you quite a biased view on them.
That's just not true at all. There's a huge supply of algorithmic problems and it's easy to invent new ones, so a typical problem given in an interview will be novel to pretty much all interviewees.
I’d like a better question, but time is limited and spending lots of time on explaining the context behind a real example is harder. Although it’s not like I’m married to these questions and would gladly replace them with some generic question that tries to address threading, resource management, and whatever linked lists are supposed to test.
I meant if that’s their only answer and they aren’t able to design something like a linked list from scratch.
Usually the answer went like “I’d of course use the built in class Foo, but for purposes of this answer, yadda yadda yadda”
Sometimes I would get someone who would argue over wherever it’s a dumb question or try to explain how they don’t know how to make getters and setters because they would just Google the answer. So that’s a bad sign for culture, teamwork.
IRL you don’t want people making their own linkedlists, just like no one should actually write FizzBuzz.
But it’s helpful to filter out the number of non-programmers who apply for programmer jobs.
I keep hearing about these people, but I have never met one in 20 years.
I also think the FAANG interview was pretty bad overall (took 6 months to go through), the last question was great. It required no algorithms, but a difficult problem to solve that required me to think on my feet rather than apply a known algorithm.
I can also tell you that my current team leads have both emphasized the importance of being able to find information, less importance being able to do it off the cuff (which I agree with).
What was the question?
The point of the question is to solve a problem in ~15 minutes. Algorithms and Data Structures are used for these because everyone knows them.
Even when not teaching about memory, it's used to teach recursion.
Call me crazy, I think an interview question should test for one's ability to program well, not test their memorization knowledge.
My argument is precisely that linked-list questions are a poor proxy for programming well. It's testing the wrong thing(s).
Then I'll ask something like "write a function to find the nth-to-last entry in a singly-linked list", which is possibly difficult if you haven't come across multiple-runners before.
But the meat of the interview is something like "design me an algorithm to manage the entry-gate for a car-park that can cope with bikes (1/2 space), cars (1 space) and busses (4 spaces)".
There's so much you can do with that last one. The most impressive answers I get are those that recognize it as malloc() with zones, and cope with the corner-cases (can't park a bus around the corner of a car-park, 4 spaces have to be in a straight line...)
I mean, I have a variety of questions like each of the above, and I tailor the interview to suit what other members of the team are asking too, but the quick-functions at the start are really to calm nerves and get them into the swing of the interview. The main point is the design/thought-process one, which takes the majority of the time.