News for hackers. Stuff that matters.
Re:My worst tech interview experience by avl999 on Wednesday December 01, 2021 @06:44PM (#29410622)
I generally don't mind whiteboard programming interviews but even so asking someone to implement merge sort is a bad question.

My sanity check for any question I ask is- Is the question I'm asking something that someone in the past published a paper about? If so then that's probably not a good fit for a 45 minute whiteboarding interview. This question falls in that category. Generally those algorithms are complex enough that it is unrealistic to expect someone to get them right from first principles so at that point you are just selecting for people who just happened to have dealt with them, memorized them or implemented them recently.

I have a co-worker who used to ask people to past to parse and evaluate infix notation expressions in interviews (and there are companies that ask that question). Always stuck me as weird as multiple papers have been written about that problem, are you really expecting someone to implement a solution to a problem that people spend weeks (months?) thinking about before publishing? Could even Djikstra have come up with the Shunting Yard Algorithm in a 45 minute interview (with implementation on whiteboard) if that was his first exposure to the problem of expression parsing?

Re:My worst tech interview experience by cowmoo728 on Wednesday December 01, 2021 @07:39PM (#29411090)
My impression of the facebook interview experience was that it is specifically selecting people that were calm under pressure and well rehearsed. They are testing for people that put in the effort to crank out a bunch of algorithms practice because they want to ace an interview. FB and Amazon were also explicit that they were looking for people with a particular "get things done and promote myself" attitude. Whether or not those people make good employees, I don't know.

When I interviewed at FB, every round was something that I had drilled on leetcode or similar sites. Yes, the wording was changed and the problems were altered a bit, but they were the same algorithms. And there were also two "lightning" rounds of 15 minutes each to solve two simpler algorithms problems (maybe easy/medium difficulty on leetcode). This experience gave me the impression that facebook's goals in hiring were to select people who really wanted the job and could pass quizzes well.

Re:My worst tech interview experience by lhorie on Wednesday December 01, 2021 @09:09PM (#29411686)
One bit of dirty laundry to keep in mind with FAANG and friends is that the interview process is somewhat self-selecting. Often times, the very people that crammed leetcode in the hopes of landing FAANG roles are the ones interviewing candidates three months later. So there this sort of twisted feedback cycle where the interviewers think that leetcode solving ability is a sort of badge of honor or whatever.

Obviously not all interviewers are like that, and at more senior levels, interviewers do place more emphasis on other criteria, but for entry/L4/L5-ish roles, it's a pretty rampant thing.

Re:My worst tech interview experience by whatshisface on Wednesday December 01, 2021 @08:16PM (#29411367)
I got asked to parse infix notation and figured it out in the 45 minutes despite having no prior experience with parsing anything more complicated than CSV. I am not bragging or anything, I just know these discussions are biased towards kvetching so someone has to weigh in for it being possible to accomplish. My field is not computer science and if anything I'm the perfect example of who the infix notation question should be biased against.

To be fair the interviewer described my performance as "muscling through it" (exact phrasing changed to protect the innocent) so take it as you will. :)

I am aware that there is no way to write this comment without sounding like a boast, but that's just more reason to write it because there are probably a large number of people with the same story who can't balance out the discussion by telling it.

Re:My worst tech interview experience by vanusa on Saturday December 11, 2021 @02:26PM (#29523494)
To be fair the interviewer described my performance as "muscling through it" (exact phrasing changed to protect the innocent) so take it as you will.

And we're supposed to be desperately anxious to work for companies filled with people like that?

Re:My worst tech interview experience by neffy on Wednesday December 01, 2021 @08:05PM (#29411291)
This all started back in the 90´s with companies like Microsoft, but at that time the questions were somewhat reasonable, and just reading something like Programming Pearls was most of what you needed to know.

But I suspect what has happened, is that as those hired by this method got promoted, they started asking harder questions... and that has over time escalated into the current situation which has become somewhat ridiculous in terms of pre-study, etc.

Re:My worst tech interview experience by hpoe on Wednesday December 01, 2021 @08:20PM (#29411390)
I thought M$ was asking questions about how many piano tuners does it take to fit a manhole cover in MTN fugi or something like that?

I just remember too many dumb questions like that and am a bit salty.

Re:My worst tech interview experience by fzil on Thursday December 02, 2021 @12:30AM (#29412858)
AFAIK around 2010ish Google asked a bunch of these kind of questions.
Re:My worst tech interview experience by exdsq on Wednesday December 01, 2021 @09:14PM (#29411721)
I think JPMorgan asks questions like that - I remember seeing them listed on a prep website once
Re:My worst tech interview experience by yodsanklai on Wednesday December 01, 2021 @08:07PM (#29411314)
> My impression of the facebook interview experience was that it is specifically selecting people that were calm under pressure and well rehearsed.

Yes, the more stressed / slow thinker you are, and the more work you need to put to prepare these interviews. It's not uncommon for people to practice for years.

I don't think these companies exactly want this type of profile, but when you interview 10000s of people, you need some consistent criteria so that all candidates are treated equally. With that constraint, I don't think you can find a better interviewing system.

Re:My worst tech interview experience by kazinator on Wednesday December 01, 2021 @09:16PM (#29411730)
If you can crank out some moderately complicated algorithms, even having rehearsed them, and get all the little details right, like all the cases that occur, that does show you kind of know what you're doing.

Someone without the proper CS/programming background who is just trying to rote memorize will screw up the details, and not be able to explain anything if asked about it: like what is the purpose of that line of code?

Only problem is, even if this interview question is good at testing that which it is testing, it might not be selecting people along the right dimensions in terms of being suited for the job. It's not probing all the attributes of a software engineer.

Five candidates, A, B, C, D and E have done equally well on the exercise, excellent in fact, and are hired.

Yet, in actual work, things go funny.

A doesn't seem to believe in testing. Deliveries are sloppy and break things all the time. A is proud of her skills and treats criticism of their code as an insult.

B has never heard the words "version" and "control" in one sentence. B works on an out-of-date version of the code to make a change, and then follows the Wiki instructions for getting a fresh checkout (which pulls the latest baseline) and then just copies their previously changed files into the new checkout. Their code submission therefore reverts numerous changes from other people (incompletely: just in those files), while asserting their own changes. On top of that, B makes gratuitous whitespace changes, doesn't follow any consistent coding standard (never mind the prescribed one), and randomly fixes things he sees wrong that do not relate to the topic of the change.

C cannot handle changes in requirements. Even after code base has undergone many changes, C keeps thinking in the same concepts from when the code was two months old and C had been mostly working alone on that code, knowing everything about it. C's ideas about making changes no longer fit the new code. E.g. C cannot remember that some logic is now distributed, running in several places at once, because that's not how it once was, and consistently forgets that aspect.

D cannot say no to any new task. Whenever someone talks to D, D gets distracted and excited and starts looking into what that person was talking about, and doing work on it. Whenever D gets stuck on something, D easily finds something else, and forgets about being stuck, or to report having been stuck. D leaves numerous tickets in an in-progress state, and that list just grows over time.

E is simply lost in any large project. E has done nothing but programming challenges under 1000 lines of code. E has no skills with regard to navigating a large code tree and understanding the structure of something made of tends of thousands of lines (or orders of magnitudes more). E gets paralyzed when faced with making a change to a large system that will involve making some small changes to eight or nine files. But have you seen E's Tetris in five lines of code?

Re:My worst tech interview experience by burntoutfire on Thursday December 02, 2021 @05:43AM (#29414576)
> B works on an out-of-date version of the code to make a change, and then follows the Wiki instructions for getting a fresh checkout (which pulls the latest baseline) and then just copies their previously changed files into the new checkout.

Do people like that ever make it into Google, Facebook etc. or is it purely a hypothetical?

Re:My worst tech interview experience by creamytaco on Friday December 03, 2021 @05:35PM (#29436479)
They do, we had plenty of dead weight at Google, usually acquihires.
Re:My worst tech interview experience by lhorie on Wednesday December 01, 2021 @07:05PM (#29410814)
Yep. I think it goes further than whether there's a published paper about. It boils down to "does the question have exactly one correct answer?"

One important thing you learn in interviewer workshops is to avoid asking questions with "aha" components, i.e. things that can only be solved if a very specific insight is known. This type of question is problematic because it falls victim to the fallacious assumption that a candidate that excels in one specific problem must necessarily excel at others that are in actuality, at best, only marginally related.

Instead, it is better to ask questions for which the solution can be arrived at with small increments in effort (e.g. maybe there's an obvious brute force solution and you start from there to discuss more optimal solutions, or maybe the candidate got stuck on some specific peculiarity and you can give a hint to unblock them and move on to another part of the problem to get more signal)

Re:My worst tech interview experience by azhenley on Wednesday December 01, 2021 @07:17PM (#29410943)
The "aha moment" is also known as the eureka effect. Psychologists call this "insight problem solving", which is terrible for interviewing since like you said since it isn't a problem that you can build up towards solving. As a teacher, I try to make sure my assignments/quizzes don't fall victim of this.

For anyone interested, there are a lot of interesting studies on the topic if you search on Google Scholar. You've probably already seen matchstick arithmetic problems before (i.e., move a single matchstick to make the equation valid).

Re:My worst tech interview experience by bradleyjg on Wednesday December 01, 2021 @07:33PM (#29411062)
It never ceases to amaze me that a profession full of people that studied something called “computer science” is also filled with people that refuse to read the literature when it comes to hiring and instead lean on gut feelings, anecdotes, and cargo cult-ing.
Re:My worst tech interview experience by gilmore606 on Wednesday December 01, 2021 @11:00PM (#29412421)
> refuse to read the literature ... and instead lean on gut feelings, anecdotes, and cargo cult-ing

I mean, if it works for programming...

Re:My worst tech interview experience by Cpoll on Wednesday December 01, 2021 @09:01PM (#29411630)
I've researched a lot about this since I've had to do hiring, but I haven't been lucky enough to find anything collectively definitive or comprehensive enough to describe as "the literature." Most of it leans towards "what not to do," which is helpful but leaves some gaps. What do you recommend?
Re:My worst tech interview experience by w0mbat on Wednesday December 01, 2021 @07:34PM (#29411066)
I got asked to whiteboard the Dijkstra Shunting Yard Algorithm at TripAdvisor in Palo Alto. I didn't get the job, which I could have done in my sleep.

It's way too complicated to code on a whiteboard. I would never have asked somebody that question at Google.

Re:My worst tech interview experience by gh0std3v on Wednesday December 01, 2021 @08:28PM (#29411435)
I don't think whiteboard programming is really a good metric for measuring someone's skills for a normal software engineering job.

However, assuming that extensive knowledge of certain algorithms (like merge sort), data structures, or computational methods are necessary for a particular job, I think a better question to ask isn't "how do you implement merge sort" but instead to present the merge sort algorithm and then ask the interviewee how it works based on the code given. Obviously still not the best way to assess someone's skills, but I think it's better than just memorizing a bunch of algorithms without being able to explain how they work.

Re:My worst tech interview experience by yodsanklai on Wednesday December 01, 2021 @08:01PM (#29411270)
> Always stuck me as weird as multiple papers have been written about that problem, are you really expecting someone to implement a solution to a problem that people spend weeks (months?) thinking about before publishing

except that these things aren't research material anymore and are now taught at undergraduate level.

Re:My worst tech interview experience by underwater on Wednesday December 01, 2021 @09:49PM (#29411932)
That's the point. No one is solving the problem, they're regurgitating knowledge.

If you care is someone has completed a Computer Science degree, ask to see their resume. If you care if they actually learned the material, ask to see their GPA.

Re:My worst tech interview experience by imoverclocked on Thursday December 02, 2021 @11:48AM (#29418610)
Neither one of those things are reliable sources of information across candidates or universities.
Re:My worst tech interview experience by yodsanklai on Thursday December 02, 2021 @12:33PM (#29419387)
Especially when you consider applications from all over the world.
Re:My worst tech interview experience by underwater on Friday December 03, 2021 @05:02PM (#29436193)
But a 45m technical interview is?
Re:My worst tech interview experience by 908B64B197 on Wednesday December 01, 2021 @07:36PM (#29411077)
> My sanity check for any question I ask is- Is the question I'm asking something that someone in the past published a paper about? If so then that's probably not a good fit for a 45 minute whiteboarding interview.

Also, is it a widely known algorithm? Because then I'm not measuring for programming ability; I'm measuring for rote memorization (there are people that will rote memorize all the sorting algos to be able to spit them out during interviews!).

Asking for a simply program like wc, in my opinion, gives a much better idea if someone can code (hint: there's not a single way of writing it and to define a word).

> I have a co-worker who used to ask people to past to parse and evaluate infix notation expressions in interviews

That's a cool problem to use. I wouldn't expect a perfect parser or even a working one but I would be curious to see how they approach the problem and what they end up writing.

Re:My worst tech interview experience by kazinator on Wednesday December 01, 2021 @09:14PM (#29411723)
Say that it's a binary merge sort over a singly linked list.

A binary merge sort, if written recursively, is straightforward divide-and-conquer. The input list is divided into two halves, which are separately sorted via recursion, and then the sorted halves are merged to produce the sorted output.

The algorithm pops out of the definition. If you know the above definition (or the interviewer has provided it, which they should!) the rest is just an exercise which demonstrates that you can:

- completely analyze a problem's cases, including figuring out the existence of cases that are not spelled out in the description (like how to terminate the recursion)

- manipulate pointers

- decompose a problem into small, simple functions that you can separately reason about: (merging two lists, chopping a list in half, and such).

It's not such a bad interview question. I would actually tell all the candidates at least a day ahead of time that they will be implementing merge sort in C using a singly linked list during the interview, so they can study it all they want and rehearse coding it.

It's complicated enough that it can't just be regurgitated from memory by someone who doesn't know what the are doing. (Say, someone who had someone else write the code, and then tried to rote memorize it.) The memory has to be accompanied by understanding if the candidate is to reconstruct it with few or no flaws.

Re:My worst tech interview experience by rrjanbiah on Thursday December 02, 2021 @04:39AM (#29414208)
FWIW, I have created a tracker under the Open Market Research repo to track such broken hiring and fake job posts https://github.com/OpenMarketResearch/Labs/issues/new?labels...
Re:My worst tech interview experience by WalterBright on Wednesday December 01, 2021 @09:04PM (#29411652)
> parse and evaluate infix notation expressions

Wirth's "Pascal User Manual and Report" has a listing of a program on pg 75 that does just that. Except it emits the expressions in postfix form rather than evaluating them. It's 31 lines of code, including declarations and `end` statements.

K+R "The C Programming Language" has a desk calculator that evaluates postfix form on pages 74-75 which is about 60 lines of code including lines with just a {, and handles +-*/= including user interface and error checking.

Re:My worst tech interview experience by rectang on Wednesday December 01, 2021 @07:17PM (#29410949)
I was just watching a Jon Gjengset "Crust of Rust" stream on sorting, and when his quicksort implementation kept going sideways, I was like "haha how nostalgic".