Inklings: a tumblelog


Restkit is an HTTP resource kit for Python. It allows you to easily access to HTTP resource and build objects around it. It’s the base of couchdbkit a Python CouchDB framework.

Interesting. Not much use to me currently, but definitely interesting.

I wish programmers could program

This post could also be called “Why I find pre-screening job applicants with simple puzzles depressing”.

We’ve an opening for a developer at work, so to weed out the chancers[^1], we ask applicants to solve a very simple programming exercise in the language of their choice and later submit it to us.

One of those programming exercises amounts to FizzBuzz, but rather than printing stuff you, they’re asked to sum the numbers. There are two main ways to do this: one is the obvious brute force way and the other is the more elegant mathematical way that solves the problem in constant time and involves realising that the problem is basically the sum of two arithmetic series less a third arithmetic series[^2]. While I doubt anybody will cop the latter solution, all I’m expecting is the people supply the obvious brute-force solution to the problem as it demonstrates they know at least the basics of how to program.

Keep in mind that I’m not being especially picky about this. All I’m looking for is that the algorithm be correct and not obviously plagiarised.

The results so far have not been encouraging.

While we haven’t got anything so far that looked like plagiarism (such is the joy of simple puzzles), the many of applicants are fleeing at the idea of having to solve the puzzle, we had one guy who claimed to have done Linux kernel development (though not as a project contributor) who claimed the problem was “too difficult” (yes, his words) and another who didn’t even check their solution was correct though the algorithm itself was correctly implemented.

So far we’ve had only one correct solution. That guy is at least getting an interview.

What’s depressing about this is how effective it’s been. This is a problem that can be solved by brute force in Python in one line of code. Yes, one line. It’s something any barely competent developer ought to be able to write without even thinking and yet, even having been given the problem to do at their own convenience with no time pressure whatsoever[^3], the shoddiness of what we’re getting is astounding.

One of the problems I intended to pose was parsing a comma-separated list of numbers and range specifications. That’s hardly rocket science, but right now, I’m thinking that would’ve been akin to not advertising the job at all.

Another thing we do is ask for samples of the individual’s work. The idea here is just to get a feel for the kind of code the developer would typically write. A whole portfolio of work samples isn’t expected[^4], just a few code samples that show you can write something non-trivial. Let me say this once: providing us we some mostly IDE-generated code that you’ve plugged some bits of logic into is not acceptable. You didn’t right that, the IDE did. It’s a matter of proportion: IDE-generated code isn’t a bad thing, but we’re not looking to employ the IDE, we’re looking to employ you.

Moreover, when you submit sample code like this, you’re looking to put your best foot forward. Submitting sample code that looks like a pile of cut-and-pasted crap isn’t going to make a positive impression, it’s just going to make it look like you don’t care. It’s like walking into an interview with fresh stains down the front of your clothes. 90% of software development is maintenance, and given someday I might have to maintain your code, I’m not going to be encouraged if I see a bunch of near-identical conditional expressions repeated in a chunk of code unless it’s accompanied by a comment explaining why the loop that ought to have been there was unrolled. For somebody applying for a junior role, this is easily overlooked, but not so easily for a senior role.

Am I asking for too much here?

[^1]: Here in Ireland, a chancer is somebody who’s unable to do something, whether through lack of aptitude or just pure ineptitude, and yet attempts it anyway. It connotations are generally negative or, at best, humourous.

[^2]: Hint: the series is Sn = (n2 + n) / 2, i.e., the sum of numbers between 1 and n inclusive.

[^3]: It is, after all, a screening exercise so that we can avoid interviewing morons who interview well. It’d be better to leave the position unfilled than hire deadweight.

[^4]: But if you can point us at one or more code repos online, I will be very tempted to bring you out for beer after the interview. :-)

GNOME 3.0 and 3.1 Shell Extensions