Interviewing at Google, Facebook, Foursquare, Dropbox, Fog Creek, etc
haufler.org
haufler.org
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.
Bitwise operators are just as available in Java. I've done bit-twiddling in production Java code, it's something you need to do if you ever, e.g., work on a serialization library.
Understand, words, bits, bytes, and bitwise operators (big part of How Computers Work (TM)(R)) is something worth knowing (and not just to pass an interview).
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 :)
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.
Out of curiosity, did the interviewer ever explain this odd introduction, or what he/she was trying to get at?
In my experience the best interview questions I've had have been situations where I was asked a question about something I was not familiar with. The interviewer then gave me a 5 minute overview of the things I need to know (like which synchronization methods are available in pthreads, for instance) and then give me the chance to apply the things I just learned. I think most employers care far more about how quickly you can pick up new things than they care about what you already know, and it left me with the feeling that they gave me an offer because of what I can do, rather than what I already know.
I think this process, while annoying, is worth it. I don't want to risk having to work with someone whose competence with respect to software engineering has not been verified in a controlled environment. I've done it before and it meant every time I said something like "state machine" or "graph", I had to explain what state machines or graphs were. And at Google, I don't have to do this. The amount of shared knowledge is amazingly high which makes interaction much more productive.
Most companies want to hire the best people, and employees want to work with the same. Why doesn't work experience or education count for anything in our field? Yes ... I've met idiots with CS degrees who can't code FizBuzz to save their life. I've also met idiots who have aced interviews at Microsoft, Google and Amazon by cramming on algorithms books for 2 weeks.
We've really gone off the deep-end with interviews. If you've been a professional developer for 5+ years, do you really remember the details of your algorithms course? Competent devs can figure out the details of this stuff in minutes ... something not conducive to the high-stress environment of interviews. And this is not even considering how much time both parties waste in this process.
Given how smart we are (i.e. software geeks), it boggles my mind how silly our operating procedures are. Just like I've told students that they should never accept unpaid internships on principle, I wish enough of us would tell prospective employers that we won't submit to an unreasonable hiring process.
I wish enough of us would tell prospective employers that we won't submit to an unreasonable hiring process.
I like this hiring process and I would implement the same thing at my own company. There is so much software that needs to be written, though, that someone who refuses to "submit to an unreasonable hiring process" need not do so. Just grab a job from rent-a-coder and relax!
You know what I'd like to do at my own company? Hire people based on their unique experience and personality. Pay them fairly and assume employees have lives outside of work. Heh .. engineers can dream, can't they :-)
The hiring strategy may or may not make Google money, but it does make my life there pretty pleasant, and I think the other 30,000 employees would mostly agree.
Hire people solely based on "work experience" and a ten minute chat and let me know how well you company of 10,000 people does. My prediction is that you will be unhappy with the results.
Other companies do the opposite, so there's plenty of jobs for either type of person.
Perhaps this is why Google's JavaScript is so notoriously poor.
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.
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.
It's probably most useful as a bullet point to attract a recruiter's attention. So commit a line of code somewhere and stick it on your resume.
Not to say you shouldn't work on an open source project. But do it because it's something that interests you, not for your resume.
We are subjected to full day flights, multiple phone interviews etc.
She deals with life, not code.
This tells me one of two things. Either our hiring practices are severally broken, or its harder to program then be a doctor.
The amount of sub-par candidates that are nearly constantly looking is absolutely appalling to me, and is probably shocking to most of the non-hiring-managers reading HN.
Why is the interview process so intensive? Same reason gold mining is intensive. There's a lot more dirt than gold in both cases.
And also I myself have been to more bad doctors then good doctors. There is just as big of gap between the poor doctors and the good doctors as there is in programming.
Startups seem to be the worst when it comes to turning the hiring process into a huge time sink for the candidate. At its worst was one of the Bay Area startups. They outline a 7- or 8-phase interview process. There are independent programming exercises, pair programming over Skype, phone interviews, then at the end they have the candidate in for "cultural fit evaluation" which turned into a six-hour interview gauntlet after flying across the country that morning.
Another bit of inconsideration of my time and my actual job where I work to make money was a company that wanted me to come in in the middle of the afternoon on a workday for 2 hours to "meet the team". I told them I did not feel comfortable leaving the office at 1:30 and go AWOL/take a half day of vacation so I could interview at another place. I wound up backing out of the interview process because of their unwillingness to pick another meeting time, even over lunch.
Then finally tomorrow I am meeting with a company, and they told me yesterday afternoon that they'd like me to prepare a presentation on something I'm passionate about (they liked Jeff Atwood's blog post[1] I guess). This actually I don't mind at all, and think it's a great idea... but I need more than a couple of days' notice. I work 8-10 hours a day, commute a couple more, and by the time I get home I've got 3 hours to spend with my kid, relax, eat dinner, etc. In that 3 hours I also need to prepare a talk on a topic I'm passionate about.
To me that last one is emblematic of these interview processes: good ideas, but not structured with much consideration toward respecting the time of the candidate. I get that hiring the right person is crucial for small teams, no doubt, but I'm getting tired enough of jumping through hoops that I'm not really interested in doing it anymore, even for a great job where I know I can make an awesome contribution.
1 http://www.codinghorror.com/blog/2012/03/how-to-hire-a-progr...
I was once given this requirement for a scientific computing-type position at an industrial research lab. Most of their applicants were PhD-types, for whom giving an hour-long presentation on their last six years of research was par for the course. For me, it meant I had to scramble to put together a PowerPoint of my undergrad curriculum and research opportunities.
Ask your girlfriend about her rotations (where students literally cry after being screamed at while working insane hours), MCATs, and how difficult it is to get into any medical school. Job interviews don't have to be as difficult as credentials are both required (there are folks at Google and Facebook without CS degrees -- and that's a good thing, obviously) and are difficult to get irrespective of where you go to school (CS programs wary widely, as this is still a young discipline unlike biology).
Pharmacy is also similar, with a few caveats: pay is somewhat below what a software engineer can expect mid-career (~$120,000 for retail pharmacy, somewhat less for pharma research), residency is not required, but rotations are still insane, and schools are still selective.
In some ways, I think it would benefit the patients if the medical profession was somewhat more meritocratic and less focused on pushing students to their breaking point during rotations and residency, which continues because "that's the way it has always been done". It still somewhat scares me just _what_ a sleep-deprived student could do to a patient due to the very basics of sleep deprivation.
[Full disclosure: I work at Facebook and have dated a pharm student/pharmacist.]
Of course "in the medical profession" doesn't equal "doctor or pharmacist". Likewise, "software engineer" doesn't equal "software engineer at Google or Facebook": there are plenty of firms that don't use coding interviews. Nobody says that to be a software engineer, you have to work at a licensed firm that has to (as part of licensing) use a certain hiring process, require certain credentials, etc...
(This also isn't an endorsement of all modern interview practices: it's particularly silly for startups to cargo-cult interview questions they've overheard at other companies without measuring their effectiveness and calibrating candidates' response.)
More friction in hiring and firing results in more careful hiring practices. I'm not sure how much friction there is in the medical profession but I'm guessing there's less friction there than in software development (not counting politics).
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.
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.
Sean's an incredibly bright guy but he's more interested in building world-changing apps and web dev. as opposed to low-level systems programming. There are other classes here where you have to code in assembly and do all sorts of bit manipulation (OS's comes to mind). The core CS sequence in our school is also in C, which differs notably from other places that use Python, Java, etc.
For anyone who wants to learn more about bit manipulation, Henry Warren's "Hacker's Delight" is a terrific book (http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...).
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.
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...
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).
If you can't muddle through a basic implementation of mergesort 45 minutes, I can't believe that you are actually in a position to know when mergesort is a good or bad option, and certainly not that you are capable of writing a custom version for some domain-specific needs.
If someone wants to claim that it's simply not necessary to know mergesort, that's a reasonable stance (though I disagree). But to claim to truly understand it without being able to implement it seems like a bit of a fib.
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.
I personally would prefer someone who is good at multiple programming languages. People that spend all their time in Java ignore subtle things about how computers work that C programmers are intimately aware of. People that never use scripting languages assume they are "toys" and waste many hours writing "production quality" throwaway applications. So it's good to have experience with everything, but experience can be obtained after hire too :)
I learned C++ back in, oh, 1996. I haven't coded in it much since about 2001. I'd fail virtually any C++ exam today unless I spent a lot of time relearning my C++.
Also, FWIW, Google intern interviews and full-time interviews are completely different. Interns must interview like everyone else after their internship to be converted to full-time employees.
[1] http://www.cforcoding.com/2010/07/my-google-interview.html
[2] http://scott.yang.id.au/2008/04/joel-spolsky-and-jeff-atwood...
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)
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.
I really wish we'd have more ML/Haskell but they are only used in a couple of graduate courses as far as I can tell.
We may include generic coding questions that can be answered in any language of the candidate's choosing, but we always try to include a couple in languages that the position targets.
My take on hiring is that I don't care what languages the person knows. Being versed in what we're using is a plus, but not a strong plus. I'm far more interested in how the person thinks and tackles problems than I am that they are expert in "stack X". If you get the right people, picking up a stack/language isn't rocket science.
In the same vein, googling for answers is fine. I'd rather a person to whom I can say "we need to do X", when they have no prior knowledge of "X", but yet can figure it out (well), and be the new company "expert" on X.
I bring it back to the way my EE school operated. Tests never were about material we covered in class, they were always about applying that knowledge to a new problem that has its root issues in what we discussed in class, you'd have to apply what your learned in class to a completely new situation, often in multiple ways, to come up with a reasonable answer.
The only problem is, that to make this work, you can't give out interview questions that are literally a google query away. You have to come up with open-ended or slightly obscure questions where they have to go google 5 different topics, combine the information, and come up with a reasonable answer.
When I interviewed at Google, they let me pick the language. I did some C++, some Java, and C#. As long as both you and the interviewer can understand it, they don't care about the language. They want to maximize your comfort.
When I got hired, I ended up doing JS full-time. Google assumes you can pick up a new language.
"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.
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.
Wow. NB to all interviewers: this guy's a cheat.
I don't know if you interview people, but I do, and it's hard. I try hard to come up with questions that probe people's knowledge in specific ways and help discriminate between large ranges of ability. It's fucked up to try to ruin the information I'm getting by cheating without telling me.
If you hold the principled position that looking everything up during an interview is a reasonable way to demonstrate your competence, then you should come out and tell me that's what you're doing, so that I can make a decision which isn't based on lies of omission.
An interview should evaluate the skills one needs for the job, not puzzles that make you feel smart. Were I interviewing someone, I would happily accept an answer something along the lines of "that's been solved already, I would use an existing library so I can move on and solve my real problem" with regard to bitwise operators.
But the fault is still with the candidate. It's unethical to get external help in an interview without telling the interviewer what you're doing, full stop, end of story. It doesn't matter if you don't think much of the question. Doing so screws up the interviewer's ability to actually compare you meaningfully to their other candidates.
If they want you to solve bit manipulation questions they could come up with something terribly obscure and difficult to explain or they could give you one that can be solved by anyone with the basic knowledge of bitwise operators a bit of problem solving. Having to Google this answer either shows failure on your behalf or the inability to actually sit down and address the problem critically before running off to find help from others (who will often be unable to help you on actual problems)
I also sincerely believe that the more you know about C bit manipulation (particularly the kind of manipulation you need to, e.g., figure out whether a UTF-8 encoding is nonminimal), the less unreasonable that Google search seems.
I've been a C programmer since 1994 and interviewed lord knows how many C programmers and I'd never flunk someone for looking this up, nor would I care if they told me if they had looked it up. Obviously, 'cletus feels differently, but I think he's wrong.
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.
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.
in this instance that is absolutely not cheating.
If I asked you a question about manipulating Unicode, I am so obviously not looking to find out how quickly you learn things, and you know perfectly well I'm not. I'm finding out what you know about character encoding and string manipulation!
(Regarding your addendum, if you're actually honest about it in the interview I don't really take any issue with it. But I hope you would be honest about it before an interviewer has to ask you whether you cheated.)
That's a pretty important part of the story, and makes the situation very different. It also makes the interviewer seem a lot more competent. Trivia questions are useless in interviews, and the fact that you were able to quickly google it, recognize it as a relevant solution, and apply it correctly actually is demonstrating that you know how to learn things quickly (and that you have at least some familiarity with binary representations and manipulations). The average charlatan would just start copying and pasting in panic, which is usually pretty easy to pick up on.
Meanwhile, you can't pretend what you described in your post is really a moral position if you had not said anything. It might not have been strictly immoral as you really owe them nothing, but there's no shining principle demonstrated there.
My word of advice to you is this: study harder next time, be honest when they hit a gap in your knowledge (maybe they will offer to fill in that gap!), and don't Google on the phone. Interviews are like tests at school - closed book, unless stated otherwise.
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.
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...
In an accelerating car, the air sloshes toward the back, producing a pressure gradient. The helium balloons, being ligher than air, will be crowded out by the sloshing air and will drift toward the area of lowest density, which is in the front.
*transporting balloons correlates strongly with transporting kids
Especially that ridiculous, idiotic Monopoly one that journalists seem to love.