I interviewed someone who gave responses akin to "I'd Google it." When presssed, he did finally give some reasonable answers. We ended up hiring him, as we'd interviewed 10 other candidates who'd failed at that point. He ended up being a terrible employee. Seriously, when someone asks you the details of a linked list, they're not trying to find out if you will be able to use one specifically on the job. They're tryin…
linked list is not complex for christ sake.
The Programming Interview from Hell
101–110 of 147 posts
Re: The Programming Interview from Hell
#102What a fun interview it would be to actually do this. My favorite interview was for an architect position, where my two future peers took turns telling me horror stories about working there, to see if I would run away screaming. I got the job and only ran away screaming 18 months later.
As an interviewer, if there was someone we liked, we were brutally honest about the company culture. We (myself and my manager) wanted senior engineers who weren't afraid to speak up and help shake things up in the larger organization. If they still accepted the offer, they were what we wanted. We had too many people quit out of frustration instead of fighting.
At another job I applied to as an architect, the manager told me all of the issues with the processes (and lack there of). He tried to "scare me away". I asked him one question. Will I be able to come in and make the changes needed and will he have my back if I inadvertently step on toes trying to do the right thing? He said yes and I accepted the offer.
Re: The Programming Interview from Hell
#103Thats hilarious. I was once interviewing for a C++ position and the interviewer presented me with some C code with a broken "swap" implementation and a driver function and asked me to fix it. I simply prefixed the call to swap with "std::". He wasn't very happy about it. ;-)
Nice. I was once asked to implement a basic filesystem API in C++ including file manipulation, directories and paths, etc. I just said use boost::filesystem and move on with your life. Interviewer was not impressed but at 95% of companies that's what you are going to want to do. Can you imagine interviewing someone to build you a house and spending 90% of the interview time asking him how he'd chop down trees for woo…
Re: The Programming Interview from Hell
#104Thats hilarious. I was once interviewing for a C++ position and the interviewer presented me with some C code with a broken "swap" implementation and a driver function and asked me to fix it. I simply prefixed the call to swap with "std::". He wasn't very happy about it. ;-)
Of course, you acted like a smartass for no apparent reason. You will never be asked to reimplement a library function on your job, these questions are used to see how you approach a problem, your reasoning, etc...
Re: The Programming Interview from Hell
#105Earlier quoted context omitted.
Hmm, which (general) language has no pointers or references?
Python. Ruby. Javascript. Lisp. Haskel (IIRC). They all use them internally, but don't tend to make them available to the programmer (usually because they aren't needed).
Re: The Programming Interview from Hell
#106If someone answered with "I'd google it", I would say "go ahead". I don't mind if someone doesn't know or remember something. That is a random signal. I want to know however if a person is mentally lazy and therefore is merely a "user" of technology or the "maker" of it. That said, being able to at least describe some use cases of some relatively simple data structure is not too much to ask.
Re: The Programming Interview from Hell
#107Earlier quoted context omitted.
Hmm, which (general) language has no pointers or references?
Python. Ruby. Javascript. Lisp. Haskel (IIRC). They all use them internally, but don't tend to make them available to the programmer (usually because they aren't needed).
Re: The Programming Interview from Hell
#108The hiring manager of a small software company gave me a quick brief before handing me off to his technical heavy. "He's hard to get along with, but he's really smart. Oh, and he has two PhDs. He'll tell you that." I was ushered in. The Guy with Two PhDs (he showed me his business card first, and there were indeed two PhDs on it) asked me: "What is the simplest way to synchronize two threads?" I rattled off some sync…
> I never found out the BEST way to share data between programs. In fact, I'm still looking. I think we all are. Copy-paste.
Re: The Programming Interview from Hell
#109I have been hiring technical people for about 18 years. 15 years for my own business. I stopped with all the bullshit questions years ago. My own research into which approach to interviewing is the "best" turned out to be a tossup. You can spend a day, or even days to go through a gruelling interview schedule, and your success rate won't be significantly higher. We are not Google, we don't have their needs, and we do…
Re: The Programming Interview from Hell
#110OK - but here's a genuine problem that came up the other day in my work (reconciling two datasets - we have various many-to-one mappings of ids that we then want to reconcile against each other). I think it's quite a neat computer science/algorithm challenge, so here goes: Write a function which takes as input a list of sets, many of which are not disjoint, but will output a list of sets where all of the non-disjoint…
You could just go on merging sets with each other. For i from 0 to n-1 , find all sets from i+1 to n-1 which have a non empty intersection with set i. Union set i with all those sets and replace i with the union set. If you use a disjoint set data structure this will be quadratic or O(n^2) EDIT: On further thought you need to merge from the end and backwards.
Just add everything one by one to a Disjoint set union.
My bad.