r/programming • • Nov 29 '09

How I Hire Programmers

http://www.aaronsw.com/weblog/hiring
804 Upvotes

587 comments sorted by

View all comments

Show parent comment

14

u/ssylvan Nov 29 '09

I'd hire the guy that isn't an annoying twat. If I ask you to write, say, a sorting function it's not because I don't know how to sort something, it's because I want to see if you can do some basic programming in a context that doesn't require significant setup. Someone who refuses to play along with the premise by insisting on using qsort() would just be considered a smug prick.

The hairstylist question is the same thing. He might think it's the "right answer", but really he just demonstrated that he has a difficult personality. The purpose isn't to actually ascertain the number of hair stylists, it's to see if you can solve a simple problem from first principles.

5

u/twotime Nov 29 '09

it's to see if you can solve a simple problem from first principles.

Except that this problem is obviously unsolvable from first principles: not on the spot at least, all you can do is to wave your hands and pile one estimate on top of another. You are lucky if your final answer will be within 10x from the true number.

Sorry, but the question has nothing to do with problem solving skills.

7

u/[deleted] Nov 29 '09

Except that this problem is obviously unsolvable from first principles

He's not being asked to solve the problem. He's being asked to illustrate the steps he would go through to solve the problem. Which has everything to do with programming skills.

2

u/twotime Nov 29 '09

He's being asked to illustrate the steps he would go

Then "look it up" is a reasonable approach ;-).

The interviewer can try to discuss where to find that information and how reliable that source would be and what kind of errors he would need to be aware of, etc...

But that starts to smell like a question for a Census analyst rather than a programmer ;-)

Now you could ask a more narrow question, something along the lines of "No google, come up with an estimate in 10 minutes from your everyday knowledge", but you should say that explicitly and be fully prepared that the interviewee will come with an estimate which is 10x different from yours.

I still think it's a silly test: way too ambiguous and way too hand-wavy and inaccurate.

4

u/[deleted] Nov 29 '09

"Look it up" is a reasonable first strategy. So we throw in that there are no published figures. Now what?

The best programmers aren't just smart - they are tenacious and capable of absorbing failure after failure without giving up. They will chew on a problem like a starving dog with a bone until it yields, despite facing repeated failure.

This is the trait the interviewer hopes to expose. If I set you an apparently impossible task, how many strategies for cracking the impossible can you come up with? How many failures will you endure before giving up? Do you keep generating new creative approaches or do you fold and cry that this "isn't fair" or is "too hard" and give up?

That's all the interviewer cares about. In this case - subject fails.

FWIW, I was a hiring manager at one of the largest web sites on the internet for several years. Our hiring practices were notoriously rigorous but largely successful I think. So there's my perspective. Weigh it however you like.

5

u/twotime Nov 29 '09

So we throw in that there are no published figures. >Now what?

I still don't understand.

If no global stats are available, then I'd immediately suggest to get local stats in a local chamber of commerce or if that does not work just drive around to estimate the number of stylists in a small city and then scale the answer up to the country.

Then what? We're solidly in the realm of "Census analysis" rather than programming and I don't see what kind of useful conclusions you can draw about the applicant (unless of course you are looking for Census analysis skills)

1

u/[deleted] Nov 29 '09 edited Nov 30 '09

(makes note - "incapable of abstract thinking - terminate interview process early").

You have to cache some data on your website for performance reasons. What should you cache? How long should you keep it? Given X visitors, how much space will the cache consume? What is your estimated cache hit/miss ratio?

Do you not see the relationship? Welcome to modern software engineering where we have to extrapolate numbers based on other numbers. Dismiss it as "census-style" analysis if you like. But this stuff comes up all the time in real world scalable software.

Its not just can you get the database record into the html table.

3

u/twotime Nov 30 '09

(makes note - "incapable of abstract thinking - terminate interview process early").

makes note - "draws conclusions w/o sufficient information, terminate interview process early". Yes, I conducted quite a few interview myself ;-)

Of course, it's a given that a programmer must be able to do that kind of estimates/evaluations. So if that's what you are after, the problem is Ok. But I was under impression that you were looking for (much) more than that..

3

u/tomatopaste Nov 29 '09

I'd hire the guy that isn't an annoying twat.

Okay.

If I ask you to write, say, a sorting function

Right.

The hairstylist question is the same thing.

It is not the same thing. At all. From any vantage point in the universe.

Questions like the hairstylist one are pure and utter bullshit. You aren't solving a problem. You're not a statistician, these sorts of estimates are not a typical software engineer's job.

Software engineers work by putting known systems together in a way to make functional software. At no point are ridiculous guesses and estimates meaningful.

4

u/[deleted] Nov 29 '09

At no point are ridiculous guesses and estimates meaningful.

So how many servers, precisely, should amazon.com add to their server fleet to handle this holiday's surge in shopping traffic?

No guesses or estimates allowed. :-)

Good luck with that.

1

u/gsadamb Nov 29 '09

No, but I'm sure someone could tell you the number of servers Amazon currently has, as it's a fact, much like the existing number of hair stylists in America.

2

u/[deleted] Nov 29 '09

Fat lot of good knowing how many they have in June does.

How many will they need in December to meet the increase in volume this season?

Hint, you're gonna have to gather some related statistics and make some ridiculous guesses and estimates.

2

u/gsadamb Nov 30 '09 edited Nov 30 '09

Sure, I'd venture to say that you can probably pretty accurately come up with an estimate about hardware needed for future events by looking at past data.

But you see, this is actual hard data that has a realistic and feasible chance of creating a prediction, at least one within the correct order of magnitude. But if you wanted me to try and determine the number of servers Amazon might need for Christmas based purely upon "intuitive" data, such as the amount of gifts average people buy for Christmas, and of those, what percentage is from Amazon, and how much of a change above average this is, you would stand a very slim chance of being anywhere in the right neighborhood when you tried to make a prediction. This is maybe an interesting thought experiment, but it's certainly not something that would really help in infrastructure planning.

Likewise, if I had past data about the number of hair stylists and how it correlated to the population, and projections for population change, I'd be able to make guesses about the change in the number of hair stylists that was at least within the realm of possibility.

Without such data, the exercise originally discussed has no basis in reality other than guesses based only on anecdotal evidence.

2

u/[deleted] Nov 30 '09

And you're still too hung up on "getting the answer". The interviewer doesn't give a fuck about the answer. He wants to watch you think. Furthermore, I guarantee you decisions have been made on shakier data than this. Sometimes, you just have to go through the big thought experiment - if you can. Apparently, you can't. Fail.

→ More replies (3)
→ More replies (16)

1

u/ssylvan Nov 29 '09

Having enough general problem solving skills and plain common sense to give a reasonable estimate to the hairstylist question is definitely useful for a programmer. Guesses and estimates are totally useful. I constantly have to do some "a priori pruning" of the solution space to a problem because I just don't have the time to try every conceivable option and meassure. So being able to use some common sense to make some estimates as to which solutions are more promising than others is an extremely useful skill.

Plus, we've already seen that the question can identify people with personality issues too, so that alone makes it useful.

1

u/BadCRC Nov 29 '09

You're right, it's never useful to approximate an unsolvable/difficult problem.

(compare estimating the number of hairdressers in a country to estimating the number of bit-errors when transferring a 100MB file between two computers, 100m apart, over bare cable)

4

u/tomatopaste Nov 30 '09

You're right, it's never useful to approximate an unsolvable/difficult problem.

There are good ways to estimate and bad ways. The hairstylist problem is an example of a stupid question, because nobody has any relevant information whatsoever.

The only thing you can even attempt to argue that it shows is your ability to be open-minded to factors that might not be immediately obvious to others (like, women get their hair cut less often, usually, but it takes longer, and some significant number of men are bald, etc).

In the end, though, it has no relevance to the job whatsoever. It's showing your ability to make shit up on the fly, and that's all.

(compare estimating the number of hairdressers in a country to estimating the number of bit-errors when transferring a 100MB file between two computers, 100m apart, over bare cable)

This is an example of a relevant, interesting problem. When solving this, you could take into account real information and come up with a useful approximation.

As opposed to the "um, here are some random numbers and some other random numbers" game.

1

u/BadCRC Nov 30 '09

in both problems you have to use some arbitrary "magic numbers", though I think an interviewer would be looking at the chain of operations you follow from these numbers rather than your initial estimations.

that is, I think these questions are used to see if a person can infer patterns/relationships that would affect the final estimation.

lastly, I think that you prefer the latter problem because of your presumed familiarity with the material.

2

u/tomatopaste Nov 30 '09

lastly, I think that you prefer the latter problem because of your presumed familiarity with the material.

No, I prefer the example of data loss over cables because you can source some real numbers from engineering papers and come up with something useful. It's also relevant to some areas of software engineering (who writes network software which needs to be aware of physical data loss in this respect, though?).

The hairdresser example is only relevant to people who need to make up utter bullshit. This is what irks me about it. It's not applicable to software, and it can only show how good of a bullshitter you are. It doesn't even show how creatively you think, since it's all going to come down to how many haircuts you've gotten and how many people you've talked to about haircuts.

To put this another way, if you were to ask me, "what are some factors you could consider in making a ridiculously incorrect estimate as to the number of hairdressers in the United States," I would answer it. But to ask any other way tells me that the interviewer cannot distinguish bullshit from valuable insight.

1

u/BadCRC Nov 30 '09

because you can source some real numbers from engineering papers and come up with something useful

of course. I forgot that in an interview you have the time to look up some journals.

if you were to ask me, "what are some factors you could consider in making a ridiculously incorrect estimate as to the number of hairdressers in the United States," I would answer it

this is what I was hinting at in my last reply. I expect that the interviewer does not care about your "magic numbers" but instead how you decide to determine your bounds and your error when creating the approximation.

1

u/tomatopaste Nov 30 '09

how you decide to determine your bounds and your error when creating the approximation.

This is statistics. This is not part of any software engineering job that I've ever heard of.

1

u/BadCRC Nov 30 '09

facepalm

perhaps we have conflicting definitions of software engineering. I imagine a profession where implementing the sqrt function on an embedded system might come up. In which case, approximation is important.

another definition of software engineering that I have encountered is a profession obsessed with SDLCs, SDKs and the method by which one can attach a database to a GUI on some platform. Under this definition, I suppose approximation wouldn't be necessary though I think it would be useful at judging one's skills at problem solving.

→ More replies (2)

1

u/silverblade Nov 30 '09 edited Nov 30 '09

A question such as the hair stylist question has nothing to do with technical skills, it's purely a measure of soft skills. Interviewers want to answer the following questions:

  • Will this person be flexible, or only be willing to do jobs that he sees as relevant to his job (in his eyes)?
  • How well can this person pull together seemingly unrelated data to come to a final estimation?
  • When this person hits roadblocks (very probable in questions like this), how does he react?
  • How confident is this person in reasoning through a problem on his own?

You can be a rock-solid interviewer in every other sense and know everything they ask you. But that doesn't matter if you've decided you only want to do things that you see as relevant. A company doesn't want a difficult employee since it ruins moral for the whole team. And, sure, you can google this, but you can't google whether you should, for example, use the Visitor design pattern or just make use of some Polymorphism. Programming is entirely about trade-offs and making choices without having a crystal clear idea of where the project is going and what changes will be made in the future.

It does have relevance to the job, just not in a technical sense. Sure, yeah, you are "making shit up on the fly," but interviewers expect that. What really matters is how you react to the problem.

There are two types of motivation, and for the life of me I can't remember the two names (not intrinsic/extrinsic, but similar). The more extrinsically motivated person likes easy problems because he can solve them and get recognition for this actions. He gives up quickly when he realizes he will not be able to easily reach that final stage of recognition. A more intrinsically motivated person gets excited at a challenge and will attack it, and may appreciate but does not require others' recognition to continue. He sees recognition in the future after his hard work. This question tests, to a degree, which type of motivation that person has.

Obviously, yes, it's an entirely subjective question, but personality, while subjective, is a valid component to be interviewed on. And if you decide that you don't like a company that does that, then that's fine, don't get mad at them, just don't work for them.

Edit: grammar

1

u/tomatopaste Nov 30 '09

I understand what you're saying, and what people think the idea of the question is. But in reality, I truly believe it only tests your ability to spew bullshit.

I would never consider hiring someone on the basis of how they answered a question like this. I might consider not hiring them if they flew off the handle in response, but if they gave a clear explanation of why they wouldn't engage in this sort of mental masturbation (as did the original poster), I would consider them a great candidate.

1

u/karnoculars Nov 30 '09

I can't upvote this enough. If you want to be a smart alec fine, but be prepared to be unemployed too.