[LRUG] Code samples: To do or not to do

Paul Battley pbattley at gmail.com
Tue Apr 7 03:11:16 PDT 2009


2009/4/7 Vahagn Hayrapetyan <vahagnh at gmail.com>:
> See, for the past couple of months I have been trying to get my CV across to
> various UK recruiters. One thing those peeps have had in common is that they
> almost all without exception would have liked to see some code samples by
> yours truly.

I think it's common for employers to want to see some evidence of
programming ability. However, there's a big difference between that
and 'just send me two or three lines'. I doubt recruiters would be
able to judge the code, although they may simply be asking for it in
order to pass it on to the employer. Even so, I don't see it being
much use to anyone.

> Now this comparison may seem a little over-stretched, but isn't the
> situation similar to ours? We programmers cook up recipes / dishes (in
> software) using the tools and ingredients (programming) that we learned.
> Somebody, when they come in, have to decide whether or not they like the
> menu. If they do, they place an order. If they don't, they leave.

In this analogy, the employer isn't the diner, it's the restauranteur.
If you are running a restaurant, your reputation depends on the skill
of your chefs.

I can't imagine employing a programmer whose code I hadn't seen. Or,
for that matter, a chef whose food I hadn't tasted; a designer whose
portfolio I hadn't viewed; a journalist whose prose I hadn't read; a
tattooist whose work I hadn't seen; ... you get the point.

There are elements both of skill and of aesthetic sensibility to
programming, and seeing someone's code is the best way to judge that.
I personally wouldn't be employing a programmer without a proven
record of being able to program. I'd be less worried about someone
being new to Ruby, though.

At Reevoo, we give candidates a programming exercise to complete, and
talk about their solution in the interview. It's more of a practical
task than an abstract one, and it works pretty well.

> In commercial situations, if a company wants to test you they give a
> challenge. A challenge is a coding task that involves a more or less
> abstract CompSci topic, and its hands-on implementation in a PL of choice.
> (And I am happy to say that both times I had to solve one, I did well. The
> first one was about recursive data structures and involved a cascading
> top-down parser technique; the second was about using a hash table to go
> from a list to a set. But I digress).

That's interesting, academic ... but I'm not sure it's that useful to
me if I'm trying to choose someone to hire. The ability to write
readable, maintainable, correctly-functioning programs is what I'm
looking for. To return to the chef analogy, it's the meal, not the
sauce béchamel. I don't care if the programmer uses someone else's
parser library. In fact, I encourage it. I don't expect the chef to
dice his own shallots, either.

If you have some good open source contributions, it's going to help,
but I wouldn't say it's essential. I know plenty of skilled
programmers who don't have huge public profiles, and some of them are
much better coders than the garlanded heroes of the Ruby on Rails
world.

Personally, though, I think attending LRUG and staying for the pub
afterwards is a far better way of finding a Ruby job in London than
sending your CV to a random recruiter. With or without a code sample.

Paul.



More information about the Chat mailing list