29 ms·
In my personal experience, having interviewed dozens of candidates (data science), I believe that asking "easy" and "simple" questions is the most effective way
by glofish 7y ago
In my personal experience, having interviewed dozens of candidates (data science), I believe that asking "easy" and "simple" questions is the most effective way to probe the problem-solving skills of a candidate. Fun and interesting solutions to easy questions are hallmarks of great individuals.
The question would go like this:
Suppose I have a column-oriented file and I want to print out a column in a reverse-sorted order. How could I go about it?
This question is among the most effective ever. First it filters out the FizzBuzz failures right away, let's you see immediately how people think (does the candidate want to code it up or understands that they could do: cut | sort| head)? It lets you explore the various aspects of sorting numerical, alphabetical, different locales, in numerical you can have generic numerical sort etc. Then what if the file is really large, now a much better approach could be to split sort then merge sort back into one file.
everyone with real work experience has a story about sorting.
but then you can move on, let's do it in your favorite programming language, then explore of what if the data is "infinite" long, a stream ... and so on
it is a topic that can produce very interesting solutions, nobody is stressed out, and people that "fail" do understand why.
Edit: I will also say I feel that I can learn more about a person based on how they respond to easy questions. Are they cocky, are they showing off, are they rattled etc.
- bambo222 7y agoWhy would you do cut|sort|head? You should instead just ask the k-sorted merge question about external sorting. As a FAANG data scientist, I've never once wanted to use cut|sort|head nor have I wanted to work with CSV's. Everything is already sharded and encoded as a schema-enforced binary encoding like protobuf or thrift. The file is so large its better to favor Apache Beam or equivalent to parallelize the aggregations of particular fields over very large amounts of data. But, hopefully you just use some SQL-like interface such as BigQuery that when pointed to sharded files, can easily do aggregations for you with SQL-like language (which, kicks of distributed computing jobs under the hood and is not truly relational). Unless you're streaming data, then that's another question. Testing unix commands is narrow minded IMO. If you want to test divide and conquer plus streaming, then just ask a flavor of that Leetcode question.
- deleted 7y ago[deleted]
- throwlaplace 7y agolol but this is literally a leetcode style problem so what's your point? https://leetcode.com/problems/merge-k-sorted-lists/ https://leetcode.com/problems/merge-k-sorted-lists/ https://www.geeksforgeeks.org/external-sorting/ https://www.geeksforgeeks.org/external-sorting/ and it's literally called "merge sorted files" (page 175 of elements of programming interviews).
- glofish 7y agothe point is to see how people think, it is not so simple to regurgitate pre-learned answers when you alter a problem one small attribute at a time, in each case a different answer becomes optimal, thus you can see if the person understand what needs to be done or not
- throwlaplace 7y ago>the point is to see how people think i feel very strongly this is a disingenuous claim. clinical psychologists go to school for a long time to learn how to assess people's abilities to think. why should i believe that you a random software engineer have any competency whatsoever. in reality this is exactly the reason standardized exams (or standardized interviews such as leetcode style problems) exist - because average person can't accurately make that call.
- enjoylife 7y agoUpon completion of the interview the problem would indeed look like the result of the leetcode problem. However the take away from the op is in how the question has a narrative. It enables a dialogue over time. Each sub problem provides n ways of exploring a solution. Each problem providing a sounding board for the candidate to pronounce their thoughts. Such questions are effective at providing more signal(read as talking out loud) from candidates.
- freethinker9 7y ago> 'i feel very strongly this is a disingenuous claim.' ... > 'clinical psychologists go to school for a long time to learn how to assess people's abilities to think.' Is that really what you think? Here's the harsh, cold reality: psychologists are mostly quacks. The fact that you so strongly believe otherwise shows that your brainwashing runs deep. In reality, it's quite possible for awake and learned persons to study and understand the thinking of others. I do it every day. Case in point: > 'why should i believe that you a random software engineer have any competency whatsoever.' It seems you're one of those 'specialist' types, who is so much of a specialist that they actually believe being hyper-focused on one narrow thing to the complete and dimwitted exclusion of all else is the only possible mode of existence. God help you if you were ever to learn that there are actually other types of people out there in the world who in some cases know twice as much as you do about your given area of 'expertise' plus 1000x what you know of anything else. > 'in reality this is exactly the reason standardized exams (or standardized interviews such as leetcode style problems) exist - because average person can't accurately make that call.' Not everybody is average, dimwit. Especially the sort of people who are supposed to be interviewing top tier programmers. And not everybody is an autistic dweeb who can't understand other humans. Poker players have a saying: if you haven't figured out in the first 5 minutes who the mark is, then you're it. Get a clue, noob.
- thedance 7y agoHow do you sort an infinite stream?
- glofish 7y agothe post was getting too long to put in all the details, but basically, what I was getting at, imagine the data comes in batches and you have to retain the N largest seen so far
- minimaxir 7y agoIMO, that's not an appropriate question for a data scientist. Maybe it's better for a data engineer or a SRE.
- glofish 7y agoBasically you are saying that you cannot think of a way of doing this, other than the most inefficient way --> hiring a new person This answer would make you fail the interview :-)
- nhumrich 7y agoOr pass the interview if it was a management role
- aprdm 7y agoIt's honestly pretty ridiculous seeing your tone in the comments and how you think that highly about your bad interview questions and your flawed conceptions about the solutions, including CSV and TSV confusion. This smile makes it embarrassing even. Hope I never pass your interview!
- nutjob2 7y agoThe question is ambiguous and misleading or just simply nonsensical. This sort of thing is sadly common in interviews, where the interviewer some arbitrary answer in mind and expects you to read his mind, which is possible only some of the time. By definition you can't sort an infinite list. You've conveniently turned the question, in your mind, into something like "how do you efficiently maintain an ordered list of incoming items?"
- mattmanser 7y agoA column orientated file? What format? Excel? CSV? What is cut, sort or head? Are you only accepting Linux candidates then, a tiny percentage of users? This sort of utter nonsense question, heavily loaded to your "standard" experience, which is anything but, is even worse than the questions cited in the article. All you're doing is filtering for people who are in your tribe, who followed the same path as you and think like you, use the same tools as you and the same OS as you. Pretend all you want, but you're filtering not by "experience" but by trying to find people in your tribe, which is naturally heavily weighted.
- Igelau 7y ago> Pretend all you want, but you're filtering not by "experience" but by trying to find people in your tribe, which is naturally heavily weighted in chauvinism, racism and elitism. I didn't realize Linux Users counted as a race now :D
- BlueTemplar 7y agoWe're a penguin-related species...
- ramraj07 7y agoHe didn't ask to use cut, you could use whatever windows function you have used as well. Unless, of course, you've never have had to unmangle a weird text file to get something out of it in your computing history. Then perhaps I don't want you at all? OP asked a very open ended question, merely made a suggestion that it could also be done with some standard Unix programs (I grew up on windows and even I know about cut and awk because you spend enough time anywhere in tech you will know these). Why it triggered you, not sure, but perhaps the question it's doing its job after all.
- ip26 7y agoThen perhaps I don't want you at all? I've watched a number of new grad hires pick up bash, vim, and version control from scratch in a month or two and go on the be very successful. For better or worse some good schools don't cover those sorts of ancillary skills, and not every good candidate will tinker with Linux as a hobby.
- minimaxir 7y agoAs someone who has had bad data science interviews before getting my current data science job, the process is highly variable. I've had interviews where the interviewer is looking for a specific right answer, with the answer being a binary you-know-it-or-you-don't thing that can't be talked through or worked out in a dialogue with the interviewer. An example was a whiteboard problem requiring the BETWEEN syntax for SQL window functions, which is very uncommon. After I asked for a hint, the interviewer replied "You don't know the BETWEEN syntax for window functions? Everyone knows that."
- hobs 7y agoMy favorite iteration of this is also when the interviewer has a suboptimal answer to this question, and expects you to parrot the wrong thing back to them. I could tell I annoyed my interviewer when they told me I was wrong and I demurred, and politely asked them to look it up since there was some question about the facts. They did not look it up.
- lostcolony 7y agoI had that from a Microsoft interviewer. Thought my code was O(n^2) because he was a C guy...whereas I was writing it in Java (something I had checked would be okay with both the recruiter and the interviewer). Querying the length of a string is an O(1) operation, not O(n), so while you could make the case it's suboptimal (since a function call per loop instead of just a variable lookup), it's not quadratic in behavior. And when he asked what I would do if a number overflowed and I said "...let the exception bubble up because based on the function you asked me to write there is nothing I can do cleanly within it" it was pretty clear the interview was over. Good times.
- ansgri 7y agoTIL even sqlite has window functions.
- minimaxir 7y agoMySQL and sqlite only got window functions very recently, years after the aforementioned interview. On a take-home test around that time, the question specifically said to use PostgreSQL just because the answer required a window function.
- overgard 7y agoI feel the need to nitpick your example. > does the candidate want to code it up or understands that they could do: cut | sort| head Piping together commands is undoubtedly programming, just in ancient shell script. So in a sense you're really testing for bash expertise. Which is maybe really relevant to you but I wouldn't say you're really "avoiding" coding by knowing to use those commands together, you just decided to code it with obscure shell commands. I might fail your test by choosing to write that sort of thing in python, because I could write it much more reliably in 10 minutes than deal with all the incredibly weird things that can happen in bash. I mean the final product in bash might be slightly more elegant, but your terminal history is probably littered with "man cut" and various attempts at it. But for your example, my answer might be: if you're querying this file once, you may be querying it again, it's probably just way simpler to load the thing into sqlite instead of trying to imitate sql with some janky unix commands. > everyone with real work experience has a story about sorting. I am 34 and an experienced coder and I literally have no stories about sorting, and I've never once wanted to sort a CSV file on the terminal.
- glofish 7y agosqlite answer - excellent, that is exactly what I am looking for, things people did, potential solutions let me understand the candidate's real background - not the buzzwords what is not well received is the judgmental tone, passing judgment about me for things you cannot possibly know, no need for that either, simple questions also irritate some, very important to weed those people out too, I expect you would fail the test because of the attitude, even though if this were a real job interview you'd do your best to suppress it, it would come out
- satisfaction 7y agoWhew, My first thought was import the thing to database, use database engine to sort.
- invalidOrTaken 7y ago>what is not well received is the judgmental tone, passing judgment about me for things you cannot possibly know But this is the irony---a job interview is a judgment. Why do you think feelings on this run so high?
- rtikulit 7y agoAround 1990 I had to do some interviewing and I used this kind of intentionally underspecified simple problem to weed people out. (It seemed radical at the time.) Did they realize the problem was underspecified? Did they try to elicit the underlying “why”? Did they collaborate with me to complete the spec? Were they able to restate the spec coherently? Could they articulate a workable implementation in some technology domain? Basic stuff. Interesting thing is that there were people who really didn't do very well, who we hired anyway, who went on to be reasonably productive and reliable developers. In retrospect I concluded the cognitive and social basis of their ability was incomprehensibly different from mine. But I'd still do those questions today.
- Carpetsmoker 7y agoDifferent people are good at different stuff. In my experience the best teams are those with a diverging skill set: Alice may be really good at asking these kind of "why" questions, whereas Bob is really good at quickly implementing things from a spec, and Chris may be very good at databases, etc.
- zemo 7y agothe responses to this are breathtaking. I think I would decline to hire the majority of HN users because of their arrogance. My partner is learning about data science now so I asked them if I could try this question on them in the context of a data science interview, first thing in the morning and without coffe. They looked at me and said "being asked data science interview questions by your spouse right after waking up is the worst thing in the world but I dunno I would load it into pandas and put it in a data frame". And like honestly that's not how I would do it (I would do awk | sort | head because I always forget the cut column options) but the whole point is that the answer prompts further discussion. Now I know to ask about python and pandas (the thing the candidate uses and knows), and not, I dunno, scala and cascading/scalding or whatever (the thing that I know or use). Good questions investigate what the candidate knows. Bad questions investigate whether or not the candidate knows the things you already know. People on this site are way too concerned with "being correct".