Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 202111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:15:30+00:00 2026-05-11T17:15:30+00:00

We’re looking for someone to help us enhance & maintain our high-quality, php-based prototype

  • 0

We’re looking for someone to help us enhance & 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:

Given this:

    $foo = array(1, 3, 7);

write a function (on this whiteboard) to sum the values of the array.

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.

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?

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:15:31+00:00Added an answer on May 11, 2026 at 5:15 pm

    in my opinion, the question is perfectly valid, and tells a bit (not a lot, but an important bit) about the candidate, depending on how much time you invest in it. just tell her that it’s not a trick question beforehand, that it’s really, really as simple as it appears, so she doesn’t spend to much time thinking about the pitfalls and to minimize the deer-situation. throw in you do that just as a measure to filter out the people who apply for a programming without actually knowing anything about it but hoping they get hired anyway by pure luck (if they know how to code but are just nervous, that should take a bit of pressure away). let them code, but don’t focus if there is a $ missing or if the <?php tags are present or not.

    if she provides array_sum or sum_array as an answer almost doesn’t matter, especially if the language in question is php (but if two candidates are equal otherwise … i can’t even remember the last time i had to use this function). and the use of an auto-completion and syntax-coloring (with predefined keywords) IDE vs. a dumb text editor matters a lot in this hindsight. in this case ask for an alternate, handcrafted solution.

    if i was in the position of asking that question i wouldn’t ask for the right solution, i’d ask for ways that come to her mind how this problem could be solved, what pitfalls could arise in special cases. try to find out what she knows about programming, not what she knows about php. try to find out about intelligence, problem solving and creativity. altought experience matters a lot even when it comes to bang out code fast, it’s not a constant.

    the solutions i’d provide, the pros/cons and what it tells about me …

    • built-in array_sum (very fast and definitley not buggy, but inflexible): i have a bit of experience with traditional php projects

    • for/loop constructs (good enough, reinventing the wheel. but can be used if there are different objects than numbers. pros: everybody will understand it): i can solve simple problems if there are no predefined copy&pasteable solutions

    • array_reduce (with an offering to implementat array_reduce, if the interviewer wants to see it): unusual for a php programmer, so it seems i have knowledge and experience outside of the php sandbox

    • an ArraySum-Object (with an ArraySum::add($value) method that keeps all values stored but caches the sum): i’m used to at least some of the oop-principles

    • function () { return 11; } (with the disclaimer that this is a joke solution, but valid): i have (albeit crude) programmer-specific humour – a sign i’m personally interested in programming outside of work … some interviewers who are programmers (but not hackers) might interpret this as a willingness to use dirty hacks as placeholders (aehm) if time constraints are too tight

    • a recursive solution would be nice. i can probably solve a bit more complex, algorithily problems too and most likley know my way around simple trees and data structures

    • recursive divide and conquer: bonus! i know even more about algorithms.

    try to get as much as possible out of this question (if time permits). in the end you’ll know a little bit about programming capability and a lot about experience (altought not necessarily PHP specific).

    i’d choose this question over letting the candidate write out quicksort – a very specific question about knowledge almost never needed in the web dev world – any time.

    disclaimer

    the question is useless when …

    • the interviewer is not a programmer. forget it if a hr-guy is doing it
    • there’s a very tight time constraint when interviewing. then the result is almost random anyway.

    additionally, who are you looking for? if you need a cheap grunt coder, even a simple question like this should work. if you need quality and experience, don’t waste too much time on it (but do it anyway).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 173k
  • Answers 173k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer With Notepad++, you can show end-of-line characters. It shows CR… May 12, 2026 at 2:36 pm
  • Editorial Team
    Editorial Team added an answer You'll want to use the CompareValidator for that and since… May 12, 2026 at 2:36 pm
  • Editorial Team
    Editorial Team added an answer Your first problem is calling DataBind on a control you… May 12, 2026 at 2:36 pm

Related Questions

We are developing a little application that given a directory with PDF files creates
We have been using CruiseControl for quite a while with NUnit and NAnt. For
We have a requirement in project to store all the revisions(Change History) for the
We have a remoting singleton server running in a separate windows service (let's call
We have an SVN repository running on a Windows server, and I want to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.