title: Is this interview question too hard for a php dev. job?
body: <p>We're looking for someone to help us enhance &amp; maintain our high-quality, php-based prototype of a transactional web app. Ideally, who can communicate well, and do both front- and back-end web development (as well as smart/gets things done, etc.). Among other more general things, I've been using this question:</p>
  
  <blockquote>
  Given this:
  
  <pre>
      $foo = array(1, 3, 7);
  </pre>
  
  write a function (on this whiteboard) to sum the values of the array.
  </blockquote>
  
  <p>It seems trivially easy to me, but has caused a couple of deer-in-the-headlights situations, which always makes me feel like a villain. </p>
  
  <p>I've read a number of posts here and there (including both Joel's and Jeff's) saying that how candidates think, design skills, passion, etc. are more important than any specific technical skill, and I agree with that. Also, I can see that programming at a whiteboard is a little unrealistic. OTOH, this seems so basic to me that I'm inclined to see it as a fine first-pass filter between front-end devs (who know their way around html, css, and how to copy-and-paste a js function or two), and people who can really code. Thoughts?</p>
  
  <p>A touch more info: I'm open to all sorts of answers: array_sum, a for loop, a foreach loop. Heck, if they want to write an ArraySum class, that would be overkill, but just fine. Using javascript, or another language would be fine, if they're more comfortable with that.  Even attempts with minor errors would be ok, but I've had a couple of complete freezes, so I just wanted to sanity check myself.</p>