In my experience, although there are lots of different ways of assessing a developer’s technical ability (from verbal technical interviews, to logical and numerical tests to the dreaded “paper and pen” exercises) most technical interviews fall into broadly one of two schools of thought: either ask them to complete an exercise which requires solving a real-life business problem, or ask them to solve written-for-purpose puzzles by writing algorithms.
THE EXERCISE-BASED CAMP
The exercise-based camp always made sense to me, apart from the common trap that the hiring manager who writes the exercise basically writing a test that says “can you guess how I think” and then marking the result on how close they got to their own solution, it’s a clear indicator of what a programmer’s development skills might be on the job. Does it solve the challenge? Did they complete their solution? Does they solution make sense? Is it elegantly written in the development language of choice? Is it extendable / documented / follows TDD / etc etc? Naturally coding in the time sensitive, pressured environment of an interview doesn’t suit everyone, but it is unarguably a rock solid example of what the candidate can actually do.
THE ALGORITHM-BASED CAMP
And for years the algorithm test camp has puzzled me. Algorithms are often written in the main language that the job requires skills in (write your algorithm in Java if it’s a Java developer role), but sometimes answers can be written in pseudo-code and that’s just as acceptable – which seems counter-intuitive. Often when my candidates fail the algorithm writing part of the interview and are “no’ed”, they tell me that they were asked to write a kind of sorting algorithm that they hadn’t looked at since their university days (typical example is a Bubble Sort) and their mind goes blank. Which seems unfair.
A better gauge of your coding skills than anything you write in an IDE.
And I can’t help but wonder how easy it is to game algorithm-based technical tests. Many developers who are actively looking for a new position know they’ll come up against algorithmic challenges to complete during the interview process and I wonder to what extent you can simply train yourself to become “good” at solving the most commonly ask kinds of question. I know for a fact that I’ve seen some very good developers dismissed for developer jobs they were good fits for, completely out of hand after failing a algorithm test. And I’ve then seen the same developer go on to successfully complete algorithm based challenges and get job offers after having practised solving challenges at home. I personally recommend codility.com as a great preparation tool to the developers I work with.
It’s also very rare that writing algorithms from scratch will be a part of s developer position’s day job, so my candidates are being tested on a skills they don’t need to have to be able to do the job they’re going for.
So with so many pitfalls, I began to ask my candidates and hiring managers why algorithms are so highly valued as an interview tool.
ALGORITHMS ARE A RELIABLE TEST
The first thing I learnt is that it the ability to write an algorithm is considered one of the few reliable tests of how good a developer is (despite concerns about “gaming”). The field of study to be a competent Java developer (or C# developer or [insert chosen language here] developer etc) is so deep its hard to actually come up with a reliable, catch-all test that doesn’t take hours and hours, in the absence of a better model, algorithms are a tried, tested and trusted way of assessing how good someone’s core development skills are. When asked about “gaming” algorithm writing tests, I’m told that most tests these days can be gamed, and that its up to the hiring manager to keep the exercises fresh. Which doesn’t sound like an unreasonable requirement!
Ahhh, the old “merge-sort two step”
ALGORITHMS ARE TIMELESS
New algorithmic challenges can be written, but the principles by which they are solved still rely on the same set of fundamental skills, its just the style of implementation that changes (hence the willingness of some hiring managers to accept answers written in pseudo-code). On the basis that development languages change over time, and dexterity with the latest tool or framework will probably soon be made redundant, a test of someone’s ability to solve an algorithmic-based challenge is kind of timeless.
EACH ALGORITHM IS A MINI-PROGRAM
Each algorithm-based challenge is good all round mini-test requiring the candidate to demonstrate the core concepts of software development:
- Problem solving
- Structuring the solution
- Refactoring it
- Testing it
- Proving it
- Optimising it if necessary
They’re all key skills required to be able to “code”.
AN ALGORITHM CAN BE WRITTEN COMPARATIVELY QUICKLY
Its common for developers to be set 1 algorithmic puzzle per 15 minutes, with taking up to 30 minutes to complete not being considered an automatic rejection.
So there you have it, for as long as a more reliable, less time-intensive form of testing a candidate’s development skills is unforthcoming, the algorithm-based technical test will continue to form a common stage of a developer’s interview.