r/programming • • May 09 '15

"Real programmers can do these problems easily"; author posts invalid solution to #4

https://blog.svpino.com/2015/05/08/solution-to-problem-4
3.1k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

15

u/erebuswolf May 09 '15

Person who has worked for Adobe, Nvidia, Google, and Boston Scientific as a programmer here. You WILL be asked questions like this but generally harder and expected to program a solution on a white board. Don't join a company that doesn't actually force you to program as part of the interview process. If they aren't ensuring every person they hire can actually write code there is a good chance there are people they have hired who can't.

2

u/[deleted] May 09 '15

To be fair: 'programming during the interviewing process" is a very different statement than "programming on a whiteboard", programming on a whiteboard is shitty and doesn't show you somebody's abilities properly. This kind of tests aren't terrible, but I would rather send it to someone to do at home instead of making them write code under unnecessary pressure.

Google is a big company but their hiring process is less than stellar, I believe problem-solving skills, critical thinking, and being resourceful are much more important than remembering specific stuff, specific knowledge is easier to gain.

1

u/erebuswolf May 09 '15

I can tell you from experience people cheat. People try to cheat even on phone interviews. They think that if they can convince us to hire them they somehow wont be fired for not being able to do the job. You absolutely need to have someone alone with only their wits and a simple programming problem to show they have a mastery of a language of their choice and can actually write readable code.

4

u/[deleted] May 09 '15

This is what makes me sad. This is the state of affairs nowadays. I'm a web developer but came from the traditional CS route and it blows my mind seeing people who want to cry how this is so "unfair" and "useless". This isn't fucking torture nor is it rocket science and my guess is the people getting most upset are the ones most challenged/incapable when it comes to solving these problems.

Is it seriously so goddamn much to ask that the potential programmer the company would pay decent money to be able to, you know, actually program? I hate that web developers especially think they get some pass when it comes to this, and it's why people view web development as some kind of "toy" career - because so many people don't take the time to learn their shit and it makes those of us that do know our shit look bad.

3

u/gnuvince May 10 '15

There was a story a few weeks ago: http://www.thousandtyone.com/blog/EasierThanFizzBuzzWhyCantProgrammersPrint100To1.aspx

Basically, the more someone whines, the more time it takes them to solve the problem. I think that a lot of the people complaining about the problems here are people who have difficulty solving them. Again, I'll reiterate that I find the problems to be pretty good (great even), especially #4 and #5, since they are not completely trivial like FizzBuzz, have many solutions from brute force to more elegant, test your ability to find and reason about edge cases, and most importantly, are a great way to open a discussion with the interviewer.

I see many people saying that these things never happen in the real world; these exact things, perhaps not, however you will have problems where dealing with what happens with zero elements or too many elements can cause a problem, you will need to think about whether your brute force solution will scale when you have double the users (web scale anyone?), you will need to talk with other people on the team about your solution, explain why you think it works, etc. A good interviewer can learn a lot about a candidate from these simple puzzles, and a good candidate should be able to use his performance on these puzzles to identify possible weaknesses and seek to address them. Saying "this never happened to me in 5 years of writing CRUD Rails applications" helps no one, least of all you.

1

u/Synovius May 09 '15

There's a key difference here. The companies you named dabble in what I'm going to loosely call the "free and open programming space". Meaning that they are free and encouraged to innovate and try and come up with ideas that may or may not be part of the company's direct goals at the time. The vast majority companies are not this way and, while they certainly are open to innovation, typically work within a specific technology stack and simply want developers who have relevant experience and are solid with that technology stack. For this reason, I'd expect some of the companies you name to ask more abstract, general programming questions/puzzles like in the OP. However, the vast majority of companies will not be asking questions like this.

Oh, and btw, I, too, worked for a, let's just say massive social networking company, and I conducted and sat in on quite a few interviews. Questions like in the OP were never to be found.

1

u/as_one_does May 09 '15

You're highlighting the difference in roles, I think. It's quite conceivable (though a little scary) that web developers don't get asked these questions because it's not relevant to their job; imagine a role where you make websites completely within the framework or Ruby on Rails . If you're they guy designing/writing a web-server or framework from the ground up you of course better be asked these sorts of questions.

For reference my experience has been like yours.