By Daniel Whitmore, MSc in Industrial and Organizational Psychology
In short
A work sample for a software engineer is strongest when it hands the candidate a small existing codebase and asks them to do what the job actually requires: locate a defect, make a contained fix, and explain the trade-off they chose. This samples code comprehension, debugging and judgement under existing constraints, which is where most engineering time goes, rather than algorithm invention under time pressure. It also resists AI assistance better than a blank-page exercise, because the reasoning about an unfamiliar system is the part a generated answer cannot supply.
Ask an engineer how they spent last week and the answer is rarely "designing an algorithm". It is reading code, working out why something behaves unexpectedly, making a change that does not break three other things, and explaining the change to a colleague.
The standard screen samples none of that. It samples the ability to produce a known algorithm quickly from memory, which correlates with having recently practised producing known algorithms quickly.
What the job is made of
Break the role down the way you would any other and the components are unglamorous:
- reading unfamiliar code and forming an accurate model of what it does
- locating the cause of a behaviour that was not intended
- making a contained change, with awareness of what it touches
- choosing between a quick fix and a correct one, and saying which you chose
- communicating a change so a reviewer can evaluate it
- recognising what is missing — the untested case, the unhandled error
Notice that only one of those involves writing much code. That is the design insight the blank-page exercise misses.
The task
Give the candidate a repository of a few hundred lines — small enough to read in fifteen minutes, large enough to be genuinely unfamiliar — with a stated bug report from a user.
The brief: find the cause, fix it, and write a short note explaining what was wrong, what you changed, and what you would do differently with more time.
Three design choices make this work.
The bug has more than one plausible cause. A candidate who investigates finds the real one. A candidate who pattern-matches on the symptom fixes something adjacent. This distinction is the single most informative thing the task produces.
The codebase contains a visible compromise. Something clearly not how the candidate would have built it. How they respond — fix in place, rewrite, or note it and leave it — tells you how they will behave in your codebase, where every file contains three such things.
The note is required and scored. Half the signal is here. An engineer who cannot explain a change cannot get it reviewed, and in most teams that is a bigger constraint than coding speed.
Forty-five to sixty minutes is enough. Tooling should be their own, and a repository they can run locally beats a browser editor — debugging in an unfamiliar environment measures the environment.
What to score
| Criterion | What evidence looks like |
|---|---|
| code comprehension | the explanation describes what the code does, including the part that was not broken |
| diagnosis | located the actual cause rather than a plausible neighbour |
| change quality | contained, consistent with surrounding style, does not break adjacent behaviour |
| judgement on scope | chose fix or refactor and said why, rather than doing either silently |
| communication | a reviewer could evaluate this change from the note alone |
| what is missing | identified an untested case, an unhandled error, a risk |
Six criteria, each with described levels. The temptation is to add correctness of output as a separate row; resist it, because a correct fix with no understanding and an incorrect fix with excellent diagnosis are both informative and a pass/fail row flattens them.
What not to test
Algorithm invention under time pressure, unless the role genuinely involves it. For a small number of roles it does, and then it is a legitimate work sample rather than a ritual.
Syntax recall. Nobody works without documentation.
Volume. A task requiring four hundred lines in an hour measures typing and produces a submission nobody can score properly.
Your specific stack, unless it is non-negotiable. A strong engineer in an adjacent language is a better hire than a weak one in yours. If the stack is a hard requirement, make that a separate knowledge check rather than letting it silently dominate a reasoning task.
The AI assistance question
This task holds up better than most, and it is worth being explicit about why.
A blank-page algorithm problem is now close to trivially assisted. A debugging task in an unfamiliar codebase is partly assisted — a model can read code — but the parts that carry the signal are the parts assistance does not supply well: which of three plausible causes is the real one here, whether this compromise should be left alone, what the reviewer needs to know.
The practical position is to permit assistance and ask for the reasoning. "Explain what was wrong and why you chose this fix over the alternatives" is a question where a generated answer reads as generic and a real one reads as specific to this code. That is also how the work is done in the job, which is the point of a work sample.
Detection is not the answer here; the evidence on automated detection of generated text is not strong enough to act on, and a false accusation is a far worse outcome than an undetected assist.
Scoring it consistently
Two reviewers, independently, before they talk. Engineers disagree about code with unusual confidence, and the disagreement is informative rather than a problem — it is usually about whether the compromise should have been fixed, which is a real question about your team's norms.
Calibrate on three submissions before using the rubric for real. The row that will not agree on the first attempt is "change quality", because experienced engineers have strong and divergent views on scope. Argue it out once and write the resolution into the level descriptions.
Why this is defensible
The argument is content validity: the task is drawn from the work, the criteria come from the role, and the rubric describes levels of performance on each. That chain — job to task to rubric — is the oldest defensibility argument in selection and it is visible to the candidate, the hiring manager and anyone reviewing the decision later.
It is also the argument a candidate finds convincing. Applicant-reaction research consistently finds perceived job-relatedness among the strongest drivers of whether a selection procedure feels fair, and an engineer who has just debugged a realistic problem does not need the relevance explained.
Our position, and its limit
We build tasks from the role rather than from a question bank, score them against rubric levels that make a number reviewable, and keep independent scores before shared ones.
The limit: a sixty-minute task samples debugging, comprehension and communication on one problem. It does not tell you how someone will handle a two-week migration, how they behave in a design disagreement in month four, or whether they will still be curious in year two. We describe content validity and report reliability where there is enough data to compute it. We do not claim an assessment predicts later job performance — and for engineering roles specifically, the things a short task cannot reach are large enough that pretending otherwise would be the most damaging claim on this page.
- software engineering
- technical hiring
- work samples
- code review
- rubrics
Key takeaways
- Hand candidates code they did not write: reading unfamiliar code, diagnosing a cause and making a contained change is what most engineering time actually consists of.
- Design the bug with more than one plausible cause. Who investigates and who pattern-matches on the symptom is the most informative thing the task produces.
- Put a visible compromise in the codebase — how a candidate responds to it predicts how they will behave in yours, where every file has three.
- Score the written explanation. An engineer who cannot get a change reviewed is constrained more by that than by coding speed.
- This task resists AI assistance better than a blank-page problem, because the signal is in which of three plausible causes is real here — permit assistance and ask for the reasoning.
Sources & further reading
- Roth, Bobko & McFarland (2005), A Meta-Analysis of Work Sample Test Validity — Personnel Psychology
- Callinan & Robertson (2000), Work Sample Testing — International Journal of Selection and Assessment
- U.S. Office of Personnel Management, Work Samples and Simulations
- Lawshe (1975), A Quantitative Approach to Content Validity — Personnel Psychology
- Hausknecht, Day & Thomas (2004), Applicant Reactions to Selection Procedures: An Updated Model and Meta-Analysis — Personnel Psychology
- International Test Commission, Guidelines on Test Security
