
Interviewing at Google, Facebook, Foursquare, Dropbox, Fog Creek, etc - shaufler
http://haufler.org/2012/05/22/interviewing-at-google-facebook-foursquare-dropbox-fog-creek-etc/
======
cletus
Bizarre.

Yes, Googling an answer to a Google interview question from SO is in fact
verboten. A seasoned interview can normally pick that up anyway. But a note to
potential Google interviewees: if you're caught doing this it will pretty much
disqualify your application. We're interested in how you think and how you
solve problems, not what you can pass off as knowing.

Interestingly, he mentions the NDA and then goes on to broadly describe the
question anyway. If all this is true, I'm not a fan of bit-twiddling
questions. It's something you either know or you don't (like reversing bits in
O(log n)). This is meant to be an interview not a trivia quiz. I get mad every
time I see those kinds of questions asked.

Anyway, another note: if it's on your CV, it's fair game to be asked about. So
if you put that you wrote a low of embedded C/C++ in such a way that you'd be
expected to do a lot of bit-twiddling then yes, bit-twiddling is absolutely
fair game (IMHO).

If however you put that you've only done Python/Django, Clojure and Scala then
it's a stupid question to ask (IMHO).

The second phone interview if accurate disappoints me as well. Perhaps this
was a product of the position you applied for or what you put on your CV?

As far as intern matching goes, yes there is absolutely room for improvement
there.

Note to other commenters: PLEASE PLEASE PLEASE stop spreading this nonsense
that Google asks engineering interviewees stupid questions like "a man drove
his car to a hotel and lost his fortune, what happened?" This is NOT what we
do. The sooner people stop spreading this misinformation the better.

~~~
yajoe
I've interviewed with Google twice, and both times I was so unhappy with the
experiences I declined the offers. Many friends work at Google and are happy,
so this seems like an instance of getting unlucky with the loops... but don't
dismiss off the cuff.

The very first question I got in fall 2010 on a phone interview was "How many
ping pong balls fit within a school bus?" The second question was "When would
you use a virtual destructor in C++?" without C++ being on resume or
confirming if I had any experience with it. I used C++ many years ago and
could reason through, but I did walk away thinking how unfair the interviewer
was. There were other small instances that led me to say no.

Then in fall 2011 at the Googleplex, my first question was "I'm XYZ and I
worked on Google+. That's all you need to know about me. Why am I interviewing
you?" It was pretty condescending, and if that was based on my resume then
shame on me. If this had been at a bar I would have responded more colorfully,
but during an interview all you can do is be polite and answer the question.

While I fully believe most of Google tries to be fair and reasonable during
interviews, I've had two experiences where individuals were not. YMMV.

P.S. The bit-wise question sounds like the interviewer asking why UTF-8 is
preferred over UTF-16 or something and how you would detect which encoding was
used. Regardless of what language you know you should be able to answer this
as it affects everyone on the web. At least, that's going to be my new
question for interviewing people :)

~~~
nessus42
I find questions like the ping pong ball question rather trying, but I guess
there's a long precedent for it. My understanding is that you're supposed to
do a back-of-the-envelope calculation that gets you within an order of
magnitude or so of the correct answer.

One problem with questions like this is that unless you know that you're
supposed to just do a back-of-the-envelope calculation, they can leave you
completely flabbergasted, as the questions sound as if they are asking for an
accurate answer, which you'd have no reasonable way of determining.

Also, for me, asking me to do any math at all while someone is staring over my
shoulder, or what have you, is going to cause me to make mistakes like
sqrt(36) == 9, and I have a degree from MIT. Consequently, I hate this style
of interview with a passion.

------
throwaway1979
My girlfriend is in the medical profession. She's gotten job offers after 1
hour conversations. The last job interview process I went through had 3
separate phone interviews (each with coding questions) before they were to fly
me over for a full day interview. She was pretty surprised at how intensive
the process was. I have a CS degree from a top-10 school and have 5+ years of
work experience. This is the kind of stuff that makes me sad to be in
software.

~~~
why-el
I am really, _really_ interested to hear from senior developers about this.
Especially their comments on the growing trend of requiring open source
experience. (I for one thing don't have any open source, most of my projects
are locked in the university and I currently intern at a company building cool
things which, well, I can't open source).

Update: I don't have a problem with this really. I am in fact trying to make
some time to code, but I don't like how this can sometimes be required.

~~~
mmahemoff
I doubt open source is a requirement at any of these companies, but it's a
huge asset for any job application if you have some good work to show. It
stands to reason that if you're going to be spending most of your day writing
to code and interacting with coders, people will be interested to see if you
have a good repo and handle issues well. So a good Github repo is a huge asset
to any job seeker in this industry. It will also help you to be approached by
quality companies if your project's popular/high-profile, as savvy recruiters
will look at this kind of thing.

And, you're likely to be asked about open source in your interview. So if you
can say intelligent things about it and show you care about it, it might
improve your interview performance too.

------
ajross
"Hi, I'm Sean Haufler, rising senior at Yale [...] Position: Software Engineer
Intern [...] I didn’t have much experience manipulating individual bits"

Sometimes I want to cry for what the world has become. At least I can be
content knowing I have job security. (To be fair: the ability to google the
answer quickly and implement it is exactly the skill that kind of test is
supposed to screen for. Still, three years at school and no bit math?)

 _Edit: several of the responses have interpreted this as my sniping at the
author. I'm not (he got the question right, after all!). I'm depressed at the
status of software engineering and computer science education, such that
dealing with the in-memory representation of data is treated as an "obscure"
skill that comes up only on job interviews._

~~~
alecbenzer
Reading stuff like that generally makes me feel much less insecure about my
college. It used to be that hearing that someone was from an ivy-league/ivy-
league equivalent would make me think they were really, really smart.
(narcissism warning) I've come to realize that on average I'm probably about
as smart as people from more prestigious universities, if not smarter, despite
being an MIT/Columbia/Princeton/Cornell reject and a CMU waitlist.

~~~
roguecoder
MIT is vastly different than Yale: it is a vocational school in the best sense
of the world. Possibly slightly less so now that 6.001 isn't LISP-based, but I
still can't imagine a MIT CS grad not understanding bits.

People coming out of a liberal arts college I tend to expect to know
algorithms, state machines, possibly data structures, probably C++ and/or
Python and have next-to-zero useful code-writing experience unless they got it
elsewhere.

~~~
snikolov
6.001 doesn't exist anymore. The new set of intro courses are completely
different. It sounded like you thought 6.001 is now taught in some other
language.

------
TheCapn
The best coders I've ever worked with rarely memorized the nuance little
algorithms that they want you to regurgitate during these interviews. The ones
that I know that are capable of this are terrible coworkers because they lack
other necessary skills to function in an organization or team environment.
This is anecdotal but sort of sticks with me.

The interview processes used by these software giants weeds out the kinds of
people that have made the biggest differences in the companies I've worked
for/with. From my experience they weigh their judgement much more heavily on
the actual implementation of code instead of the understanding of code,
decisions and overall design.

Knowing how to code a mergesort is not as important to understanding the wider
uses of mergesort and when an altered algorithm would suit the problem best or
when it would struggle to provide you the right performance at all.

Maybe these companies want code monkeys that can put down exactly as the
design is given to them and the process works grand for them, but from an
outsider looking in it seems like they miss out on a lot of great talent due
to the rigorous screening process.

~~~
thedufer
"Knowing how to code a mergesort" is specifically not what they're looking
for, in my experience. The idea is to come up with a problem that requires an
interesting algorithm that very few people will know, and see how the
candidate reasons their way to an answer.

~~~
dockd
Are you saying they should be able to derive a little known algorithm by
themselves?

What do you make of Knuth's quote about how many people implement binary
search wrong?
[http://en.wikipedia.org/wiki/Binary_Search#Implementation_is...](http://en.wikipedia.org/wiki/Binary_Search#Implementation_issues)

~~~
jrockway
Many people implement it wrong. The best programmers know how to check their
work, and will be asked during the interview to check.

Who _doesn't_ know that (x + y) / 2 can overflow?

But the people who you really want to filter out have no idea or intuition
that a problem can be solved by slicing it into two. That's the key idea
behind binary search (and indeed, much of computer science).

------
MattRogish
Do kids still learn C in college? It's been my experience that new grads are
primarily taught in Java...

That said, we do all our interviewing in the langage I expect them to be
developing in - namely Ruby, JavaScript, and/or SQL. Is that the norm or do
people still interview candidates using, say C or Java, for Ruby/Python/JS
positions?

I suppose if we were interviewing someone who didn't know Ruby but knew Java,
we could fallback to that. But luckily we have plenty of people that know
Ruby/JS that I've never had to do that...

Although you don't have pointer stuff, you can do really interesting things
with Ruby and JS.

~~~
libria
I'd say Joel Spolsky is somewhat unique in this, although Google has had bias
for C++ in the past [1]. Spolsky has long been an advocate for expecting
developers to be competent in C [2].

[1] <http://www.cforcoding.com/2010/07/my-google-interview.html>

[2] [http://scott.yang.id.au/2008/04/joel-spolsky-and-jeff-
atwood...](http://scott.yang.id.au/2008/04/joel-spolsky-and-jeff-atwood-on-
learning-c/)

~~~
archangel_one
FWIW, Google generally expect engineers to know bit manipulation. Certainly I
was asked some, I don't know if everyone necessarily is but I wouldn't be
surprised if they were.

~~~
alasdair_young
I wasn't out and out asked, but it certainly came up when trying to optimize a
solution.

NOTE: if you are a Java developer, make sure you remember that bytes are
signed! (I have no idea who thought that one was a good idea)

~~~
yzhengyu
I can't remember it, but there was an interview where Gosling said it was for
simplicity.

And rather amusingly (and if I remember correctly...) the char data type in
Java is not really the equivalent of char in the other C derivatives.

~~~
tedunangst
Java char is c wchar. Java also has byte.

------
tptacek
This is a great post. My takeaway: if someone in an interview asks if you know
what a particular idiosyncratic data structure is, always say "no".

~~~
tedunangst
I would say always tell the truth. When people revealed they already knew the
answer to my question, I'd probe a little deeper to check, but then move on to
harder questions. That could only ever improve their chances because there's
no penalty for wrong answers in the bonus round. All depends on the
interviewer, though.

------
toemetoch
FWIW, if you're doing hobby projects or working on open-source software: when
you get one of those CS related brain teasers start your answer with this if
you get the opportunity:

"Oh, I encountered something similar while working on <insert project name>."

Notice the little smile on the interviewer's face and how the interview
derails in a chat about projects.

Also applies if you don't know the answer but would like to know to unblock
that issue you had.

------
jc4p
Wow we had different experiences. I only interviewed at start-ups and none of
the companies I talked to asked me any ANSI C questions. I had some
interesting Python do-in-whatever questions at one company (which I did all in
Python) and on the other I went to them with something I had already made of
their unofficial platform and skipped programming challenges.

------
citricsquid
> A mediocre programmer could memorize the examples given in Programming
> Interviews Exposed and do very well in a Bloomberg interview.

or in a phone interview just google for an answer to the question they're
being asked! oh wait that's exactly what they did do...

How is using google to find an answer to a question okay and knowing the
answers before hand not? crazy.

~~~
pashamur
I've been asked a question in a phone screen the answer to which I had read on
the glassdoor page for that company. A lot of people/companies recycle
questions on a regular basis.

~~~
mkopinsky
Pardon my ignorance, but what is a glassdoor page? I have not come across this
term in the past.

~~~
utlanning
glassdoor.com

~~~
mkopinsky
Thanks, seems like a good resource. Never used it before, but will keep it in
mind.

------
laconian
" _Simultaneously, I quickly Googled ‘how to use bitwise operators in C’ and
found this wonderful code snippet on StackOverflow that made the problem easy
to solve._ I wrote a solution with time to spare, and the interviewer seemed
content with my answer."

Wow. NB to all interviewers: this guy's a cheat.

~~~
shaufler
I would have to disagree that what I did was "cheating".

Software engineers are given problems to solve, and their job is to solve
these problems efficiently. You don't always have the solution to every
problem off of the top of your head. That's why programmers use Google,
StackOverflow, and documentation as resources. The primary skill employers are
looking for is _learning how to learn_ new things quickly. And I believe I
demonstrated that skill in my interview.

Also, I declined to mention this in the article, but after I finished that UTF
encoding problem in my interview, the interviewer asked where I got the check-
bit macro (he saw me paste it in). I told him I got it from StackOverflow. It
didn't seem to concern him.

~~~
eta_carinae
It is cheating.

Interviewing is different from a real job. You need to show you can do more
than look up solutions on the web.

I can't blame you for trying to cheat your way into a job and I certainly
blame the interviewer for not seeing through your cheat, but make no mistake:
you cheated.

~~~
antoko
Wow! Did you even read the comment above? The interviewer asked for the source
and the candidate responded with stackoverflow.

in this instance that is absolutely not cheating.

~~~
esrauch
It is generally considered cheating by Google phone interview standards, the
interviewer probably was satisfied by the other answers, plus the fact that
the interviewee immediately and casually owned up to it probably indicated
that it hadn't been made clear that it was disallowed.

------
eta_carinae
Note: the interviews are for an intern position, which are very different from
software engineer positions.

------
alecbenzer
current intern at google here

I got the same email from HR telling me that it should take around 3 weeks to
hear from a host. She emailed me back 5 minutes later about setting up the
interview.

Not saying this makes your 3 months okay, but just pointing out that there
seem to be cases at both extremities.

------
dylanvee
I applied to a bunch of software engineering internships last fall and was
amazed by the variation from company to company in terms of how I was dealt
with as an intern candidate.

------
sparknlaunch12
Great overview of the different interview styles being used. I cannot say I am
convinced you always get the best people through.

I don't have any aspirations to interview at Google, but did stumble across an
'Google Interview' book at the local bookstore. It makes great reading.

WSJ did an article on Google interviews late last year, including answers.
Here are the questions (click the link below if you want answers).

"1. What's the next number in this sequence: 10, 9, 60, 90, 70, 66 … ?

2\. You're in a car with a helium balloon on a string that is tied to the
floor. The windows are closed. When you step on the gas pedal, what happens to
the balloon—does it move forward, move backward, or stay put?

3\. Using only a four-minute hourglass and a seven-minute hourglass, measure
exactly nine minutes—without the process taking longer than nine minutes.

4\. A book has N pages, numbered the usual way, from 1 to N. The total number
of digits in the page numbers is 1,095. How many pages does the book have?

5\. A man pushed his car to a hotel and lost his fortune. What happened?"

[Answers]
[http://online.wsj.com/article/SB1000142405297020455230457711...](http://online.wsj.com/article/SB10001424052970204552304577113003705089744.html)

~~~
adnam
The explanation given in wsj for problem 2 is totally wrong. The balloon will
do the same as a person in the car (nod backwards), only less pronounced due
to air resistance.

~~~
b_emery
I can assure you that the wsj is correct! I've been transporting balloons a
bit lately* and having fun watching them 'lean in' to turns, 'leaning back'
while braking, and 'leaning forward' while accelerating.

*transporting balloons correlates strongly with transporting kids

~~~
adnam
Good grief, I stand corrected.

------
kzahel
Every time I've interviewed for a job I have been annoyed by the interview
questions. Yet, when I am interviewing others, I do exactly the thing that
annoys me. What is the alternative? It's just a way to talk shop.

------
scarface548
Can someone post a mirror?

------
vnaybrdwj
Does the link to the blog work?

------
jamalkhan
everytime I try the link I get a timeout request!

~~~
shaufler
the traffic spike from HN crashed my server. i'm resizing my linode instance
now, so the site should hopefully be up again in a few minutes

~~~
luigi
Caching is your friend:

<http://wordpress.org/extend/plugins/wp-super-cache/>

