Tag Archives: 1000 or more words

How to avoid analysis paralysis in the interview

Prepping for a job interview is a little like a politician prepping for a debate. There are certain questions you can count on hearing, and you prepare canned responses to them. In the job interview these would be things like, “Why did you leave your last job?” and “Where do you see yourself in five years?”

Then there are the technical screening questions. They’ll focus on your experience and knowledge. Typically you’ll get some basic stuff to begin with, just to see if you really did all those things you put on your resume.

Then you start getting to the interesting questions. The ones that don’t have a clear “right” answer. Or do they? Does the interviewer have something specific in mind? Will I blow it by not coming up with the right answer?

Take these two technical questions as an example:

  1. When or why would you consider using an RDBMS (like MySQL etc) as opposed to a desktop database (sqlite etc)?
  2. When creating a function how many parameters would you allow that function to handle?

Programmers tend to enter the field, and stay in it, because they’re good at finding right answers. Computers are (mostly) deterministic. The upside for the programmer is that they know with certainty when they’ve solved a problem. The downside is that they know with frustrating certainty when they haven’t. They can’t just dress up “because I said so” in reasonable-sounding logic and turn it in. Their program has to actually work.

But the questions above don’t have right answers. They aren’t intended to see if someone knows how to implement a given solution. They’re intended to see if someone knows how to ask the right questions to choose the right solution.

Anyone can look up a linked list implementation, or a quicksort. Most interviewers are more interested in identifying the guy who can figure out which one to use.

For the parameters question above, I’d want somebody to state a basic rule of thumb — probably something from 3-10 “feels” like a reasonable starting point. But they should also explain their reasoning, which might be along the lines that too many parameters is likely to indicate too much going on in one function. Then possibly present an exceptional case where a high parameter count would be preferred.

Maybe there would be some discussion around passing an array of name/value pairs instead of multiple individual parameters, or named parameters, default values, etc. Or pro/con on passing all the values for an object in the new() declaration, vs. a basic instantiation and then multiple set() calls.

These specifics are not the “one right answer”. They’re examples of the kind of answer I’d hope to hear. If I asked you the question and you couldn’t either float some ideas or ask some reasonable questions, I’d take it as a sign of lack of experience. Interviews are not a multiple-choice test, they’re essay format. If the interviewer or the candidate acts like it’s multiple-choice, they’re wrong.

Trying hard to not get it

If you’re interviewing people for entry-level jobs, maybe you do just need to know that the candidate can implement a particular pattern. Once you get past entry level, you’ll want to see that the candidate can identify which pattern they should implement. Best is to find a candidate who knows why to choose a particular pattern. Which means they know other patterns and why not to choose one of them instead.

You can make it through a class in school only learning the one technique that you’re going to be tested on. That’s why entry level people aren’t trusted to make choices, just do what they’re told. Once you get out of the classroom, you have the freedom to re-invent everything, making the same mistakes everyone has made before you. The more ways you’ve seen to solve a given problem, the more choices you have. I’m not interested in finding someone who’s always going to choose the same solution as me. I want someone who knows the general principles and how to prioritize competing goals.

But some programmers will get nervous, and others downright hostile, if you ask a question without a clear right answer. As far as they’re concerned, it’s a “bad question” that you shouldn’t even ask. Apparently any question where the answer starts with “It depends” is a trick question, and even asking it is an insult.

How you should answer

Remember those courses you took where the instructor would tell you to show your work? Even if the answer was wrong, you could get partial credit for having the right approach. When interviewing it’s all about showing the work. The “right” answer is almost incidental.

But sometimes there is a right answer. Doesn’t that matter? Absolutely. And knowing whether you’re dealing with one of those questions or not is an important skill.

If my goal is to evaluate whether someone knows how to clarify an incomplete requirement, I don’t start by telling him, “Now I’m going to give you an incomplete requirement to see if you know to clarify it.” I ask a question as though there is a right answer and see what they say.

So maybe you read all of this and think that now you know what I’m looking for. That doesn’t help you with someone else who may have a different plan. The good news is that it doesn’t matter, as long as you answer truthfully.

If the interviewer is looking for a specific answer and you give multiple alternatives, you may be giving a better answer than what he expected. Or maybe he’ll disagree with your reasoning and decide that you are wrong. Do you want to work for someone who will shoot down your ideas?

Or the question was supposed to be open-ended but you give a single definitive answer. A good interviewer will prompt you to explain, maybe even asking about specific alternatives. Did you have a good reason to discount those answers? Explain it. Did you not think about that? Admit it. Maybe you’re really not a good fit for this position.

Sure, you need a paycheck. But unless you are desperate you also need a good fit. If you and the person you’ll be working for don’t see things the same way, you won’t get that fit. So instead of trying to overanalyze what the interviewer “really meant”, just answer as honestly and completely as you think you can. If you, the interviewer and the position are a match, all that’s left is to talk about the money.

Get to the point

Dave Christiansen over at Information Technology Dark Side has a good graphic representing what he calls the FSOP Cycle (Flying by the Seat of Your Pants). The basic idea is that when smart people do good things, someone will try to reproduce their success by doing the same thing that worked the first time.

The problem with trying to do this is that every time someone tries to document a “successful process”, they always leave off the first step: get smart people working on the project.

Dave outlines several reasons why capital-P Process will never solve some problems. Joel Spolsky described this same issue in his Hitting the High Notes article when he wrote, “Five Antonio Salieris won’t produce Mozart’s Requiem. Ever. Not if they work for 100 years.”

So if Process can’t solve your problem, what will? According to Dave, it’s simple:

Put a smart PERSON in the driver’s seat, and let them find the way from where you are to where you want to be. It’s the only way to get there, because process will never get you there on its own.

I’ll assume that when Dave says “smart” he really means “someone good at solving the current problem”. I could have the world’s smartest accountant and I wouldn’t want him to remove my appendix. Okay, I don’t want anyone to remove my appendix. But if I needed it done, I’d probably go find a doctor to do it. So what Dave is saying is that you’d rather have someone who’s good at solving your current type of problem, than have Joe Random Guy trying to follow some checklist.

This isn’t a complete answer, though. Some songs don’t have any high notes.

In the middle of describing why you should choose the most powerful programming language, Paul Graham writes:

But plenty of projects are not demanding at all. Most programming probably consists of writing little glue programs, and for little glue programs you can use any language that you’re already familiar with and that has good libraries for whatever you need to do.

Trevor Blackwell suggests that while that may be changing, it was still true at least until recently:

Before the rise of the Web, I think only a very small minority of software contained complex algorithms: sorting is about as complex as it got.

If it’s true that most programming doesn’t require the most powerful language, it seems fair to say most programming doesn’t require the best programmers, either.

You might notice at this point (as I just did) that Dave wasn’t talking about programming, or at least not only programming. The same principle seems to hold, though: Average people can do the most common things with the most common tools. Exceptional circumstances require exceptional tools and/or exceptional people. If only there were a way to predict when there will be exceptions …

The other problem

But let’s say we’re looking at genuinely exceptional people who have done great work. Should we ask them how they did it? After all, they’re the experts.

Well, not really. They’re only experts on what they did, not why it worked. They might have simply guessed right. Even if they didn’t think they were guessing.

Need another example of false authority? Have you ever heard someone describe a car accident, and attribute their survival to not wearing a seatbelt?

First, they don’t know that. They believe it. They obviously didn’t do a controlled experiment where the only difference was the seatbelt. Second, even if they happen to be right in this case, statistics show that it’s much more common for the seatbelt to save you than harm you.

So if you want to design a repeatable process for creating software, you can’t do it by asking people who are good at creating software.

The other other problem

One change I’d make in Dave’s FSOP diagram is in the circle labeled “Process Becomes Painful”. It’s not that the Process changes. Really what’s happening is that the project runs into some problem that isn’t addressed by the current Process.

Every practice you can name was originally designed to solve a specific problem. On very large projects, there’s the potential to encounter lots of problems, so extensive Process can simultaneously prevent many of those problems from appearing.

But attempting to prevent every conceivable problem actually causes the problem of too much time spent on the Process instead of the project.

That’s where Agile comes in. It solves the problem of too much process. Do you currently suffer from too much process? Then you could incorporate some ideas from Agile.

But make a distinction between using ideas to deal with specific problems, and adopting a whole big-M “Methodology”. Once you adopt a Methodology designed to solve the problem of too much Process, you face the danger of having too little Process.

Your expert programmers may be the best in the world at the problem you hired them for. But now you want them to do something different. And you have no way to recognize that they’re not making progress, because you’ve eliminated all the governance that came with the heavyweight Methodology.

So what’s the point, anyway?

Process is not something you can measure on a linear scale, having “more process” or “less process”. Always adding practices — even “best” practices — to your current Process is simply trying to solve all possible problems, whether you’re currently having them or not.

For each practice you have to consider what it was designed to solve, what was the point of it to begin with? Then don’t treat these practices as a checklist that must be completed every time, but follow the principles behind them.

There’s a line in the movie Dogma that I think describes this really well. Just substitute “process” for “idea” and “Methodology” for “belief”:

You can change an idea. Changing a belief is trickier. Life should be malleable and progressive; working from idea to idea permits that. Beliefs anchor you to certain points and limit growth; new ideas can’t generate. Life becomes stagnant.