
Steve Yegge's five essential phone-screen questions - vinutheraj
http://steve.yegge.googlepages.com/five-essential-phone-screen-questions
======
RiderOfGiraffes
An old favorite ...

<http://searchyc.com/five+phone+screen>

<http://news.ycombinator.com/item?id=94990>

<http://news.ycombinator.com/item?id=941925>

My wife just watched me do this search and trawl through the results, and then
she asked me why. Why spend all that time cross-referencing something when the
search terms are so vague you need to go through pages to find the duplicates?

The answer is that sometimes I find other items of interest. I don't read HN
fanatically, and sometimes items come and go without my seeing them.
Occasionally, more than occasionally, one turns up in a search like this, so
it's worth doing for the side effect.

------
andrewcooke
it's always difficult to comment on these kinds of posts because, obviously,
they're pretty general, and the person doing the interview would need to use
their own discretion, etc.

but having said that, one of the example questions seemed a bit odd to me. the
idea was to find out whether a candidate knows how to use grep or similar. and
the first case is fair enough - phone numbers with a given pattern. but a
later example was reformatting code so that parentheses had spaces around
them.

now anyone that tries reformatting code with a regular expression deserves
everything they get. almost no programming languages have regular grammars,
and even if they do, they are probably fiendishly complex (think of comments
and strings). to make things worse, if you get something wrong you end up
running the risks of introducing some kind of obscure bug in your code...

as i said, maybe i am being too picky. but that was the one example that
jumped out as a red flag for the author's experience (which is odd, as i
recognise the name, even though i don't really follow personalities on the web
much).

edit: thinking some more, maybe i am being too picky. just last night i used
sed to change some import statements in python code. but messing around with
parens sounds like playing with fire to me. i vaguely remember, years ago,
trying to enforce encoding standards with a regexp based rewriter for some
obscure language that had no easily available parser. the memory is a blur,
except for the pain...

~~~
silentbicycle
It's a good sign if the interviewee thinks about an RE modifying the strings
in a program, though. While programmers who think RE are all-powerful are
likely outnumbered by those completely ignorant of them, they're out there.
It's important to know REs' limitations - sometimes you need an actual parser.
(My favorite example: RFC-822-compliant e-mail address validation -
<http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html>)

------
wingo
I feel good about all of these questions except the OO design one. I would
rather declare types and write functions that operate on those types; granted
it's the same, semantically, but if I focus on nouns personally I start coding
stupid stuff.

~~~
raganwald
I'm guessing that in an actual interview Yegge would be sympathetic to your
point of view:

[http://steve-yegge.blogspot.com/2006/03/execution-in-
kingdom...](http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-
nouns.html)

That being said, here's a question: How many people who self-identify as
functional programmers could write an OO program competently? Compare and
contrast to the question of how many people who self-identify as OO
programmers could write a functional progam competently?

Do the paradigms themselves have anything to do with the difference? Or is
this strictly an issue of bias for other reasons?

~~~
smanek
I would guess that almost all functional programmers know OO programming, but
very few OO programmers know functional programming.

I think this is just because of pedagogic issues. Every introductory
book/class introduces OO, but most undergraduate CS courses barely discuss
functional programming (besides a semester on ML or Scheme, if you're
particularly lucky).

So, the people who go out off the beaten path to learn functional programming
are a self selected subset that is particularly driven, curious, etc.

~~~
raganwald
That would be my conjecture about academia. In business, a certain kind of
person learns the languages and paradigms that appear to be well-represented
in monster.com job postings.

------
j_baker
It should be noted that Steve has said elsewhere that he can't use these
questions anymore because everyone knows them. Thus, I wouldn't follow this
template _too_ closely. That said, it's a good way to get a general idea about
how to ask these kinds of questions.

~~~
gaius
That's a problem for everyone. We (like many other organizations) use third
party recruiters, and the latest ad one of them has put out very clearly
indicates that they've been quizzing (unsuccessful) candidates about what we
asked, and are now trying to coach candidates in them. Unfortunately said
recruiter is non-technical and a) the ad now makes no sense (e.g. if I ask
"what is a deadlock?" it doesn't translate into "must have 5 years of
experience of deadlocks") and b) some of the canned answers they've been
giving to our questions are wrong, so we get a stream of candidates all
parroting the same wrong thing.

~~~
silentbicycle
It'd make me laugh if somebody's resume listed "5 years experience with C++,
deadlocks, linking errors", though. :)

~~~
gaius
No joke, one dude I interviewed claimed so-many years experience of C++, it
turned out he meant experience of running programs written in C++ on his PC
(!)

I really am utterly mystified why people do this. It was the first skill he
listed. Did he not think an interviewer might ask him about it? And even on
the offchance he blagged his way through the interviews, he's not going to be
able to fake it _to the machine_ and he'll be found out on his first day. It
really shakes my faith in human nature, interviewing :-(

------
ynniv
The sample code for reversing a string in Java reminded me of why I can't
bring myself to use Java-the-language anymore. Clojure FTW!

------
middus
Am I the only one who thinks that his "Example 2: Write function to compute
Nth fibonacci number" is a terrible resource hog?

IMHO an iterative approach would be the way to go.

~~~
RiderOfGiraffes
So, so many people miss the point(s) here.

Firstly, in my direct, personal experience, just writing a candidate to write
a program that compiles and runs gets rid of up to 90% of applicants. People
here on HN are exceptional, but around 90% of recent applicants for a position
I advertised couldn't write a FizzBuzz program that compiled and ran.

Secondly, these are the starting points. From here you can ask what problems
the program has. Yes, it's exponential in stack and runtime. You can write an
iterative version that runs in constant stack and linear time. More subtle,
and more probing, is how do you write a recursive version that also runs in
small stack and time.

These are the starting points, the initial cull. Don't assume they're the be
all and end all.

~~~
falsestprophet
On paper? Or with a computer and compiler/interpreter?

~~~
RiderOfGiraffes
Some couldn't produce either.

I look for someone to sketch a correct algorithm using any notation they
choose. Independently I look for someone to produce working code with an
editor and compiler. The former is usually for something like linked lists or
quicksort, the second for something like FizzBuzz and then recursive and
iterative Fibonnaci.

Working code is essential for something, anything, at some point, although
really what I want is someone who can then talk sensibly through the issues.
Even so, working code for trivial problems is still only seen in about 10% of
cases.

------
luckydude
Huh. Not impressed. One of my guys, who went on to be one of the ZFS guys,
came from 3par. And they had the 3x3 test:

Gives a shit Positive learning curve. Not an asshole.

Make your candidates pass that and you're doing fine.

