Skip to content
doqqs

Interview questions

Software Developer Interview Questions

Common software developer interview questions with sample answers, covering coding, system design, debugging and teamwork, plus questions to ask and preparation tips.

Software developer interviews usually run over several stages. A recruiter or hiring manager screens you first, then you face one or more technical rounds: a live coding exercise, a take-home task, or a pair-programming session on a realistic problem. Later rounds often include a system design discussion for mid-level and senior roles, plus a behavioural interview with an engineering manager or team members about how you work with others.

Interviewers care about how you think as much as whether your code runs. They want to see you clarify the problem, talk through trade-offs, write readable code, test it, and respond calmly when you get stuck. Behavioural questions focus on code review, handling disagreements, shipping under pressure and learning from production incidents.

To prepare, revise core data structures and algorithms, practise solving problems aloud, and be ready to walk through one or two projects you know inside out, including what you would do differently. Read the job description closely for the languages, frameworks and cloud tools they use, and prepare short STAR stories for teamwork, failure and ownership.

General questions

1. Tell me about yourself and the kind of software you have worked on.

Why they ask: The interviewer wants a concise overview of your technical background and whether your experience fits the stack and the type of product they build.

I am a [backend/full-stack] developer with [number] years of experience, mostly in [language/framework]. At [company] I work on [product or system], where I built [feature or service] and improved [metric, such as page load time or deployment frequency]. I enjoy work where I own a feature end to end, from design through to monitoring in production, and I am looking for a team where I can do more of that with [technology in the job advert].

2. Why do you want to work here?

Why they ask: This checks whether you have researched the product, the engineering culture and the tech stack, and whether your motivation goes beyond salary.

I have used [product] and like how [specific feature] works, and your engineering blog post on [topic] showed the team takes [testing/observability/developer experience] seriously. Your stack of [technologies] overlaps with what I use daily, and the role would let me grow in [area such as distributed systems or front-end performance]. I want to work on a product with real users where my changes ship quickly.

3. What project are you most proud of, and what would you change about it now?

Why they ask: They want to see depth of understanding, honest reflection on technical decisions and the ability to explain a system clearly to another engineer.

I am most proud of [project], a [type of system] that handles [volume or users]. I designed [component] and chose [technology] because [reason]. It cut [metric] by [amount]. Looking back, I would add proper integration tests earlier and split [module] out sooner, because the coupling made later changes slower than they needed to be. That experience changed how I plan for testing on new work.

Questions about the job

4. How would you design a URL shortening service?

Why they ask: A classic system design prompt that tests whether you clarify requirements, estimate scale, choose storage sensibly and discuss trade-offs such as caching and collisions.

I would start by clarifying requirements: expected reads and writes per second, whether links expire, and whether custom aliases are needed. The core is a key-value mapping from a short code to the long URL. I would generate codes with a base62 encoding of a unique ID or a random string with a collision check, store mappings in a database that suits fast key lookups, and put a cache in front because reads far outnumber writes. Redirects would use a 301 or 302 depending on whether we need analytics. I would then discuss rate limiting, abuse checks and how to scale the ID generator.

5. Explain the difference between a process and a thread, and when concurrency causes bugs.

Why they ask: This tests core computer science knowledge and whether you understand race conditions, shared state and how to avoid them in real code.

A process has its own memory space, while threads within a process share memory. Sharing makes threads cheaper to create and communicate between, but it means two threads can read and write the same data at once. That causes race conditions, such as two requests both reading a balance and both writing an update. I avoid this with locks, atomic operations, immutable data or by designing so that state is owned by one worker. I also prefer database transactions with the right isolation level when the shared state lives in the database.

6. How do you approach writing tests for a new feature?

Why they ask: The interviewer is checking whether testing is part of how you work rather than an afterthought, and whether you understand different levels of testing.

I start from the behaviour the feature must have and write unit tests for the core logic, including edge cases such as empty input, boundaries and error paths. Where the feature touches a database or external API, I add integration tests, using test containers or fakes rather than heavy mocking. For critical user journeys I make sure there is an end-to-end test. I aim for tests that describe behaviour, so they survive refactoring, and I make sure they run in the CI pipeline before anything merges.

7. A page in production has become slow. How would you find the cause?

Why they ask: This checks a structured debugging approach using evidence such as metrics, logs and profiling rather than guessing.

First I would confirm the scope: which endpoint, since when, and whether it matches a deployment or traffic change. I would look at monitoring for response times, error rates and resource use, then use tracing or logs to see where the time goes. Common culprits are a new N+1 query, a missing database index, a slow external call or a cache that stopped working. Once I find the cause, I would reproduce it locally or in staging, fix it, and add an alert or test so we catch it earlier next time.

8. What does good code review look like to you?

Why they ask: They want to know whether you can give and receive feedback constructively and whether you understand what reviews are for beyond catching typos.

A good review checks that the change does what it says, is readable, has tests and does not introduce security or performance problems. I keep pull requests small so they are easy to review, and I explain the why in the description. When reviewing, I separate blocking issues from suggestions, ask questions rather than issue orders, and approve quickly when something is good enough. I treat comments on my own code as help, not criticism.

Behavioural questions (use STAR)

9. Tell me about a time you introduced a bug into production.

Why they ask: Everyone ships bugs. The interviewer wants honesty, a calm response, ownership and evidence that you improved the process afterwards.

Situation: at [company] I released a change to [feature] that broke [function] for [group of users]. Task: I needed to limit the impact and fix it quickly. Action: I spotted the error spike in [monitoring tool], rolled back within [number] minutes, and told the team and support what had happened. I then found the cause, an edge case with [data condition] that my tests had not covered, fixed it and added a test. Result: we wrote a short blameless post-mortem and added [check, such as a feature flag or canary release], which caught a similar issue later.

10. Describe a time you disagreed with a colleague about a technical decision.

Why they ask: This tests whether you can argue a position with evidence, listen to others and commit to a decision once it is made.

Situation: a colleague wanted to use [technology A] for [feature], while I thought [technology B] was a better fit. Task: we needed to agree before the sprint started. Action: I suggested we each list the trade-offs against our actual requirements, and we built a small spike to measure [performance or complexity]. I also asked a senior engineer to review our notes. Result: the data favoured [option], we went with it, and the written comparison helped the next team facing the same choice. I learned to move disagreements towards evidence early.

11. Tell me about a time you had to learn a new technology quickly.

Why they ask: Tools change constantly, so the interviewer wants evidence that you can pick things up independently and apply them under real deadlines.

Situation: our team took over a service written in [language or framework] that nobody on the team knew well. Task: I had [timeframe] to fix [issue] and add [feature]. Action: I read the official documentation, worked through a small tutorial, then read the existing code with tests running so I could see behaviour change. I paired with [colleague or contact] for an hour on the parts I found confusing. Result: I shipped the fix on time and wrote a short onboarding guide that helped [number] other developers get started.

12. Give an example of when you improved something without being asked.

Why they ask: They are looking for ownership and initiative, especially around developer experience, reliability or technical debt.

Situation: our CI pipeline took around [number] minutes, which slowed everyone down. Task: it was not assigned to anyone, but it was costing the team time daily. Action: I profiled the pipeline, found that tests were running sequentially and dependencies were not cached, then proposed changes in a short write-up. After agreement, I parallelised the test jobs and added caching. Result: build time dropped to about [number] minutes and the team merged more often with smaller changes.

Situational questions

13. You are close to a deadline and realise the feature will not be finished properly. What do you do?

Why they ask: This tests communication, judgement about scope and quality, and whether you raise risks early rather than hiding them.

I would tell my lead and the product owner as soon as I knew, with a clear picture of what is done, what is left and the risks of shipping as is. Then I would offer options: release a smaller version behind a feature flag, move the date, or cut a less important part of the scope. I would not quietly skip tests or error handling to hit the date, because that usually costs more later. Once we agreed a plan, I would note any follow-up work in the backlog.

14. You join a team and find the codebase has almost no tests. How would you handle it?

Why they ask: The interviewer wants to see pragmatism: improving quality gradually without stopping delivery or criticising the people who built it.

I would first understand why, since there is often a history of deadlines behind it. Rather than proposing a big rewrite, I would add tests around the areas I change, starting with the riskiest and most used code paths. Characterisation tests can capture current behaviour before refactoring. I would suggest a team agreement that new code comes with tests and set up the test run in CI so it becomes routine. Over time coverage grows where it matters most.

Questions to ask the interviewer

  • What does the release process look like, and how often do you deploy to production?
  • How do you balance new feature work against technical debt?
  • What would a successful first three months look like for this role?
  • How are on-call duties and production incidents handled on this team?
  • How does the team make and record architecture decisions?
  • What does code review look like here, and how long do pull requests usually wait?

Tips for a software developer interview

  • Think aloud during coding exercises. Interviewers can give credit and hints only if they can follow your reasoning, even when your solution is not complete.
  • Before you write code, restate the problem, ask about input size and edge cases, and agree on an approach with the interviewer. It avoids solving the wrong problem.
  • Prepare to walk through one project in depth: the architecture, why you made key choices, what went wrong and what you would change. Expect follow-up questions.
  • Practise on a plain editor without autocomplete if the company uses shared coding pads, so syntax slips do not throw you off during the live round.
  • Read the job description for the exact stack and revise those tools specifically, such as your language's standard library, SQL basics and the cloud services they mention.
  • Make your public code presentable if you list it on your CV. A clear README and tidy commit history in one repository beats many half-finished projects.

Sample answers are starting points. Replace everything in [square brackets] with your own examples, and keep each answer to about two minutes.

Choose your country