Skip to content
DevFlash

Coding test

Coding test: what it is, how it is graded and how to pass

Formats, grading criteria and a practice routine for the coding test of a developer hiring process.

  • 5 min read
  • 5 sections
  • Updated November 2, 2026

This guide is under editorial review.

In 1 minute

  • It comes in four formats: timed platform test, take-home project, live coding and pair programming.
  • Passing the tests is the entry ticket; the grade comes from edge cases, readability and decisions you can defend.
  • Restate the problem and list edge cases before writing code.
  • One exercise a day, reviewed as if you were the grader, beats fifty solved and forgotten.

A coding test is the step where the company stops asking about your experience and watches you solve a problem. It can be a timed exercise on a platform, a small project you build at home or a session where you write code while someone watches. The format changes; the question behind it is the same: can this person turn a vague requirement into working, readable code?

This guide covers the formats you will meet, what the reviewer grades (it is rarely just "does it pass"), the mistakes that sink good candidates and a practice routine you can start today.

The four common formats

  • Timed platform test. Algorithm or small feature exercises with automated tests, usually 60 to 120 minutes. See online coding tests.
  • Take-home project. A small app or component built in a few days, followed by a conversation about your choices. See the front-end take-home.
  • Live coding. You solve a problem in a shared editor while explaining your reasoning. See live coding.
  • Pair programming. Closer to real work: you and the interviewer change an existing codebase together. See pair programming.

Front-end positions lean toward the last three, because a component with state, events and accessibility says more about the job than a sorting algorithm. Ask the recruiter which format comes next; it is a normal question and changes how you prepare.

Flow from left to right: a problem card, a sketched plan, a code window, tests with check marks and a send arrow.
Whatever the format, the path is the same: understand, plan, code, test, then hand it in.

What the reviewer actually grades

Passing tests is the entry ticket, not the grade. Most teams use a rubric close to this one, and the technical assessment guide goes deeper into each item:

  • Correctness at the edges: empty input, repeated values, the slow network, the double click.
  • Readability: names that explain intent, small functions, no clever one-liner that needs a comment.
  • Decisions you can defend: why this state shape, why this library or no library.
  • Tests where the risk is: not coverage for its own sake, but the rule that would cost money if it broke.
  • Communication: a README that says what you did, what you skipped and why.

Mistakes that sink good candidates

Most rejections come from the same handful of habits. Each one has a cheap fix:

Do

  • Restate the problem and ask two questions before coding. Two minutes of questions save twenty of rework.
  • Test the empty string, the repeated value and the double click first.
  • Use the simplest structure that solves the task: local state for a two-field form.
  • Think out loud in live formats; the interviewer grades the reasoning they can hear.
  • Use a real button for actions. See accessibility in front-end interviews.

Avoid

  • Starting to code before you understand what is being asked.
  • Solving the happy path only. The reviewer will type an empty string first.
  • A global store and three abstraction layers for a form with two fields.
  • Long silences while you type.
  • A clickable div instead of a button in a UI task.

A small example, graded

A classic warm-up: normalize a list of tags typed by users. Both versions below pass the obvious test. Only one survives the review.

// Passes ["React"] -> ["react"], fails the edges
export const normalizeTags = (tags: string[]) => tags.map((t) => t.toLowerCase());
// Trims, drops empty values and keeps the first occurrence
export function normalizeTagsSafe(tags: string[]): string[] {
const seen = new Set<string>();
for (const raw of tags) {
const tag = raw.trim().toLowerCase();
if (tag) seen.add(tag);
}
return [...seen];
}

The second one handles spaces, empty strings and duplicates while keeping the original order, and every line says what it does. You can solve this exact exercise, with the reviewer's tests, in the normalize tags challenge.

A practice routine that works

  1. Pick one exercise

    One a day, 30 to 45 minutes, closer to the job than to a puzzle. The exercises with answers are a good start.

  2. Write the edge cases first

    List three edge cases before coding and turn each one into a test.

  3. Review it like the grader

    Solve, then read your code as if you were the reviewer. Rename one thing and delete one thing.

  4. Compare only afterwards

    Look at a reference solution only after your own attempt, and note what you missed.

  5. Once a week, out loud

    Do it with a timer, explaining as you go, as if it were live coding.

Consistency beats volume. Ten exercises reviewed carefully teach more than fifty solved and forgotten. If the process is new to you, start with how a technical interview works.

Frequently asked questions

How long does a coding test usually take?

Platform tests usually run 60 to 120 minutes. Take-home projects are often sized for 3 to 6 hours, even when the deadline is a few days. If the scope clearly needs more than a day of work, it is fair to ask what the team expects to see first.

Can I use Google or AI during the test?

Follow the rules the company states, and ask when they are not stated. Looking up an API is normal in most teams. Pasting a generated solution you cannot explain usually shows up in the follow-up conversation.

What if I do not finish in time?

Deliver what works, with a note on what is missing and how you would finish it. A smaller, correct and explained solution is graded better than a complete one that breaks on the first edge case.

Do front-end tests still ask for algorithms?

Some do, mostly at larger companies. Even then, the problems tend to be about data transformation, like grouping, filtering and deduplication, which you already do in UI code every day.

Practice with real tests

Solve front-end exercises in the browser, with the same tests a reviewer would run.

See the exercises