I feel that asking candidates negative questions gives you a better idea of a programmers aptitude than asking positive questions. Asking a candidate to give an example of a problem they couldn't solve, what they attempted when trying to solve it, and why they couldn't solve it, gives you an idea of their problem solving process and a real sense their upper limit of ability. Any candidate can gas themselves up and cherrypick some impressive achievements, or provide a laundry list of tools they have "experience" with.
Rejecting candidates based on their response to those types of questions is completely counter-productive. You'll just end up with a bunch of employees who are either liars, or very good at delegating blame. You want employees who take ownership of their work and assigned tasks.
As for programming tasks/questions in interviews. I think that it's important to test applicants' practical knowledge of sorting and other enumerable operations as it's a common task that's often done wrong, often with significant performance impacts. However, requiring a candidate to re-implement a common sorting algorithm for an array of numbers does nothing but stroke the interviewer's ego. The last time I actually had to write a sorting algorithm from scratch was in a 200-level computer science paper.
An actually sane interview question/task would be to ask the candidate to sort an array by an unconventional comparison, using a language's standard sorting functionality.
For example: sorting an array of coordinates by their absolute distance from (0, 0), or sorting an array of RGB colours by intensity. They're problems that a programmer would realistically encounter in a real-life application, and test that the candidate actually understands how to manipulate non-trivial enumerable/comparable data.
Asking candidates to implement quicksort selects for applicants who have a case of Not-Invented-Here Syndrome. You don't want to hire programmers who implement their own sorting algorithms from scratch, there's a >90% chances they'll implement it worse than the language's standard implementation, while wasting a bunch of time that could be spent solving actual business problems, and creating technical debt to boot.
Rejecting candidates based on their response to those types of questions is completely counter-productive. You'll just end up with a bunch of employees who are either liars, or very good at delegating blame. You want employees who take ownership of their work and assigned tasks.
As for programming tasks/questions in interviews. I think that it's important to test applicants' practical knowledge of sorting and other enumerable operations as it's a common task that's often done wrong, often with significant performance impacts. However, requiring a candidate to re-implement a common sorting algorithm for an array of numbers does nothing but stroke the interviewer's ego. The last time I actually had to write a sorting algorithm from scratch was in a 200-level computer science paper.
An actually sane interview question/task would be to ask the candidate to sort an array by an unconventional comparison, using a language's standard sorting functionality.
For example: sorting an array of coordinates by their absolute distance from (0, 0), or sorting an array of RGB colours by intensity. They're problems that a programmer would realistically encounter in a real-life application, and test that the candidate actually understands how to manipulate non-trivial enumerable/comparable data.
Asking candidates to implement quicksort selects for applicants who have a case of Not-Invented-Here Syndrome. You don't want to hire programmers who implement their own sorting algorithms from scratch, there's a >90% chances they'll implement it worse than the language's standard implementation, while wasting a bunch of time that could be spent solving actual business problems, and creating technical debt to boot.