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

5

u/D3gr33 Mar 01 '17

why do I need to know bubble sort, merge sort, whatever sort or algorithm by heart?

If it's an obscure algorithm, then you're right, that's a bad way to gauge ability. If it's something that's supposed to be common, any worthwhile software developer should be able to come up with it. If you were asked to implement binary search, it's not a matter of having the algorithm memorized, but rather that you should be able to easily reproduce the code just by knowing the concepts.

It's like asking someone to write FizzBuzz. Just because they can come up with the code doesn't make them a good software developer, but if they can't come up with a solution at all, then they're probably awful at the sort of problem solving skills that software development requires.

Who actually writes sorting algorithm from scratch?

Nobody. But making you write a sorting algorithm from scratch shows that you understand the concepts, which is extremely important.

5

u/KagakuNinja Mar 01 '17

There are books such as Cracking the Code Interview that breakdown hundreds of sample code challenges into categories, and provide a flow chart for how to analyze a code challenge and quickly pick one of about 8 basic strategies for solving the problem.

In other words, it is a way to cram for whiteboard challenges. It is necessary to do this kind of cramming, because solving whiteboard problems in a way that will impress the typical interviewer is significantly different than how we write actual code on the job.

Crammers will review all the basic algorithms of sorting, searching, etc; as a result, they will perform better if you ask such a question. If you ask a "custom problem", then they will apply the flow chart and again, perform better.

2

u/D3gr33 Mar 01 '17

I've read Cracking the Coding Interview before, and it definitely helped me in interviews (including the interview for the job that I'm supposed to be doing right now). The way that it helped me prepare for interviews, though, was by making me a better developer.

Knowing how to solve algorithmic questions makes you a better software engineer. Being able to clearly explain algorithm design by drawing things on a whiteboard is a crucial skill to being able to work with other developers. And being able to explain what you did in code and why is absolutely an important skill for anybody that works on a team.

A lot of companies definitely put too much stock into whiteboard and algorithmic problems. And a lot of companies do it completely wrong where they make it about rote memorization of specific algorithms. But if I were hiring developers, I would definitely pick the guy that can explain an algorithm on a whiteboard and answer questions about it over the guy that stands there muttering 'um' because he can't explain how he would approach an algorithmic problem.

2

u/thedufer Mar 01 '17

If you ask a "custom problem", then they will apply the flow chart and again, perform better.

So your problem with it is that people who studied and got better at the job I want them to do will outperform people who don't? I...don't see why that's bad.

2

u/beginner_ Mar 02 '17

t's like asking someone to write FizzBuzz

Not really. Because AFAIK they explain to you what the code should do and you just write it which is trivial. Requires 0 knowledge. If they say write bubble sort, then you need to know the algorithm/concept and apply it from there. Maybe we can argue:

"Write any sort algorithm, performance /big O doesn't matter."

Would be much more acceptable.

2

u/D3gr33 Mar 02 '17

Because AFAIK they explain to you what the code should do and you just write it which is trivial. Requires 0 knowledge.

You'd be surprised how many people get stumped by FizzBuzz. It works as an easy litmus test to see if someone actually knows any programming or if they're just trying to con their way into a cushy job. People in interviews for six figure salary software jobs still get asked FizzBuzz, and for good reason. Not disagreeing with you here, just adding to the discussion.

If they say write bubble sort, then you need to know the algorithm/concept and apply it from there.

To me, a big part of this is the conversation. If someone were to reply to the bubblesort question "I'm sorry, but I don't know bubblesort at all, could you maybe describe the algorithm and I can try to write it in pseudocode?", then that would still be a correct answer. I'm more interested in how they respond to the problem than whether or not they actually know the algorithm by heart. The only wrong answer is "I can't do that" without asking for help first.

Asking them to write any sort algorithm at all would also be a good question, though. A good candidate should be able to name half a dozen sort algorithms and describe which ones are good and why, which would definitely end up being part of that conversation.