Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Businesses Programming

Ask Slashdot: Are Timed Coding Tests Valuable? 776

First time accepted submitter xkrebstarx writes "A buddy of mine recently applied to a large tech company. Before setting up a phone interview with him, the unnamed company issued a timed coding test to gauge his coding prowess. He was allotted 45 minutes to complete an undergraduate level coding assignment. I would like to ask the Slashdotters of the world if they find value in these speed-programming tests. Does coding quickly really indicate a better programmer? A better employee?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Are Timed Coding Tests Valuable?

Comments Filter:
  • by nedlohs ( 1335013 ) on Thursday January 10, 2013 @09:15AM (#42544625)

    You really think that would be for a senior engineer position?

    Unless it's an ungraduate assignment from a very specialized course it's going to be simple to do in less than 45 minutes. The only assignment I have done or set at an undergraduate level that wouldn't have been so was the "write a ray tracer" from a computer graphics course - and only because I don't remember the math off the top my head (it almost writes itself once you have that), I'd need to reread some stuff first.

    Is it going to "indicate a better programmer", No. Is it going to indicate a "better employee", No. It probably will weed a large number of the really bad programmers though. And sure it'll cull a few potentially good employees , that might be worth culling those really bad ones though.

  • Heck yes (Score:5, Informative)

    by dkleinsc ( 563838 ) on Thursday January 10, 2013 @09:28AM (#42544709) Homepage

    The basic rule of programming interviews is that you should demand that they actually program. It doesn't necessarily have to be a difficult problem: I've handed somebody a standard Fizzbuzz in an interview, and the competent candidates will solve it in 2-5 minutes, while the incompetent candidates won't solve it in 15 minutes.

    The reason this is necessary is that on paper, the incompetent candidates can look identical to the competent candidates.

  • Re:I dunno... (Score:5, Informative)

    by beelsebob ( 529313 ) on Thursday January 10, 2013 @09:38AM (#42544793)

    Well, you just failed for not googling...

    But, print all the numbers from 1 to 100, except rather than printing multiples of 3, print fizz, rather than printing multiples of 5, print buzz, and for multiples of both, print fizzbuzz.

  • Re:I dunno... (Score:5, Informative)

    by beelsebob ( 529313 ) on Thursday January 10, 2013 @09:45AM (#42544873)

    And yet, as stated above, surprisingly, 95% of job applicants fail, just like the AC above.

  • Re:Of course (Score:5, Informative)

    by buddyglass ( 925859 ) on Thursday January 10, 2013 @10:02AM (#42545017)
    I took one of these during an interview. They put me in a room w/ a computer my IDE of choice and had me do a project. The general gist was to build a program that read instructions from a file, parsed them, carried them out, then output the result at the end. The instructions all had to do with string manipulation. After I finished, they brought my code up on a projector and had four or five developers do a sort of code review, asking me why I chose to do various things in certain ways. So, not only did they test whether I could finish the project successfully, they got to see whether I can speak intelligently about design decisions and handle constructive criticism from other developers. Seemed like an extremely valuable exercise.
  • Re:Yes (Score:5, Informative)

    by SirGarlon ( 845873 ) on Thursday January 10, 2013 @10:06AM (#42545051)

    If the people performing the test are any good.

    This is a key point. I "failed" one of these interviews because my implementation updated the left-hand side of a loop condition, and the kid who was interviewing me didn't have the listening skills or mastery of basic algebra to understand that can be equivalent to updating the right-hand side.

    The take-away for me was, thank God I'm not working there with him as a colleague or, worse, a supervisor.

    This was at Google, where everyone thinks they're hot shit.

  • Re:I dunno... (Score:2, Informative)

    by Anonymous Coward on Thursday January 10, 2013 @10:38AM (#42545449)
    Should start with:

    But anyway I'd fail most of these programming tests :).
  • by jnelson4765 ( 845296 ) on Thursday January 10, 2013 @10:49AM (#42545601) Journal

    I've done one recently - it also tests memory and grace under pressure. Some people just can't perform well under the gun, and in a high-pressure workplace where you may be dealing with outages that are hitting the tech press within minutes, and the global press within an hour, being ale to not fold under pressure is a critical job skill.

    Plus, as my old business computing teacher in high school said, "You will be doing tasks that make no sense on obsolete technology for inscrutable reasons. If you have a problem with any of this, you should probably drop out of this class, since you do not have what it takes to be a programmer in the business world." Dealing with arbitrary requirements is part of working for any large company, and seeing if an applicant will go through with it, or if their ego is going to get in the way, is a useful test.

  • Re:I dunno... (Score:2, Informative)

    by rgbatduke ( 1231380 ) <rgb&phy,duke,edu> on Thursday January 10, 2013 @12:18PM (#42546807) Homepage

    Inelegant. You really only need three conditionals and no else. Fewer lines of code (including the terminating LF).

    for i in 1 to 100 loop

          if mod(i,3) == 0 then print 'fizz';
          if mod(i,5) == 0 then print 'buzz';
          if(mod(i,3) || mod(i,5)) print i;
          print '\n';

    end loop

  • Re:I dunno... (Score:4, Informative)

    by dward90 ( 1813520 ) on Thursday January 10, 2013 @02:33PM (#42548687)

    While you're absolutely correct that a fizzbuzz test is not a good way to determine if you *want* to hire someone, I think you're missing the point of these kind of exercises. It's purpose is to weed out candidates who are a complete waste of time. Trivially simple programming tests don't tell you if a person is a good developer. A passed test means basically nothing. However, a failed test means that to spend any time interviewing that candidate is a complete waste.

    Note that I'm talking about really simple stuff, with no real time limit and not caring about bullshit syntax (You forgot a semi-colon! Go home!). I would never expect an experienced developer to code out complex sorting or search algorithms from memory. Those tests, for sure, don't tell you anything.

I've noticed several design suggestions in your code.