Live data from Hacker News

Ask HN: coding challenges as part of interviews: yes or no?

news.ycombinator.com

41–50 of 58 posts

Re: Ask HN: coding challenges as part of interviews: yes or no?

#41
I also worked for a company once who had several enthousiastic , seemingly bright people with somewhat limited experience come in for interviews, but they didn't make the cut because they didn't pass some coding challenges. The guy who did get hired went to a good school and was a good coder, but was way too arrogant, difficult to work with and repeatedly refused to do what his manager asked him to work on. And how did that guy interview other candidates? He screened them by their education, and when they would come in he would give them one programming challenge without asking any other questions. Nobody seemed to realize that there were big problems with the company's hiring strategies and that developers themselves were largely to blame for that.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#42
I've always found that asking a reasonable numerical solving question where you can easily figure out the answer in your head is a good starting point to gauge programming/algorithm ability. If someone knows the solution they are trying to get at, they can focus on the program itself, as opposed to worrying about solving the problem and coming up with the algorithm. Ideally there are a few ways to solve the problem, brute-force methods or more efficient ways. It can be very difficult to test a programmer's ability in an interview, you need to focus more on seeing how the candidate thinks, how they approach problems, and whether they can admit when they do not know something.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#43
I use a simple coding challenge as a weeder question. It requires basic use of recursion (without explicitly saying so) -- no math, no big-O, no gotchas, just writing a simple recursive function to process a small tree. It takes decent coders a few minutes to complete. Less-than-decent coders really struggle with it.

This is only a wheat/chaff separator, though. If possible, I like to see code from actual projects they've worked on to get a feel for the bigger picture (tip: open source your personal projects and obsess a bit over the code, so you have something to show off). Plus there's all the other non-code aspects to the interview.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#44
post #39

I like to believe that I can get a pretty good understanding of someone's technical abilities by asking thorough questions about his previous experience, and maybe ask them to explain a couple of basic patterns or programming concepts to me. I remember interviewing a senior java developer who claimed 5+ years of experience and had no idea what a Singleton was. What made it worse was that even after explaining it to h…

> Would you rule out a candidate who doesn't know 0xFE ?

If they didn't know it after a moment's thought, I'd cut them some slack; If they couldn't calculate it, with pencil and paper, in 10 minutes (and that's giving them plenty of extra time for interview-nervousness), then I'd be seriously concerned.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#45
This reminds me of a group of main frame programmers I knew who had been forced to become Perl web developers. About a month later they were asked to hire another Perl programmer and one of their interview questions was what's the difference between 'chomp' and 'chop' (chomp removes the final character of a string if it's a newline, chop does it regardless).

They were shocked that the interviewee didn't know the answer because they considered it basic knowledge, "it's in the first chapter for gosh sake." The first chapter in this case covered differences between Perl 4 and Perl 5.

In Perl 5, nobody uses 'chop', they all use 'chomp.' Many experienced Perl programmers might even have forgotten that 'chop' existed.

And that's my major problem with gotcha questions, they tend to be pretty far from measuring if a person can actually write productive code.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#46
Writing code is artwork. You can ask the artist about the specifics of his tools, but you will never grasp his artistic ability until you see the completed artwork. I just ask some general questions about the tools. The tools for code writing are: starting, constants, variables, addressing, comparing, branching and ending.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#47
post #12

Earlier quoted context omitted.

Some questions do let you guage how the person responds to stress and unknown environments - that may be helpful.

Good point. Have you seen Swordfish? You can also evaluate how they respond to modern management practices.

Haha yep. I like that movie no matter how ridiculous it is. Some of the motivational techniques in that movie would work wonders.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#48
I think it depends on the position and responsibilities the person will have once hired. If the programmer will be coding directly from specs without any room for "interpretation" then a coding challenge may be very applicable. If you are looking for a programmer that also understands your business and will be required to make decisions and think on their feet, the value of a coding challenge diminishes.

It also depends on the time frame of the position. If you are looking to hire a programmer on a per project basis, then a solid understanding of the development language is critical. However, if you are hiring an developer for the long term, it's better to hire a smart and agile person that can contribute to the overall business as well -- which is hard to measure from a coding challenge.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#49
They're a necessity. For the simple reason that too many people lie on their CV, no matter how good their CV looks you have no-idea how much of it is accurate.

Obviously there are cases where you wouldn't use it, but generally they only apply when you know someone's capable of coding anyway (i.e. due to an indisputable reputation, experience working with them, etc.).

However as a predictive measure it's fairly limited in that it's a binary indicator. If someone fails then there's a fair chance they're a terrible developer, if someone passes there's a fair chance they're not a terrible developer.

Re: Ask HN: coding challenges as part of interviews: yes or no?

#50
post #9

Earlier quoted context omitted.

You know the syntax of switch in the language you have been using in the last three months. If you don't, something's wrong!

I never use Ruby's case or switch or whatever-it's-called. I could make up some mumbo-jumbo about case being a code smell and that it should actually be refactored to a method dispatch over polymorphic objects, but the truth is that I have no idea why I don't write case statements, I just don't.

Add me to the "never uses switch statements" list. I've never seen the point in learning the syntax in any of the languages I know, since a bunch of else ifs (or elseifs, or elsifs, or elifs, depending on the language) does the same thing. If I waste a few keystrokes, but save a few brain cells, I think it's a worthwhile bargain.

Of course if I had to write that kind of construction often I'd probably learn the syntax of the case statement, but in the kind of work I do it hardly ever actually comes up.

Post reply on HN