Fortsätt till huvudinnehåll

Should you test developers before hiring them?

I have been shifting back and forth on the question if it is a good idea to let developers do some kind of coding test before hiring them. After careful consideration I have come to the following conclusions:

  1. Yes! You should test the developers coding skills somehow.
  2. The test should be performed in a real environment, using real tools. Not on a whiteboard or by using some online web page.
  3. Invite the applicant to take the test at your office. Sit together for a while and help him get started but also give him the chance to sit on his own for a while.
  4. The test must be relevant to the kind of job he is applying for.
  5. One of the most important aspects is the ability to write extendible and maintainable code. This is very very important.
So here comes the rationale:
  1. The number of years of experience stated on a paper DOES NOT SAY ANYTHING when it comes to telling how good a developer is. I have worked with people directly from the University that produce great code that is well tested, easy to understand, easy to maintain and is easy extendible. I have also worked with developers who has more than 15 years "relevant" experience that produce crap. Their code compiles and runs but it is almost impossible for someone else to understand, contains functions that spans over hundereds of lines of code, complete source files that are just duplicated over and over, breaks things you would have never expected on any minor change, and the list goes on. It is a shame these developers sometimes get paid more than twice the amount of the "junior" developer.
  2. A whiteboard test is inferior to doing some actual coding. You wan't to evaluate how the applicant uses his tools, his development tools. Whiteboards are good for drawing stuff on, not writing code.
  3. You wan't to be sure that the guy who takes the test is the guy you are considering hiring. I read some time a ago that it is actually possible, at least in India, to hire someone to take programming tests for you, they even do phone interviews.
  4. I should not need to explain why the test should be relevant. And to be clear, algorithm tests bought from Codility and similar companies are very rarely relevant. When was the last time you had to solve the knapsack problem at work?
  5. Code can not just work. A good developer knows that working code is just the first step. Next you need to make it right (i.e. well designed).
Now that you know that the number of years of "relevant" experience written on a paper actually is irrelivant. Stop putting these "requirements" in your job ads as well ;).

Kommentarer

  1. Jag håller med!
    Hur gör man då ett relevant test på en intervju. Man har kanske 30 min på sig, då hinner ju inte koden bli så invecklad att man ser hur personen skriver sina funktioner (100 rader kod...). Eller är det tillräckligt med tid för att inse vartåt det barkar?
    Man kanske kan ha förberett ett skal som ska fyllas på med funktionalitet, och även funktioner som borde refaktoreras om man lägger till funktionalitet, så kommer man lite längre på kort tid. Fast man kanske påverkar individen med hur den befintliga koden är skriven. Eller hur tänker du?

    SvaraRadera
    Svar
    1. En halvtimme tycker jag är alldeles för kort tid. Jag har gjort några programmeringstest själv under åren, av varierande kvalité. Det kortaste var 80 minuter (2x40 min) och följdes av en halvtimmes genomgång. Det längsta hela fem timmar. Visst kan det ses som ganska mycket tid, men samtidigt tycker jag att det ger en bra möjlighet att få en inblick i vad företaget använder för verktyg och vad de värdesätter hos utvecklarna. Plus att det varit väldigt lärorikt.

      Jag tycker att ett bra upplägg kan vara att man förberett en uppgift där lite kod finns men som behöver kompletteras. Den önskade funktionaliteten kan vara löst nedskriven i ett dokument. Det är fritt för utvecklaren att skapa nya filer och namnge nya funktioner och variabler. Man kan gärna hinta åt att ett visst välkänt mönster eller upplägg skulle passa bra. Första halvtimmen kan man sitta tillsammans och förklara eventuella frågetecken, sedan kan man låta den sökande få sitta på egen hand och koda en timme eller så för att sedan gå igenom resultatet tillsammans. På den tiden borde man hinna märka ganska tydligt om någon vikt läggs på att komma på bra namn på variabler och funktioner och om det finns ett bra strukturtänk.

      Radera
    2. Ditt upplägg låter som en bra variant! Ska lägga den på minnet :)

      När du gjort dessa tester, när i processen har det varit. Jag känner spontant att jag inte skulle ställa upp på 5h test på en intervju, plus 2h intervju kanske. Det blir ju en hel arbetsdag. Om det inte var så att det är ett grymt spännande jobb och att jag är kvar bland ett fåtal sökande. Fast arbetsgivaren skulle väl inte heller lägga så mycket tid om det inte var relevant.

      Radera

Skicka en kommentar

Populära inlägg i den här bloggen

C# Enum as bit field

Bit field enum Whenever you wish to express combinations of properties of an object, bit fields are a good way to accomplish this. As a simple example, consider a file in the file system. It can be Readable , Writable , Hidden or a combination these. The different attributes can be defined as an enum : [Flags] public enum FileAttribute {   None      = 0b0000;   Readable  = 0b0001;   Writeable = 0b0010;   Hidden    = 0b0100; } To indicate that this enum is expected to be used as a bit field I have defined it with the FlagsAttribute . It is important to understand that the FlagsAttribute does nothing more than making some changes to how the ToString method of the enum works, making it possible to print out all flags. It does not introduce any validation or special treatment of the enum in any other way. I have defined the values of the different fields of the enum using binary representation, this should make it even more clear that this is a bit field and which bi

Codility tasks - Part I

I was recently faced with two codility tasks when applying for a job as an Embedded Software Engineer. For those of you who arn't familiar with Codility you can check out their website here:  www.codility.com Task one - Dominator The first task was called Dominator. The goal was to, given a std::vector of integers, find an integer that occurs in more than half of the positions in the vector. If no dominator was found -1 should be returned. My approach was to loop through the vector from the first to the last element, using a std::map to count the number of occurences of each integer. If the count ever reached above half the size of the vector I stopped and returned that integer and if I reached the end without finding a dominator I returned -1. So was that a good approach? Well, the reviewer at the company rated the solution as 'pretty ok'. His preferred solution was store the first integer in the array and set a counter to 1. Then loop through the remaining i