
I will puke if I hear array search interview question again - azat_co
http://www.webapplog.com/i-will-puke-if-i-hear-array-search-interview-question-again/
======
ChuckMcM
From your about page azat:

"My primarily fields are Ruby on Rails, NodeJS, JavaScirpt, Backbone, HTML,
CSS and of course PHP!"

Now I'm sure your a great guy, but there are a lot of people out there with
that exact set, or nearly that exact set, of technologies who can't program.
They can take a page and hack it to do what they want, they are 'cooks' not
'chefs.' Did I mention there are a lot of them? And if someone is looking for
a programming position, and they see a resume that is full of these platform
things, one of the questions they will jot down is "be sure they can actually
program" on their to do list for the interview.

Back in the 90's there were a ton of people who put 'web site programmer' on
their resume but it meant they had used a copy of Pagemaker, not that they
actually _knew_ what the HTML spec had in it, so if you couldn't express it in
Pagemaker they couldn't do it. Those interviews would start with things like
"style this page using <some HTML or CSS feature>." It was a winnowing
question to separate the tool users from the folks who knew what actually
happened.

~~~
mgkimsal
There's a timing thing too. If you put PHP on a resume in 1998... you were
doing PHP because you had a passion for it (or strong hobbyist interest in it)
and there were very few resources out there.

Putting 'node.js' on a resume today in 2012 doesn't provide the same signal.
If only because of the hype about node itself. It might be signifying you're
an early adopter, but it might also signify you're a serial early adopter, and
that you'll jump ship for the next shiny thing.

rails/node/backbone - whatever their strengths are - signal something about
you that might not be what you think you're signalling. And yes, it also says
something about people like me who read something like that in to a resume
with those technologies on it.

~~~
delluminatus
Developer is using platform A. Platform A is generating buzz/hype. Therefore,
developer is too susceptible to buzz/hype?

similarly:

Developer is using Platform B. Platform B is not well-known. Therefore
developer is passionate?

right.

~~~
mgkimsal
The timing was different back then some, granted - I'm comparing 14 years ago
to today - the pace of change and info distribution has changed. I'll still
maintain that I'm wary of people with shiny-latest-buzzwords on a resume.

Doesn't mean I don't want someone to grow and adopt new ideas, but I see a lot
of people adopting and promoting new tool X, then 6-12 months later, they've
abandoned it (but the previous projects they worked on are effectively
lumbered with it for a long time afterwards).

I'm probably exposed to this crowd a bit more by dint of going to local and
regional meetups and conferences and such.

But...

"Developer is using platform A. Platform A is generating buzz/hype. Therefore,
developer is too susceptible to buzz/hype?"

If platform A is less than a year old, and developer A is promoting it for
production use to everyone they talk to, then yes, I say they may be a bit
susceptible to hype (and I've been there myself).

~~~
delluminatus
Yes, that may be true, but there is a BIG difference between promoting a
brand-new platform for production to everyone they talk to, and mentioning
that they have experience with node.js (which is a few years old now) on their
resume, that's all.

------
brey
> Yes, 10 years ago it did matter which function to use, because memory and
> CPU were expensive. Not anymore!

entirely wrong. if a candidate doesn't understand the difference between a
linked list and a random access array, the difference between a hashmap and a
b-tree, there's a good chance they're going to be making some pretty
fundamental mistakes.

O(n^2) is still bad, no matter how much modern CPU and memory you throw at a
problem.

------
dgant
As the interviewer, the question I'm trying to answer is "Can you fulfill a
role we need fulfilled?" There's no direct way to determine the answer to
that. However, a necessary-but-not-sufficient condition for a broad range of
development positions is "Can you write code in any language to
sort/reverse/find elements within an array".

The details will vary by interviewer and by role, but the basic idea is the
same: if you are incapable of doing this, nothing you say in other interview
portions will fool me into thinking we can hire you.

See [http://www.codinghorror.com/blog/2007/02/why-cant-
programmer...](http://www.codinghorror.com/blog/2007/02/why-cant-programmers-
program.html)

------
languagehacker
This is sort of well-worn territory. It's been addressed with greater detail,
data, and eloquence several times over. Threatening to puke about a
commonplace whiteboard question really just comes off as obnoxious.

I don't see what the problem is with just memorizing the answers to these
boilerplate questions. That way, you can be proactive about your response when
asked. You can even just use your knowledge of the question to anticipate and
disarm the interviewer's boring whiteboard exercise. But I guess being
plaintive and edgy is as good a method as any to get to the front page of HN,
right?

------
johnrob
C programming interview questions are effective at detecting good generalist
skills. I'm consistently surprised at how many people struggle with parsing an
int from a string in C. Not that someone would ever do this on the job, but
these questions are sort of the CS equivalent of math problems.

------
vonmoltke
_Another sad thing, which I gladly didn’t see that much (but there still were
a few interviewers) in the Bay Area compared to the East Coast, is asking
terms, function names, definitions, slang, etc. Expecting people to remember
functions’ syntax is a sin in itself! All this leads to hiring people with
good memory vs smart people. That’s especially wrong when all these
information is only a Google search away. And being smart can’t be acquired or
substituted with search engine results._

I hate this, and have run afoul of it multiple times[1] over the past few
years. I once had an East Coast company decide I didn't "know Unix" because I
couldn't regurgitate the POSIX API over the phone.

[1] My focus has always been on East Coast/Midwest companies

~~~
aangjie
This reminds me of startup asking me verbatim quote from memory " what does
python's lambda return?" Apparently he was trying to figure out whether i
knew, it used the 'C' function pointer implementation. And the answer was
function pointer. My annoyance with this is that, i was explaining my
experience/past projects in python. This question is one level of abstraction
lower than the context. I knew it used 'C' function pointer. I hardly got the
question. I was answering, it depends on what statements you write within it.
:-). Edit: And oh, i had a list lying in my drafts page and published now.
<http://www.blog.anandjeyahar.in/?p=1272>

------
mgkimsal
There's something else questions like these reveal - how you react to
inquiries you consider "beneath you". Do you get annoyed? Do you preach? Do
you adopt a condescending attitude? You might be able to do the tech work, but
part of the job might be having to interact with various departments who just
aren't as gosh-darned smart as you. How do you react when questioned about
such 'trivial' matters? Do you lose your cool? You might not be a great fit
for the culture of the org then.

------
r00k
Bad interview questions are actually quite useful, as an indicator that the
company is not somewhere you ought to work.

~~~
mindstab
I've had Facebook, Google, and Linkedin all use these... It's pretty systemic.
:(

~~~
thinkbohemian
Just because some clueless monolithic companies don't know how to interview,
doesn't mean all of us should follow in their footsteps.

True story, i know a guy who was denied a job at FB after an interview, a few
months later they ended up giving him a few hundred thousand after they
acquired the small company he ended up working for. He now works for FB.

Interviews are poor indicators of performance.

~~~
tptacek
Or, he was a bad fit for the role he was interviewing for, and Fb --- like
every other business in the world --- didn't have the foresight to consider
every other possible role they could ever want him for.

------
thinkbohemian
Any future employees who ask that I whiteboard for the will be required to
whiteboard for me. If they're okay with it...then I am.

~~~
azat_co
Awesome approach! :)

------
wglb
First, boredom is a problem of depth and duration.

Second, these are not hard questions. Bubble sort should be a slam dunk.

A few years back, we used a quiz that had the same divisive effects as
fizzbuzz does today:

"Write, in your favorite language, a bit of code to reverse the bits in a
word." This led to an astonishing fail rate amongst applicants that claimed to
have a list of technologies on their resume.

------
simonster
> When is the last time you had to write your own array sorting function or
> function that performs search in an array?

About a month ago I wrote a merge sort routine in JavaScript where the
comparison function is a person. There is no library function for this,
because the response is asynchronous.

> There is always a function for that in a high-level languages like Ruby
> (index), JavaScript (indexOf) or Python (index).

These functions don't do what your interviewers asked. Python's index won't
give you duplicates, and it's at least equally non-trivial to use JavaScript's
indexOf with two arguments in a loop as it is to use a hash, and the
algorithmic complexity of the former is much worse, so why would you do it?

> Another sad thing, which I gladly didn’t see that much (but there still were
> a few interviewers) in the Bay Area compared to the East Coast, is asking
> terms, function names, definitions, slang, etc. Expecting people to remember
> functions’ syntax is a sin in itself!

On this point, I agree.

~~~
azat_co
1) array.sort didn't work for you? if not than this is an exception and could
be an example of a good interview question ie solving a real problem 2) that
is right, but in the algorithm of the answer you could use index function
which makes code more compact

------
eridius
You'd be surprised at how many people fail the question "reverse this linked
list", and of the people who pass that, how many fail the question "now do it
without using recursion".

"Stupid" interview questions exist for a reason. They filter out a lot of
people.

~~~
delluminatus
Well, nobody is arguing that they don't filter people (I don't think). The
author seems to be saying that you could filter out just as many people with a
more relevant and "modern" programming question -- and have a more accurate
filter as well.

Anecdotally, I took CS I/II last year and still it would (probably) take me
5-10 minutes to remember how to reverse a linked list under pressure. I don't
think this is a major concern since I never anticipate EVER having to actually
reverse a linked list manually.

------
majorlazer
How about everybody that criticizes these questions, post their alternatives
for determining candidates. It seems like everyday there are posts on HN
criticizing these hiring techniques, but rarely does anybody post any
alternatives.

~~~
azat_co
there are alternatives in the post

------
halayli
Generally speaking, it's a good practice for interviewers to turn whatever
problem they are working on into a simplified interview question and give it
to the interviewee. This way they'll know if the candidate can solve problems
that they'll _actually_ face if they get the job.

Interview questions related to finding shortest path, min/mix of whatever,
finding x numbers that sum to y etc.. will only tell the interviewer if the
candidate has prepared academically for the interview.

In the end, the interviewer will probably end up hiring the wrong person. A
person who has done his/her homework but cannot solve the simplest scalability
problem.

~~~
azat_co
110% agree, that was my point

------
activepeanut
When I interviewed at Google, they had me implement a basic regex parser in C
on a whiteboard. I think that's a much better way to separate the wheat from
the chaff.

~~~
munchbunny
You're not separating the wheat from the chaff with that. You're separating
the cream from the crop.

------
matmann2001
It's a boring problem, but it reveals the candidates' comfort/experience with
programming, approach to problem solving, and background knowledge of CS
concepts. Those are things I'd want to know when hiring a candidate. These
questions are used to determine competency.

If these are the only questions being asked in an interview, that is cause for
concern. But they are useful for weeding out underqualified candidates.

~~~
azat_co
yes, usually that was all that they asked, and that were mostly for the senior
level positions

------
Jabbles
Knuth wrote Volume 3 _just_ about searching and sorting, so there must be some
interesting and challenging questions on the subject that could potentially be
used in interviews.

Not that quizzing people on random pages from TAOCP is a good technique, I'm
just pointing out that if you're looking for a series of increasingly complex
questions to ask in an interview, searching and sorting is a rich area.

------
tptacek
Finding duplicates in an array is a FizzBuzz question.

------
newobj
Yeah, well, I'll puke if I hear another badly mangled implementation of an
array search again, so I guess we're even.

------
guard-of-terra
We use bubble sort as a kind of FizzBuzz test. Sorry, but we have to verify
that you can actually write code. We can't go further without it.

~~~
tocomment
Ok who here over five years out of school remembers bubble sort?

Give me the Wikipedia article and I could code it in five minutes but I just
don't remember the specifics of the algorithm. Does that really make me a bad
hire?

~~~
guard-of-terra
Of course we will tell you how it is supposed to work.

~~~
tocomment
Ok you're cool then :-).

