r/programming • • Mar 01 '17

Programmers are confessing their coding sins to protest a broken job interview process. “Whiteboard” interviews are widely hated. They also discriminate against people who are already underrepresented in the field.

https://theoutline.com/post/1166/programmers-are-confessing-their-coding-sins-to-protest-a-broken-job-interview-process
1.0k Upvotes

717 comments sorted by

View all comments

Show parent comments

9

u/NoMoreNicksLeft Mar 01 '17

They're reasonably objective. The problem to be asked can be shared among people in a company before hand.

They seem that way, don't they? Either a person can figure out your problem, or they can't. (Some problems are even non-binary, allowing you some sort of score!)

But they're not objective, not in the way that you mean. All they are really is a way of checking if your applicant belongs to a group who have discovered the problem and shared enough metadata about it to let them contrive a "solution" later.

Some of these applicants discover the solutions in college compsci programs, at least the non-flunkies who did the homework. Others discover it through ten zillion blog posts... but maybe only a few of those read long enough to gather the information with which to formulate the solution later. Others yet will buy books and courses to cram with, where they're given a hundred of the most popular problems and practice (good if they can't easily absorb the key points through a 10 minute read of that wordpress article).

None of these applicants are necessarily clever or bright. But they sure do seem like it. They jump through all of your hoops.

There's another component to this... fraternal organizations have long performed bonding rituals where the new member is tormented. You actually feel closer to him after he's let you haze him. Sure, you can't do any Skull and Bones rites here with testicle-paddling or whatever, but mental torment is enough. If he suffers through, you feel closer, and if he doesn't, you get to feel superior.

And if anyone complains too harshly, well... what does he know? He's unemployed. Obviously his arguments are bad, if he was so smart someone would have hired him, right?

15

u/quicknir Mar 01 '17

It's not that hard to ask a problem that's relatively unlike to map exactly to something they saw in undergrad. There's a practically infinite number of subtly different algorithms problems. And if they are good at algorithms problems because they read a lot of blog posts, great, good for them! They'll shine in that part of the interview. Then we'll see how they do on other parts.

It's pretty easy to ask a problem that most people won't know the answer to already, but could easily solve with some good problem solving skills, CS knowledge, and intuition. All valuable skills for a candidate to have. I'm not sure why this is hard for you to accept.

10

u/rootbeer_racinette Mar 01 '17 edited Mar 01 '17

Why don't you name a couple?

From my experience they all follow a handful of tropes. Recursive evaluation, hash, heap sort, trie, etc.

I've seen many times over now that someone who can effectively use a debugger is 10x more valuable than someone who can write a trie.

2

u/quicknir Mar 01 '17

I've asked, for instance, for someone to give me a data structure that you can push values into, and allows me to get the median in O(1) time. Sometimes people have seen it before, but usually they haven't. It gives me a chance to see that they can come up with a slow solution very quickly. That they have basic understanding of big O. See what data structures they think would be useful. If they don't see they need 2 heaps, I'll give them some subtle hints, and then bigger ones. Once they get the idea I start asking for details of the functions, branches in the logic. I ask if the class is maintaining invariants and what they are.

Maybe 5% of people admit they have seen it. Another 5% solve it quickly enough or in such a way that I suspect they may have seen it but not admitted it. In any case this is no big loss as it only takes about 5 minutes and I ask something else. Probably 10-15% do what I would consider a good job. They get the easy parts on their own, they make good use of hints, communicate well, describe correct logic and invariants, etc. A quarter or a third of people just do terribly; even with progressively larger hints they cannot make any independent progress. It usually takes me an hour to get someone through the problem in this case, and I don't need to ask them anything else because they are an easy reject. The remaining people (about half), do ok. My review would then depend on many other factors like other questions I asked them, their relevant experience and our discussion of them, whether it seems like they'll be easy to get along with, etc.

I'm pretty sure that this question, conducted well, provides a good amount of valuable information on candidates and I'm pretty happy with it. Being able to reject about a quarter of people with an interview I have put minimal time into preparing is already pretty good. And no, I don't shed any tears for those programmers; I hint pretty generously and I honestly expect that for a competent programmer that should be enough.

I know dozens of similar problems. The details of the problem are not really the key thing. As long as the difficulty of the problem is reasonable, you can learn quite a lot as long as you do a good job interviewing and try to explore various interesting things with the candidate and don't just frame it in a shitty Q&A format.

3

u/Poddster Mar 01 '17

I've asked, for instance, for someone to give me a data structure that you can push values into, and allows me to get the median in O(1) time. Sometimes people have seen it before, but usually they haven't. It gives me a chance to see that they can come up with a slow solution very quickly. That they have basic understanding of big O. See what data structures they think would be useful. If they don't see they need 2 heaps, I'll give them some subtle hints, and then bigger ones.

Why'd you need two heaps? You just need a count + tree? If your tree sorted on each input (aka a heap?), then the middle value (the median) is the root node? (or for odd counts, it'll be root+left/2 or root+right/2 or something)

3

u/quicknir Mar 01 '17

A count and a tree doesn't quite work out. No BST implementation that I'm aware of is so balanced that you can assume the root is the median. And even then, the left and right children are not the values one above or one below the median. For instance, the right child of the left child, is larger than the left child but still less than the root, so it's closer to the root.

To make a long story short it is possible to do it with a single binary search tree by taking advantage of the fact that BST iterators are not invalidated on insertion. In my experience this solution is harder to come up with than two heaps.

3

u/Mehdi2277 Mar 02 '17

The simple way to do it with a BST is to use an AVL tree that keeps track of the left and right subtree sizes. You can then recurse to the side that contains the median. Technically this is O(log n), but you can also keep track of the median explicitly and just update it whenever you do an insert without slowing down insert asymptotically. The name of using a tree that also keeps track of things like medians is an order statistic tree.

2

u/mikulas_florek Mar 01 '17
vector<int> values;
void push(int value) { values.push_back(value); sort(values); }
int getMedian() { return values.empty() ? 0 : values[values.size() / 2]; }

Do I pass?

1

u/Slime0 Mar 02 '17

You passed the "slow solution very quickly" part.

1

u/rootbeer_racinette Mar 01 '17

So a heap question. What does this have to do with your job again?

8

u/quicknir Mar 01 '17

Yeah, because all it tests is your knowledge of heaps. It doesn't test big O, your problem solving ability, your intuition for CS, your ability to execute logic, your understanding of what an invariant is and how to formulate it, your ability to communicate it... oh wait it does. All of these things matter at my job, I don't know about yours.

2

u/rootbeer_racinette Mar 01 '17

No really, what do you actually do? What is it you are hiring for?

Surely you do more than take efficient medians all day long.

6

u/[deleted] Mar 01 '17

[removed] — view removed comment

3

u/KagakuNinja Mar 01 '17

Big O isn't irrelevant. But it rewards people who graduated from college recently, and people who cram for interviews.

If I need to know the big O of a algorithm, I can google it in seconds.

0

u/[deleted] Mar 01 '17

[deleted]

1

u/GhostBond Mar 02 '17

Ditto, Big O is practically irrelevant in web dev. Over a decade, I've never even had a use for it. On the other hand, understanding sql, tables, and being able to troubleshoot browser bugs are actual skills. Oh yeah, and doing a decent job of reporting errors.

→ More replies (0)

1

u/mikulas_florek Mar 01 '17

That does not mean that the position he interviewed people for did not require such knowledge. I create such algorithms almost daily.

1

u/HINDBRAIN Mar 01 '17

An array list? Am I missing something?

-2

u/AmalgamDragon Mar 01 '17

Being able to reject about a quarter of people with an interview I have put minimal time into preparing is already pretty good.

Not for the candidates or your company.

You seem like the kind of guy who would smugly reject a solution that used a doubly linked list with a mid-pointer that is maintained in sorted order via binary search insertions. Same O(lg n) to insert values, the same O(n) memory usage, and the same O(1) to get the median, but not the 'right' answer even though it let's you get the min, max, and percentiles in O(1) as well.

3

u/quicknir Mar 01 '17

You can keep dropping personal insults and snark throughout these posts, it doesn't make anything you say seem more correct.

I'm always happy to hear solutions I haven't thought of. Would like to hear for your solution how you plan to do binary search on a doubly linked list with a mid pointer.

1

u/AmalgamDragon Mar 01 '17

You can keep dropping personal insults and snark throughout these posts, it doesn't make anything you say seem more correct.

Nope, and that isn't the point of those comments any more than they were the point of your such comments. Rather the point is that your own such comments needed to be answered in kind.

I'm always happy to hear solutions I haven't thought of. Would like to hear for your solution how you plan to do binary search on a doubly linked list with a mid pointer.

There's a trick to it. Are you unable to figure out what it is?

→ More replies (9)

2

u/mikulas_florek Mar 01 '17

Not for the candidates or your company.

Not for all of the candidates or your company.

We were small company. The more time I spend on interviews, the less time I spend programming which just was not an option. There were a lot of candidates and it just would not be possible to spend so much time with them. Yes, there might be the the "extremely good" candidate between those 25% who got rejected, but chances are in those 75% there is good enough candidate.

Everybody talks how companies are bad, but what about candidates. They do so much stupid, rude shit, wasting everybody's time. They are basically as bad as the companies. Thank god for all the filters. The very basic, extremely short test we used to send to junior candidates filters 50% of candidates. We never hear back from them. Then a company wonder, do they get the email? Or is it just too complicated for them? If company do not respond to candidate's email, they are angry. But candidates do the same shit.

7

u/NoMoreNicksLeft Mar 01 '17

It's not that hard to ask a problem

It is difficult. It's difficult to find new interesting problems, at least of the sort that are minimally tractable.

This is why there's so much use of the same interview problems. If it were easy, you'd come up with an entirely original problem every time. (But that wouldn't work either... you'd not have the answer.)

Forgive this poor article (I found a better one just weeks ago in the American Mathematical Monthly journal, but even if I could find it again, not sure how to link to it:

http://io9.gizmodo.com/5848752/how-to-solve-jewish-math-problems

The people who were failing these problems were honest-to-god math prodigies. But they'd continue to fail them, and would be rejected for it. Until they managed to enumerate a list of such problems, solve them, and once knowledge of the sorts of solutions that were needed spread, these questions lost their power to exclude/reject. The people using those solutions weren't cheaters, nor were they somehow more clever after having learned the solutions.

Interviews are nothing more than a social ritual, some sort of bizarro culture that has spread in the modern world.

It's pretty easy to ask a problem that most people won't know the answer to already, but could easily solve with some good problem solving skills,

You really believe you can do that.

Even if it were true, the sort of situation you've engineered is the one where they're at their worst. Pop quiz anxiety is a brain-killer.

Ignoring that though, it's impossible to come up with such a problem where their problem-solving skills will follow your aggressive appointment schedule for Thursday. Profound, deep thought... presumably the sort that you're attempting to find, that's still going to require hours-to-days.

The last one I had was a few years ago now at this point, and they'd already decided to hire me... wasn't so much a pop quiz, but a "hey, we're running into this problem that we're not entirely sure how to solve".

It finally occurred to me about 2 days afterward.

Your interview isn't doing what you think it does. It can't.

2

u/KagakuNinja Mar 01 '17

You are exactly right; the modern equivalent are books like "Cracking the Coding Interview".

2

u/GhostBond Mar 01 '17

There's another component to this... fraternal organizations have long performed bonding rituals where the new member is tormented. You actually feel closer to him after he's let you haze him. Sure, you can't do any Skull and Bones rites here with testicle-paddling or whatever, but mental torment is enough. If he suffers through, you feel closer, and if he doesn't, you get to feel superior.

Definition of Hazing, from Google:

the imposition of strenuous, often humiliating, tasks as part of a program of rigorous physical training and initiation.

From wikipedia:

Hazing (referred to as ragging in South Asia) is the practice of rituals, challenges, and other activities involving harassment, abuse or humiliation used as a way of initiating a person into a group including a new fraternity, sorority, team, or club.