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

6

u/Synovius May 09 '15

IT professional here who does web development for a living and tech screens candidates for our company.

Nobody will ever use questions like these. The questions that will be asked during technical interviews are about relevant experience to the technology and your ability to develop on it. That's it. You might get one logic question but questions like these tell you nothing about the ability of the candidate with the technology your company works with.

It's the same problem I have with colleges and universities who, during Computer Science undergraduate, pound you with abstract, flowery bullshit about binary search trees, sorting algorithms, performance calculation, and other somewhat useless information instead of actually teaching you to do real things and create real solutions.

6

u/RoboticElfJedi May 09 '15

The questions that will be asked during technical interviews are about relevant experience to the technology and your ability to develop on it.

In my experience hiring developers, you will get a lot of people with ok resumes and have been working ("working") at another company with the platforms you are looking for, who couldn't solve these problems. With hindsight, I should have used a few things like this for screening. Even "write a for loop that adds the integers from 1 to 10" would save a lot of time.

2

u/speedisavirus May 09 '15

"write a for loop that adds the integers from 1 to 10"

Had someone that couldn't do this. Despite my huge protest still hired and still the biggest shit stain on the team.

→ More replies (3)

9

u/[deleted] May 09 '15

Comp Sci undergrad here.

My guess is the reason as to why we're being force-fed all the "abstract, flowery bullshit" is because, at least as far as building code and software systems, that carries more weight than "can you work with technology x or code in language y," right?

Granted, being able to actually think on your feet and actually build solutions from the simplest algorithm to the most complex network of systems is the ultimate goal, the way you put it makes it sound rather...oversimplified, I guess. If it's simply "how long have you worked in environment x," couldn't every Tom, Dick, and Harry who's dabbled with it for a few years independently be in IT/software engineering/systems management to some capacity?

0

u/[deleted] May 09 '15

I'm sorry, but I agree with the guy you are replying to. I've handled hiring candidates before and I've had multiple applicants who I'm certain could handle any of the questions from the blog post or similar that were wholly unqualified and proved themselves to be useless as programmers after a simple "real world" code test.

So, I guess my point is this: Being able to solve this stuff absolutely carries less weight than being able to show or talk extensively about relevant technologies or languages.

2

u/Kaligraphic May 09 '15

I think the idea of this sort of this is more to test for complete illiteracy than real skills, which is why even a sysadmin like me can do them off the top of my head. 20 minute sidetrack on #4 aside.

1

u/[deleted] May 09 '15

The point in my reply is that his statement seems to almost throw knowledge out the window purely in favor of experience. While I'm certain that's not his intent, that's how it sounds.

Knowledge lets you solve a problem, experience tells you the best way to go about it. If the person's raw skill is lacking, it a red flag that tells you to really not even consider their candidacy for the position further. If they pass a basic skills test but clearly have little expertise with what a company specifically deals with, well, then they're equally SOL.

1

u/nemesit May 09 '15

I think it really depends on what you are actually developing, if you work with huge connected things like social networks you should really know a bit about graphs and efficient algorithms for the task at hand. If all you do is provide skins for databases (web dev) then you can probably disregard those things xD

8

u/Fenix42 May 09 '15

I live in a college town. I am also a dev. Even the interview for senior dev jobs at MAJOR companies (like Amazon) have these type of questions. Shit some have WRITTEN tests. Like you would get in class. X(

3

u/[deleted] May 09 '15

I was asked far more difficult questions for a junior role at Amazon. Please, don't act surprised by this just study and learn your principle concepts.

→ More replies (1)

1

u/cYzzie May 09 '15

well theres 2 types of interviews, one go by guts, you might as well roll a coin ... and the one do tets that are comparable between seperate candidates - which means you heave to actually write an actual test before givint it to a candidate.

regardless of arguing which one is better (there are a lot of studies on this) ... the 2nd kind of test is the only one that is "fair".

i still go by my guts - so far that went fine. i dont ask these kind of stupid questions, i just talk, and if i am unsure i invite candidates to a hackaton along with some people of my team, to see if they like working together.

1

u/Fenix42 May 09 '15

I would kill to get an hour interview like the ones you give. Here 4 hr interviews are the norm. 1 hr team fit, 3 x 1 hr coding section. :(

1

u/cYzzie May 09 '15

well honestly, i would do those kind of interviews you mentioned (cause - as i said - they are much fairer)

but here in berlin/germany there currently is a massive lack of both junior and good senior developers, 8 years ago when i tried to find an apprentice - i got 100 applications in a week, now i have to hire multiple agencies to find a suitable junior, and need headhunters who basically pry the coders out of the hands of our competitors :)

i havend hired a german coder for more than 3 years - they all left as it seems, most IT companies switched to working completly in english because of that :)

so in essence the reason for the kinds of interviews i am currently doing is, i already know that its a good candidate, i just look if he fits into the team and we like each other etc.

1

u/Fenix42 May 09 '15

How hard us it to immigrate to Germany? The market in the US, especially California, is brutal.

1

u/cYzzie May 09 '15

juding by the amounts of americans moving here i think its not that hard. at least if its likely you get a job here and thus the company will help you getting a work visa (which for the company mainly means confirming that they will hire you)

if you want details head over to /r/germany or /r/berlin i am sure there are quite some people who can share their story and tips.

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.

3

u/[deleted] May 09 '15

We're a .NET shop. We had one question for candidates for "Mid-Level .NET Developer" - we gave them a laptop with the screen projected on the overhead screen in the conference room and nothing open but a SQL connection string in notepad and the Visual Studio IDE.

The "problem" was: connect to the database and display, in either a Windows Forms or a Web Page, the data contained in the only table in the database. You can use Google or any resource on the internet. We will not hold your methodology against you, and in fact we like to see how resourceful you are.

We eliminated 7 of 10 candidates who could NOT perform this task.

1

u/[deleted] May 09 '15

Person who has had interviews here: people will and most certainly do use questions like these.