I am the ghost of groovymother.com. Woooooo!

This is an old page from Rod Begbie's blog.

It only exists in an attempt to prevent linkrot. No new content will be added to this site, and links and images are liable to be broken. Check out begbie.com to find where I'm posting stuff these days.

The book that is indirectly responsible for me getting my new job

April 21, 2008

The book that is indirectly responsible for me getting my new job

A few months ago, I was in the pub with a couple of geekchums. The topic of job interviews was going round the table, in part because I’d been talking about my goal of getting a job and moving to the Bay Area. Someone mentioned that they’d interviewed at Google, had read Programming Interviews Exposed the night before the interview, and nearly every question they’d been asked was pretty much out of the book.

This caught my attention, because a few months earlier I’d had a phone interview with a division of Google that rhymes with TouYube which had gone pretty well until they pulled out one of those algorithmic questions that Google loves; Something about finding the median value in two sorted lists of integers. I’d come up with a solution, but clearly not a satisfactory solution. (As Keith later described it, every Google interview question has to have an O(log n) solution… and at that time, Big O notation hadn’t been on my radar in freakin’ years). The next day, the recruiter called to say they’d decided to pass on me.

So, the morning after the discussion, once the hangover had subsided, I ordered myself a copy. I read the whole thing in a few days, absorbing details about graph theory, pointers, recursion and, oh yes, Big O notation that I hadn’t thought about since receiving my CompSci degree 10 years ago.

But more important were the example interview questions throughout the book. Generally these would be structured as the question, followed by a naïve solution, a better solution, and then any follow-up questions or limitations the interviewer might introduce. For example, if you get the classic “Reverse the order of words in a string” question, it guides you through the initial solution of “Start at the end of the string, scan backwards, and when you find whitespace, copy the word to a temporary buffer, then replace the original string with the new one”, then explains what to do when the interviewer inevitably asks you to do it without using another buffer (reverse the whole string, then iterate through reversing the characters in each word).

A week or so later, I had a phone interview and was able to answer algorithmic questions speaking authoritatively about binary trees and heaps. That was enough to get me flown out to SF for in-person interviews, which at one point included a question word-for-word out of the book!

All that said… For a variety of reasons, I didn’t take that job. It just helped because I first spoke to Current during the weekend I was in town for the interviews, and got a chance to spend some face-to-face time at Current’s offices that day.

(In fact, the interviews with Current went by without a single algorithmic pointers-and-big-O question. And to me, that was a good sign, because as I say, I haven’t cared about that shit in 10 years—In my line of work, rather than optimizing lines of code, I’m more to get more bang by tweak a SQL query or throwing memcache at a problem.)

Which raises an interesting question: Is reading this book cheating? Is it the equivalent of just reading the answer key before an exam? In my opinion, no. For two reasons:

  1. For the most part, it was just refreshing details I’d already learned during my CompSci course, but had filed away in the trashcan of my neurons, along with “Where’s the best deep-fried pizza in Edinburgh?”, as no-longer relevant to my life. This book probably won’t help too much if you don’t have the first clue about pointers or recursion to begin with.
  2. If your ability to answer algorithmic questions is the only (or most important) thing the employer is rating you on when you interview you, then they’re fucking idiots and will get everything they deserve.

The book is just a handy tool for your belt when preparing for interviews, to get your mind in the right place to push past the algorithmic questions so you can present all the other amazing reasons why they must hire you right now. Similarly, I highly recommend reading Joel Spolsky’s Smart and Gets Things Done and Rands’s guide to how your resumé is being read for an idea on what the person on the other side of the phoneline or table is (or should be) thinking.

But without this book, I might not have passed that phone screen, and thus might not have been in SF when Current called, and might not have met with them, and might not have gotten excited by the opportunity, and might not have the job I have now.

And for that reason, I unreservedly recommend this book to every software engineer who might be on either side of the interviewing process soon.


On Monday, April 21, 2008, Sammy Larbi commented:

"If your ability to answer algorithmic questions is the only (or most important) thing the employer is rating you on when you interview you, then they’re f**king idiots and will get everything they deserve."

I don't know - I imagine there are a lot of companies where writing your own high-performance algorithms and data structures is important. Not everyone does CRUD web apps. =)

PS: What's this about: " * Watch your mouth! The words "f--k" are not allowed here."

I was quoting your blog post. =)

On Monday, April 21, 2008, mc commented:

Ok, I have to ask-- where is the best deep-fried pizza in Edinburgh?

On Monday, April 21, 2008, Dog Soldier commented:

Information that can be easily looked up in a book and rehearsed is pretty silly interview fare....but that's usually what 90% of these interview questions are. You can tell a LOT about a company that relies on that kind of nonsense. They don't want solutions to problems, they want drone-cogs.

On Monday, April 21, 2008, Some Guy commented:

While I definitely agree that algorithmic questions alone are not the best way to judge a candidate, I have to say, even some simple algorithm questions are well worth asking, because they weed out a whole boatload of idiots right off the bat.

You wouldn't believe how many candidates I've interviewed who can't even come up with something so simple as a nested loop! So our standard interview practice is to start with a simple algorithm, then maybe a more complex one, followed by some string manipulation, some SQL, some web stuff (see if they know anything about common security holes such as SQL injection and XSS).

We try to be extremely thorough with our candidates, and it has certainly paid off.

It's pretty lame to ask questions that come straight out of a book, and even more lame to reject good answers even if they're not the ones the book says to look for. But a well crafted algorithm question can be a great multi-layered puzzle that allows you to judge the candidate's creativity and problem-solving ability.

Simply put, if you can't code a simple nested loop, or can't do a little creative problem solving on the spot, chances are the rest of your code sucks too.

On Monday, April 21, 2008, Rod commented:

@Sammy -- Hah! I had no idea Django had a built-in profanity filter; I've turned that fucker off now. And I agree that algorithmic prowess *is* important for some jobs (if you're tweaking PageRank for example), but it should still never be the most important part of you being hired.

@mc - There was a chippie on the Royal Mile a few doors away from the Fringe office that did a damned-good deep fried pizza, although I probably bought most of mine from the Montgomery Fish Bar off of Leith Walk.

On Monday, April 21, 2008, Rod commented:

MASSIVE apologies to anyone who tried to post a comment on this post and got a random 404 error -- It appears my anti-spam measures and my page caching strategy didn't co-operate! Fixed now.

On Monday, April 21, 2008, Psychochild commented:

Asking questions to find out about the applicant is what interviews are all about. But, some questions are better than others.

I ran into this when I graduated from university a while ago. There were a lot of articles in tech magazines about how Microsoft picked the most clever people by asking puzzle-type questions. One company I interviewed with on-campus had read those articles, I guess, but didn't get the point: they were simply waiting for me to give the "right" answer instead of seeing how I tried to tackle the problem. The three interviewers just sat there as I tried to work through the problem without any sort of interaction (or whiteboard or other aid).

That's the big problem, in my opinion. If I run into a problem at work, I don't sit around (or get an audience to watch me) until I come up with a solution; instead, I go find help in the form of a co-worker or internet search. And, while these puzzles might show that you can solve a few problems on your feet, it's more likely to show that you've encountered the problem before (perhaps in a book) and happen to remember the answer. Not necessarily a good test to see if an applicant would make a good employee or not, IMNSHO.

In the end, I'm glad I didn't get that job; I'm now a game developer and enjoy this career much more than if I could have solved (or remembered the solution to) that particular puzzle.

On Monday, April 21, 2008, hunzonian commented:

if i had the kind of programming knowledge required for a google job, i doubt i would need to read about acing an interview. it would be much more productive to write a book about how and where to get an entry level programming job for people who have 100K studentloan to pay off. in the USA if you want a decent entry level job, you better get your passport because they are all in india and other places overseas.

On Monday, April 21, 2008, Kyle commented:

If an interviewer is depending completely on a "canned" interview, it is perfectly acceptable to study for the likely questions. One would hope that this level of interview would merely be the first of several, the purpose -- as someone else has pointed out -- to weed out anyone who is completely unacceptable. Subsequent interviews OUGHT to delve more into your personal skills and knowledge.

A key to remember is that for most interviewers, their greatest fear is hiring the wrong person. Do everything you can to allay that fear and you stand the best chance of getting the job. If it requires a second-best answer to the question because that's what they expect, then give them what they want.

On Monday, April 21, 2008, joe commented:

Is reading the book cheating? That's a question that didn't even need to be asked. Cheating would be saying something like you've worked for NASA the last 5 years ... when you hadn't.

They're called resources for a reason.

On Monday, April 21, 2008, Indu Sant'Anna commented:

I find this amusing simply because I had the reverse experience while preparing for the college application process.

I purposefully did not read any book remotely related to standardized testing or the college interview process. In my opinion, it was cheating. If some form of reading is required for any process it should be noted by those administering the process. Why? Simple, it cannot be assumed those who you are competing with has knowledge of these materials and is therefor terribly unfair.

My 'grains of salt' are that I enjoy evaluations which I am unprepared for and I also have very little of a 'dog-eat-dog' mentality. The idea that simply reading some book would get me X (college, job, etc.) is nothing less than boring (I know the answers, no fun) and at worst infuriating (How can society be so exclusive).

Books like this do however allow for clearer communication in the interview process, but that only brings me back to the original point: if you want people coming in prepared to answer X question let them know about it.

The arbitrary nature of who has read what does in no way improve the quality of those seeking some position.

On Monday, April 21, 2008, a commented:

I got the reverse story here... lol ... major second interview with Investment bank, got typical algorithm questions some lists other text book problems and puzzles. Aced all that.

So I said to myself: these people might want to know what type of algorithms I can develop and gave a few examples of real problems and solutions... guess what: ain't got the job because "you would get bored here and leave in 6 months".

Good thing. I said to myself: fuck these bozos! I don't want to program for idiots anymore so now I'm VP at a biotechnology company.

That's how you stop being a programmer!

On Tuesday, April 22, 2008, null commented:

Downloading the ebook


On Tuesday, April 22, 2008, JoeC commented:

I'll approach this from the other side of the table. As the CTO of a medical imaging company, I did a fair amount of interviewing and never asked algorithmic questions. Some of the worst employees I've ever had knew that stuff cold. Anyway, that's what books of algorithms are for. It's a difference between small-scale thinking and large-scale thinking; the ability to step back and appreciate and comprehend a problem in its larger context. You don't do that by asking quick-sort problems and puzzles.

What was (and still is) far more important, in my mind, is what kind of person you are. Are you comfortable in your own skin? Are you trying to spin your experience to make it seem more than it is. Are you likely to be a hack or a code cloner? If you're a native English speaker, do you speak it well? Can you express ideas clearly? I'd tell candidates what we were working on and see how they reacted. In sum, I think I was simply trying to get a sense of the person's honesty, genuineness and ability to play well with others. In my experience, most software development problems come from people with bad interpersonal behavior: prima donnas, complainers, manipulators, drama queens (of both sexes), and cynics.

If the people interviewing you a) don't understand that character is more important than small-scale problems and the ability to memorize book answers and b) can't tell if you're creative or a big-picture thinker by talking to you, then you don't want to work there anyway. Personally, I won't take technical or personality evaluation tests. That tells me the people running the joint are trying to substitute process for judgment, and as Rod points out, they'll get exactly what they deserve.

On Tuesday, April 22, 2008, Grammaticus commented:

An awful shame about the use of 'off of' don't you think?

About This Site

This is an archive of groovmother.com, the old blog run by Rod Begbie — A Scottish geek who lives in San Francisco, CA.

I'm the co-founder of Sōsh, your handy-dandy guide for things to do in San Francisco this weekend.