Shiftfinders

20 Software Developer Interview Questions (With Sample Answers)

What each hiring round actually tests, how to narrate your thinking during live coding, and how to answer design and debugging questions without waffling.

Table of contents
Featured image for "20 Software Developer Interview Questions (With Sample Answers)"

By the end of this guide you will know how a software developer interview is usually structured, what each round is scoring, and how to answer the twenty questions that come up most — including live coding, system design, testing and code review questions that only developers get asked.

Every question below comes with a reason interviewers ask it, a way to approach it, a sample answer from a specific developer in a specific setting, and one mistake that costs people offers.

How a software developer interview works (timeline)

Most developer hiring runs through three to five stages. The names change by employer; the substance does not.

  1. Recruiter or HR screen, 20–30 minutes. Confirms your stack, your current scope, notice period, location and work arrangement, and pay expectations. What a recruiter can ask about your salary history varies by state and city, so the script differs across the US.
  2. Technical screen, 45–90 minutes. Either a shared-screen coding exercise, an automated assessment, or a take-home project with a follow-up review call.
  3. Hiring manager conversation. Ownership, how you work with product and QA, how you handle disagreement, why this team.
  4. Panel or onsite loop, two to five hours. Usually a coding round, a design or architecture round, a behavioural round, and sometimes a debugging or code review exercise on an existing repository.
  5. Final conversation with a director, founder or skip-level manager.

Seniority changes the weighting more than the shape. Entry-level candidates get fundamentals, a small feature, and questions about coursework or personal projects — typical entry-level education is a bachelor's degree, and no prior work experience in a related occupation is typically required (U.S. Bureau of Labor Statistics, 2025). Mid-level candidates are asked about ownership of whole features and about testing. Senior and staff candidates spend most of the loop on system design, trade-offs and influence.

Setting matters too. Many developers work in computer systems design services, in manufacturing, or for software publishers (U.S. Bureau of Labor Statistics, 2025). Consultancies tend to run shorter, more client-facing loops; product companies run longer standardised ones. Take-home tests are more common with smaller employers and in some non-US markets.

What interviewers are assessing (list)

  • Problem-solving under observation — shows up in live coding, where the interviewer scores how you decompose the problem and recover from a wrong turn, not just whether you finish. Problem-solving and analytical skills are both listed as important qualities for this occupation (U.S. Bureau of Labor Statistics, 2025).
  • Code quality and detail orientation — shows up in naming, edge cases, error handling and tests. Expect follow-ups like what happens if this input is empty?
  • Design judgement and trade-offs — shows up in architecture questions where there is no right answer, only choices you can defend against scale, cost and deadline.
  • Requirements analysis — shows up in questions about ambiguous specs. Analysing user needs and software requirements to determine feasibility of design within time and cost constraints is a core task for software developers (O*NET OnLine).
  • Communication and active listening — shows up in how you explain a decision to a non-engineer and in whether you hear the hint the interviewer just gave you. Critical thinking, active listening, reading comprehension and writing are among the top skills listed for this role (O*NET OnLine).
  • Collaboration and learning — shows up in code review and conflict questions, and in how you describe picking up an unfamiliar codebase. Interpersonal skills and creativity are also listed as important qualities (U.S. Bureau of Labor Statistics, 2025).

Common questions, by type (list)

General

  • Tell me about yourself.
  • Why are you looking to leave your current role?
  • Why this team and this product?
  • What kind of work do you want more of in your next job?
  • How do you keep your skills current?
  • What are you strongest at, technically, and what are you weakest at?
  • Where do you want your career to go in the next few years?

Experience

  • Walk me through a feature or project you built end to end.
  • Tell me about a production bug you had to fix under pressure.
  • Describe a time you disagreed with a code review comment.
  • Tell me about a time requirements were unclear or kept changing.
  • Describe a time you had to pick up an unfamiliar codebase quickly.
  • Tell me about something you shipped that you would build differently now.
  • Describe a time you had to tell a stakeholder that a deadline was not feasible.
  • Tell me about a piece of work you did that nobody asked you to do.

In-depth

  • How do you approach a coding problem you have never seen before?
  • Write a function that does X — and tell me its time and space complexity.
  • How would you design a URL shortener, a notification service, or a file upload pipeline?
  • How do you choose between a relational database and a document store?
  • How do you decide what to test, and how much?
  • What does your debugging process look like when logs are not enough?
  • When is it right to take on technical debt deliberately?
  • How would you review this pull request? What would you flag first?
  • How do you handle a slow endpoint — what do you measure first?
  • What do you do before deploying a change that cannot easily be rolled back?

Questions in depth, with sample answers (qa)

Tell me about yourself

Why they ask. It tests communication — whether you can summarise technical work for a mixed audience of engineers and managers in under two minutes.

How to approach it. Three beats: what you build now and at what scope, one concrete result, and why this role is the next step. Keep it to about 90 seconds and stop talking.

A backend developer, four years in, interviewing for a mid-level role on a payments team

I am a backend developer on a logistics platform, mostly Python and Postgres. I own the shipment tracking service, which handles around 40 requests per second at peak and feeds three internal teams. The work I am proudest of is replacing a nightly batch job with an event-driven update, which cut the time between a carrier scan and the customer seeing it from four hours to under a minute. Before that I worked at a smaller agency building internal tools for clients, which is where I learned to ask about requirements early. I am applying here because I want to work on a system where correctness really matters, and payments is the clearest version of that.

Mistake to avoid. Starting at your first internship and walking forward chronologically. Fix: open with your current scope and go backwards only if they ask.

Walk me through a feature you built end to end

Why they ask. It tests ownership and scope — whether you shipped something or contributed a slice of it, and whether you thought about users, not just code.

How to approach it. Pick something you can describe in five stages: the problem, the constraints, what you chose, what you rejected, what happened afterwards. Name your own contribution explicitly.

A full-stack developer at a 30-person SaaS company

Support kept getting tickets from customers who could not find out why an invoice had failed. I took the problem from the discovery call onwards. I sat with two support agents, pulled the top five failure reasons out of our Stripe webhook logs, and found that three of them were fixable by the customer. I built an invoice status page in React with a plain-English reason and a retry button, plus an API endpoint that mapped provider error codes to our own messages. I wrote the mapping table with support so the wording was theirs, not mine. After six weeks, invoice-related tickets dropped by about a third, and the retry button was used roughly 200 times a month.

Mistake to avoid. Saying we for every decision so the interviewer cannot tell what you did. Fix: say I chose, I wrote, I asked at least three times.

How do you approach a coding problem you have never seen before?

Why they ask. It tests analytical thinking and your live-coding process. In most coding rounds the interviewer scores how you decompose and recover more heavily than whether you reach the optimal solution.

How to approach it. Describe a repeatable sequence and then actually follow it in the exercise: restate the problem, write two examples including an edge case, state a brute-force approach and its complexity, then improve it.

A developer talking through a string-parsing exercise in a 45-minute screen

First I restate the problem back, because about half the time my understanding is slightly off. Then I write two or three examples on the shared doc, including an empty input and a very large one. I say the brute-force approach out loud with its complexity, even if it is O(n squared), so there is something working on the board. Then I look for the repeated work and ask whether a hash map or a sort removes it. I code the improved version, run it against my examples by hand, and only then start talking about edge cases like unicode or nulls. If I get stuck for more than a minute I say what I am stuck on, because the interviewer usually has the hint.

Mistake to avoid. Coding in silence for ten minutes and then presenting the answer. Fix: narrate one sentence every time you make a choice, even a small one.

How would you design a service that shortens URLs and redirects users?

Why they ask. It tests design judgement and trade-offs — whether you can scope a system, choose storage, and defend decisions against scale and cost rather than fashion.

How to approach it. Ask for scale and constraints before drawing anything. Then do requirements, a rough back-of-envelope estimate, the data model, the API, the storage choice, and only then caching and scaling.

A senior backend developer in a 45-minute design round

First I would ask the read-to-write ratio and the retention period. Say 100 writes per second and 10,000 reads per second, links kept forever. That is read-heavy, so reads drive the design. Two endpoints: POST to create, GET to redirect with a 301 or 302. For keys I would use a base62 encoding of an auto-incrementing ID rather than hashing, so I avoid collision handling. Storage: a single Postgres table of id, long URL, owner and created-at is enough at this volume, with Redis in front caching hot keys for reads. I would put the redirect behind a CDN. The parts I would flag as risky are custom aliases, which need a uniqueness check, and analytics, which I would write to a queue rather than block the redirect.

Mistake to avoid. Opening with microservices and a message broker before anyone has told you the load. Fix: ask two numbers first, then design to those numbers.

How do you decide what to test, and how much?

Why they ask. It tests detail orientation and risk judgement — whether you test what actually breaks or just chase a coverage number. Detail orientation is listed as an important quality for this occupation (U.S. Bureau of Labor Statistics, 2025).

How to approach it. Talk about risk, speed of feedback, and the cost of a failure. Give a worked example of something you chose not to test.

A developer on a small team that deploys several times a day

I start from what hurts if it breaks. On our billing code, every pricing rule has a unit test with the edge cases from the finance spec, because a wrong invoice is expensive and silent. For the UI I have a handful of end-to-end tests covering signup, checkout and password reset, and nothing more, because they are slow and flaky and the team stops trusting them. In between I rely on contract tests against our two external APIs. I keep the whole CI run under eight minutes, and if it creeps past that I delete tests rather than let people start skipping the suite. What I deliberately do not test is internal helper functions with no branching — the test just restates the code.

Mistake to avoid. Answering with a coverage percentage as if it were a quality target. Fix: name one high-risk area you test hard and one low-risk area you leave alone.

Tell me about a production bug you had to fix under pressure

Why they ask. It tests debugging method and composure — whether you form hypotheses and check them, or guess and redeploy.

How to approach it. Use a clear sequence: symptom, how you narrowed it, the fix, and the guardrail you added so it cannot recur. Keep blame out of it.

A platform developer on an on-call rotation

Our API's p95 latency went from 180ms to about 4 seconds on a Friday afternoon. First I checked whether it was everything or one endpoint — it was one, the search endpoint. I compared the deploy timeline with the latency graph and found the change had gone out 20 minutes before. Rather than debug live, I rolled back, which brought latency down in three minutes, then investigated. The new code was running a query inside a loop over results, so a search returning 50 rows fired 51 queries. I fixed it with an eager load, added a test asserting the query count for that endpoint, and set a latency alert at 500ms so we would hear about it before customers did.

Mistake to avoid. Telling it as a hero story that ends at the fix. Fix: end with the alert, test or runbook you added.

How do you choose between a relational database and a document store?

Why they ask. It tests data modelling judgement and whether you reason from access patterns rather than from whatever you used last.

How to approach it. Name the questions you ask: what the access patterns are, whether the data has stable relationships, whether you need transactions across entities, and what the team already operates well.

A developer who has shipped on both

I start with the queries, not the data. If I will be joining across several entities and need transactional guarantees — orders, payments, inventory — I take Postgres, because getting consistency right by hand in application code is where I have seen the worst bugs. If the shape of a record varies a lot per customer and I always fetch it by one key, a document store is simpler. On my last project we used Postgres with a JSONB column for a product attributes blob that differed per merchant, which gave us joins where we needed them and flexibility where we did not. I also weigh operations: we had one engineer comfortable with backups and failover, and that argued for one database, not two.

Mistake to avoid. Declaring one technology better in the abstract. Fix: tie every claim to an access pattern or an operational cost.

When is it right to take on technical debt deliberately?

Why they ask. It tests pragmatism and business awareness. Judging feasibility of a design within time and cost constraints is part of the job (O*NET OnLine), and interviewers want to know you can ship under a deadline without pretending the shortcut is free.

How to approach it. Give a case where you chose the shortcut on purpose, say what made it safe, and describe how it was tracked and repaid.

A developer on a team with a hard launch date

We had three weeks to launch a partner integration and the partner's sandbox only supported one of the four event types we would eventually need. Instead of building a general event router, I hardcoded the single path, isolated it behind one interface, and wrote down in the ticket exactly what would need to change. I made the shortcut safe by keeping it to about 60 lines in one file with tests, so replacing it was a contained job. We launched on time, and when the other event types went live four months later I swapped the implementation in two days without touching callers. The rule I use is: take debt where it is contained and visible, not where it spreads through the codebase.

Mistake to avoid. Saying you never ship anything imperfect. Fix: give one real shortcut and the repayment plan attached to it.

How do you handle code review feedback you disagree with?

Why they ask. It tests interpersonal skills and collaboration — both listed as important qualities for this work (U.S. Bureau of Labor Statistics, 2025) — and whether you can be wrong in public.

How to approach it. Show that you separate preference from correctness, that you try to resolve it with evidence, and that you have a tie-break rule so review threads do not stall.

A mid-level developer on a four-person backend team

A reviewer wanted me to pull a 30-line method into three small classes. I thought it added indirection for no gain. Rather than argue in comments, I replied once asking what problem the split solved, and we moved to a ten-minute call. It turned out he had been burned by that method growing to 400 lines the previous year, which I did not know. We compromised: I extracted the one piece that was likely to grow and left the rest. My rule is that if we disagree twice in writing, we talk; if we still disagree after talking and it is a matter of taste, the author decides; if it is correctness or security, the reviewer wins and I get a third opinion if needed.

Mistake to avoid. Telling the story as a win where the reviewer was simply wrong. Fix: include what you learned from their position.

Tell me about a time requirements were unclear or kept changing

Why they ask. It tests requirements analysis and active listening — analysing user needs to judge whether a design is feasible within time and cost constraints is a listed task for software developers (O*NET OnLine).

How to approach it. Show what you did to reduce the ambiguity, not how frustrating it was. Questions asked, prototypes shown, scope cut.

A developer working with a product manager on a reporting feature

The ticket said let users export their data, which could have meant five different things. Before writing code I wrote three questions in the ticket: which data, what format, and who the recipient is. The answers changed the job completely — it was finance teams wanting monthly CSVs they could open in Excel, not a full API export. I then built a throwaway version in half a day with two hardcoded columns and showed it in our Thursday demo. Two column requests came out of that session, and one feature we had planned, PDF export, got dropped because nobody wanted it. The real build took four days instead of the two weeks the original reading would have needed.

Mistake to avoid. Blaming product or the client for vague specs. Fix: make the story about the questions you asked and the prototype you showed.

How do you keep your skills current?

Why they ask. It tests active learning, which is among the top skills listed for software developers (O*NET OnLine), and predicts how fast you will get productive in an unfamiliar codebase.

How to approach it. Be specific and recent. One habit, one thing you learned in the last six months, and how it changed your work.

A developer five years into the job

I keep it small and regular rather than binge-learning. I read the release notes for the two frameworks we depend on whenever we upgrade, which is how I caught a deprecation that would have broken our auth flow. Every few months I rebuild a small piece of something I already understand in an unfamiliar tool — last quarter I rewrote a side-project API in Go to understand what the concurrency model actually buys you, and the conclusion was that it was wrong for our team right now. I also run a 30-minute internal session every month where someone walks through a part of our system; preparing one of those taught me more about our deployment pipeline than a year of using it.

Mistake to avoid. Listing courses or books you started and never finished. Fix: name one thing you learned and the decision it changed.

Questions to ask the interviewer (list)

  • What does the first production change by a new developer usually look like, and how long does it take? Tells you how good the onboarding, test suite and deploy pipeline really are.
  • How does work reach the team — tickets from product, a roadmap, or whatever is on fire? Reveals whether you will be building features or firefighting, which is the biggest predictor of whether you will enjoy the job.
  • Who decides technical design here, and how are disagreements settled? Shows whether senior developers have real influence or whether architecture arrives from above.
  • What is your on-call setup, and how many pages did the team get last month? Gets you a concrete answer about system health and out-of-hours expectations.
  • What would you want this person to have delivered by the end of their first six months? Gives you the actual success criteria, and lets you check your experience against them before you accept.

Prep checklist (checklist)

  • Write one-page notes on three projects: the problem, your specific contribution, the trade-off you made, and a number you can quote (latency, request volume, ticket reduction, release frequency).
  • Do at least five timed coding exercises out loud, with a recording or a friend listening, so narrating while typing stops feeling awkward.
  • Draw one system from memory end to end — API, data model, caching, failure modes — and practise explaining it in six minutes.
  • Re-read the job ad and map each named technology to either direct experience, adjacent experience, or a gap you will name honestly if asked.
  • Prepare a 90-second answer for tell me about yourself and short STAR-style accounts of a production bug, a code review disagreement, and a time requirements were unclear.
  • Check the company's public engineering material — docs, changelog, open-source repositories, blog — and bring one specific question from it.
  • Test your setup the day before: the coding platform, screen sharing, microphone, a working local editor, and a notepad for the edge cases you will think of mid-problem.

Frequently asked questions

Do I need a computer science degree to get interviewed?

Typical entry-level education for software developers, quality assurance analysts and testers is a bachelor's degree, usually in computer and information technology or a related field, and some employers prefer a master's (U.S. Bureau of Labor Statistics, 2025). Employer requirements vary: survey respondents for this occupation reported bachelor's, associate's and master's degrees as the requirement for a new hire (O*NET OnLine). Registered Apprenticeship routes also exist, with titles including Application Developer and DevOps Engineer (O*NET OnLine). In practice, many employers screen on a portfolio and the coding round regardless of degree.

How long does the whole hiring process usually take?

It varies widely by employer and team size. Small companies can run a screen, a technical round and a final conversation inside two weeks. Larger employers with standardised panels and multiple approval steps often take four to eight weeks, and take-home projects add whatever time you need to complete them. Ask the recruiter in the first call how many rounds there are and how quickly feedback comes after each one, then follow up once a week rather than daily.

Can I use AI coding assistants during a technical interview?

That depends entirely on the employer, and rules are changing fast. Some run deliberately AI-assisted exercises and want to see how you prompt and verify output; others ban it and may screen-record. Do not guess — ask the recruiter before the round what tools are permitted, including documentation and your own code snippets. If assistants are allowed, be ready to explain and defend every line produced, because that is what the round is actually scoring.

What should I do if I bomb the coding round?

Finish the session anyway and keep narrating — partial credit for approach is common, and interviewers routinely pass candidates who did not complete the problem. Afterwards, ask the recruiter for specific feedback and whether there is a reapplication window; many employers set one of six to twelve months. Then practise the exact format that beat you, rather than coding exercises in general: a timed live round, a take-home, or a debugging exercise in an unfamiliar codebase.

Should I negotiate pay, and when?

Wait until there is an offer or until the recruiter raises it, and go in with a researched range rather than a single number. Developer pay is usually a base salary, sometimes with a bonus and, at product companies, equity that vests over several years — compare total packages, not base alone. Check current rates for your location and specialism on public pay data, including the U.S. Bureau of Labor Statistics occupational wage pages and reputable salary surveys, since figures move and vary sharply by state and employer type.

Sources

  1. U.S. Bureau of Labor StatisticsSoftware Developers, Quality Assurance Analysts, and Testers : Occupational Outlook Handbook2025
  2. O*NET OnLine15-1252.00 - Software Developers