As part of the hiring process with my current job, after reviewing a candidates resume and having a brief phone call, we give a short coding challenge by email.   The candidate is to complete it and send back their work as a last check before we’ll decide to have them in for an interview.   There is no real time limit, other than, get it back to us quick so we can have you in to talk!

Our challenge was something I ripped from our own code base… a problem I was faced with, and solved in a couple hours.  Something a little challenging, but not rocket science.
Along with a description of the problem we want solved, I’m providing thirteen different test cases, along with correct answers.

My boss got to talking to me about it the other day, and I let slip some interesting tidbits that caught him off guard.

When I get a response from a candidate, I never actually run the code.

It’s mainly a litmus test for me to gauge the candidate.  I’m looking at several things.

First, were they able to read and understand the problem fully?   Some people seem to rush in to it, and completely misunderstand what is being asked of them.

Second, how have they structured their submission?   We’ve had everything from a small function sent inline with an email, all the way to giant git projects with what seemed like hundreds of files, composer dependencies, etc.   I’m looking for somewhere in the middle.  It shows a level of care.

Third. I’m looking at their coding style.  Do we have comments?  PHPDoc style?  Or just simple inliners?  Are they using any fancy coding tricks that take me a minute to understand?  Or maybe the opposite, using some extremely outdated things I wouldn’t allow in my own code base?   Then, the raw formatting.   I’m looking for consistency in variable naming, and spacing.

function myFunction($variable_one = false, $vARIABLE2=”testing”){

If I see anything like above, I’ll stop right there.  Switching from camelCase to underscore_naming, inconsistent spacing around the equal signs, etc.  All on the same line.  I seriously freak out when I see that.

The last thing I want to see, given we have the candidate in for an interview, is some feedback on our challenge.  I’d be perfectly happy if someone admitted they didn’t understand it, or was confused by certain bits.  Asking questions, being willing to request clarification… these are traits I want in a team mate.   Again, I’m not running the code at all.

Now to the subject of this post… time management.   The coding challenge I use, isn’t designed to take up a lot of the candidates valuable time.  Having solved the issue myself, I remember it taking me about an hour, maybe two.  The majority of that time was spent thinking and planning through the logic of it… not raw typing.   As is often the case with good code.  90% planning, 10% typing.

Anyway, we had a candidate in the other day who was extremely eager to show off the challenge result he put together.  He started by mentioning that he spent almost seven hours working on it, before calling it quits…   Phew… I was bracing myself for a giant overkill of a project.

He opens up a webpage that he set up, where he had put together some fancy html and jquery plugins (yes jquery), that layed out the exact problem text we sent him, along with all the test cases.   It was definitely pretty.   With great enthusiasm he starts showing me around the code for the web page… how he’s used this jquery bit and that, how when he clicks this, that happens…  the database connection routine (a mysqli_connect() wrapped in a function), he admitted he borrowed from his current jobs codebase… and so on.

He went on to explain that we had errors in a few of our test cases, and how he smartly worked around them… or WOULD HAVE.  You see, the seven hours he put in, putting together this super fancy, albeit horrible old school, demo page, took that whole time!  He called it quits before even tackling the actual challenge.

“This is where the challenge solution would have gone”, he showed me.

A blank function with a comment in it..  # challenge here.

Honestly I didn’t know what to say!  Twenty minutes he’s walking me through all this code he didn’t write, pieced together rather haphazardly, that for some reason necessitated a database connection, and using the PHP exec() call.

So it becomes apparent how time management skills would have helped here.

Had this candidate started by putting together a solution for challenge, and then moved on to fancying things up, I might have had something to look at.  He was so busy trying to impress, he missed the mark.  No candidate has ever insisted I look at their code during the interview… with such enthusiasm as this one… who didn’t even have what we asked for.

 

Time management… being able to intelligently prioritize; these are critical skills for virtually every development position I’ve seen.  Yet they are skills all too easily forgotten when you’re going through an interview process for a new job!   Don’t make that mistake!

Advertisements