News for hackers. Stuff that matters.
Re:Ask HN: coding challenges as part of interviews: yes or no? by ericb on Thursday May 29, 2008 @12:43PM (#203403)
Hmm... I know > 10 languages. I'm not sure I could remember the exact syntax in several of those languages on the spot. Is it case, is it switch, etc. If you do this, your test is on rote memorization.

Give them a novel problem and have them solve it with a real computer and in tact syntax lookup. Then see what and how they did it and go over their reasoning. I'll hire the guy with the wisdom over the guy who can spit out syntax trivia flawlessly. Those are different skill-sets that do not predict each other.

Re:Ask HN: coding challenges as part of interviews: yes or no? by astrec on Thursday May 29, 2008 @12:52PM (#203418)
Agreed. My first job they gave me a copy of Deitel & Deitel's "C How to program" along with the test. You actually lost points if you didn't open it!
Re:Ask HN: coding challenges as part of interviews: yes or no? by ntoshev on Thursday May 29, 2008 @12:57PM (#203421)
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!
Re:Ask HN: coding challenges as part of interviews: yes or no? by raganwald on Thursday May 29, 2008 @01:58PM (#203477)
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.

Re:Ask HN: coding challenges as part of interviews: yes or no? by hugh on Thursday May 29, 2008 @05:37PM (#203741)
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.

Re:Ask HN: coding challenges as part of interviews: yes or no? by etal on Thursday May 29, 2008 @08:32PM (#203892)
It's really just a performance optimization for C, in situations where the switching value can be hashed. In languages that make method dispatch easy, and the overhead of a function call is not something you're terribly concerned about, it makes sense to just roll your own as needed -- that's why Python never bothered with a switch statement.
Re:Ask HN: coding challenges as part of interviews: yes or no? by stcredzero on Thursday May 29, 2008 @02:58PM (#203580)
Actually, if you never use switch, then that's a symptom of being good at OO.
Re:Ask HN: coding challenges as part of interviews: yes or no? by astrec on Thursday May 29, 2008 @01:07PM (#203429)
Sure, but we're talking about testing ability vs. memory - switch is incidental.
Re:Ask HN: coding challenges as part of interviews: yes or no? by ntoshev on Thursday May 29, 2008 @01:41PM (#203459)
Ability requires memory, at least for basic things.

You can't be a good programmer and forget the syntax of the language you are working in. If you need to look up something as fundamental as switch statement in the internet, it's like a writer looking up words in the dictionary before writing them down in his novel.

Re:Ask HN: coding challenges as part of interviews: yes or no? by jonknee on Thursday May 29, 2008 @02:03PM (#203482)
Writers very frequently use the dictionary. There is no problem with it, that's why we have dictionaries.
Re:Ask HN: coding challenges as part of interviews: yes or no? by eru on Thursday May 29, 2008 @02:35PM (#203527)
Not for scrabble disputes?
Re:Ask HN: coding challenges as part of interviews: yes or no? by jcromartie on Thursday May 29, 2008 @01:47PM (#203464)
I think switch is a particularly bad example here. Honestly, I can't (accurately) tell you the last time I used one. It's not an every-day construct for a lot of people.
Re:Ask HN: coding challenges as part of interviews: yes or no? by eru on Thursday May 29, 2008 @02:36PM (#203529)
Neither Python nor Haskell have it - as far as I know. Perhaps you can create one out of monads though.
Re:Ask HN: coding challenges as part of interviews: yes or no? by lsb on Thursday May 29, 2008 @02:46PM (#203540)
Actually, case is built into Haskell: it's the evaluation primitive in Haskell Core; see Don Stewart's blog post http://cgi.cse.unsw.edu.au/~dons/blog/2008/05/16 .
Re:Ask HN: coding challenges as part of interviews: yes or no? by eru on Friday May 30, 2008 @06:56AM (#204222)
Yes, there it is. Sorry, I did not research my claim.

Actually pattern matching can also be described as something like a case-switch.

Re:Ask HN: coding challenges as part of interviews: yes or no? by sanswork on Thursday May 29, 2008 @01:43PM (#203461)
If you don't know the basic features of a language you don't know that language anymore. You maybe once knew it really well, and you still know the general syntax, but you aren't a insert language programmer anymore.

I do agree though that testing specific language skills is mostly pointless. The only time I've been given a programming test as part of an interview I was given a basic language spec that filled a couple pages then a book of problems to solve in the new language. Thats the way you should test programming skill in my opinion.

Re:Ask HN: coding challenges as part of interviews: yes or no? by TFrancis on Thursday May 29, 2008 @01:48PM (#203467)
I don't think that I would ever hire a insert language programmer. When looking for someone to program, I'm just looking for a programmer; language isn't important.
Re:Ask HN: coding challenges as part of interviews: yes or no? by sanswork on Thursday May 29, 2008 @01:50PM (#203469)
A lot of people get hired in for emergencies. In such cases waiting for person to learn your offices language of choice isn't ideal.
Re:Ask HN: coding challenges as part of interviews: yes or no? by TFrancis on Friday May 30, 2008 @08:14AM (#204261)
Though they aren't always possible to avoid, I consider "emergencies" examples of poor business decisions and try to avoid them.
Re:Ask HN: coding challenges as part of interviews: yes or no? by Xichekolas on Thursday June 12, 2008 @10:26PM (#216476)
While I can see some merit in this argument, I'd also point out that I've never met a decent programmer that can't pick up a new language at least passingly in a day or two.