Skip to main content

My favorite interview questions πŸ§‘β€πŸ’»

This post will go through my favorite technical questions to choose from when interviewing software developers for a “backend-ish” role.1 They are not a checklist of things that the candidate must know (nobody knows everything), but a way for me to get a sense of their understanding in different areas.

For each question below, I explain why I ask it and provide examples of what kind of answer I would expect from candidates at a basic, intermediate, or advanced level. Depending on their answer, I may ask follow-up questions to better understand where they are.

Core concepts #

The first few questions deal with foundational programming knowledge.

How does a hash map work and what is good about it?

Intended to give a view of how well the candidate know algorithms and data structures.

  • Basic: Explain that you can store values by key. Perhaps knows that lookups are fast.
  • Intermediate: Aware that a hashing function is used to determine index for storage in an underlying array. Basic awareness of time complexity.
  • Advanced: Understands the details of how a hash map is implemented. Aware that performance relies on that the hash function distributes keys evenly. Perhaps understands dynamic resizing and can describe strategies for collision resolution.

Possible follow-up questions:

  • Can you explain what a binary search is and when you might use it?
  • Can you compare array-based lists versus linked lists?

How would you explain inheritance? Why would you (not) use it?

Assesses understanding of a core OOP concept as well as awareness of trade-offs.

  • Basic: Explains that inheritance allows a class to reuse functionality from a parent class.
  • Intermediate: Discusses use cases, such as reducing code duplication or creating a hierarchy, and mentions alternatives like composition.
  • Advanced: Understand when inheritance is a good fit as well as its potential pitfalls (e.g., tight coupling, fragile base class problem). Can elaborates on composition over inheritance or favoring interfaces over concrete base classes. Can perhaps contrast class and prototype inheritance.

Some questions to follow up on this topic.

  • What role does encapsulation play in object-oriented programming?
  • How would you refactor a class that has grown too large?

What are the pros and cons with writing code using immutable data structures?

Immutable data structures2 have entered mainstream programming. This question looks at how well the candidate understands them.

  • Basic: Understands that it means data structures which cannot be modified after creation. Perhaps that they can help prevent accidental change or make debugging easier. Perhaps felt that they can be harder to work with.
  • Intermediate: Can explain how they simplify reasoning about state and concurrency. Also understands that naive implementations can lead to a lot of copying.
  • Advanced: Understands how efficient immutable data structures are implemented. Can elaborate on how they make concurrent programming safer.

Possible follow-up questions include:

  • Why do you think the String type is immutable in most high-level languages?
  • What does it mean in functional programming that a function is “pure”?
  • How does a recursive solution compare to an iterative one?

Can you explain what the operations map and reduce (or fold) does?

As another question on a functional programming concept that has entered mainstream, IΒ would check for understanding of higher order functions, in particular connected to collections2.

  • Basic: Knows that map runs the provided function on each element in a list. Understands that you get a new list back.
  • Intermediate: Can explain both map and reduce (and/or other functions like filter or zip). Perhaps knows that such functions can be chained together. Maybe aware of the term higher-order functions.
  • Advanced: Understand all common higher-order collection-related functions. Understands how they can be used to lazily perform several operations on a collection.

Examples of follow-up questions could be:

  • Can you explain the concept of higher-order function?
  • What is the purpose of a “lazy” computation in functional programming?

Supplementary topics #

Questions on other topics, which not every candidate may have experience in.

What happens when you type a URL into your browser and press Enter?

A question to evaluate knowledge of foundational networking concepts and everyday protocols.

  • Basic: Describes that the browser fetches a web page, mentioning a server and the HTTP protocol.
  • Intermediate: Explains DNS resolution, HTTP request/response cycle, and difference between HTTP and HTTPS.
  • Advanced: Elaborates on DNS, TCP/IP stack, TLS handshake, caching, and perhaps touches on CDNs, load balancers, or HTTP/3.

This question is broad enough to allow multiple angles for asking follow-up questions tailored to the candidate’s response.


You have two systems that need to talk – how would you do it?

This is an open-ended3 question to discuss inter-system communication. It is intentionally very open to capture what the candidate has experience from before, which can be REST, messaging queues, Bluetooth, real-time video streaming, or something completely different.

This acts as discussion material rather than being one where I expect a specific answer.

  • Basic: Can describe at least one way for two systems to communicate, whether it is REST or something else. Perhaps knows one or two alternatives.
  • Intermediate: Knows one or more ways of communication well. Can reason about in what scenarios they might work well.
  • Advanced: Can contrast different communication protocols, discussing concepts such as latency and scalability. Can discuss versioning, security, and other related concerns.

Examples of follow-up questions could be:

  • In what scenario would <technique suggested by candidate> not be a good choice?
  • What considerations would you make when designing a distributed system?

Can you explain what a JOIN does in SQL?

A question that can be surprisingly hard to answer. Even though many developers have some kind of intuitive sense for what JOIN does, actually putting it into words can be hard. This gives this question an additional dimension in whether the candidate can explain concepts in simple terms.4

  • Basic: Can describe that it combines data from two tables.
  • Intermediate: Can explain in more detail how the combination of the two tables work, based on two related columns. Perhaps knows about variants like LEFT, OUTER etc.
  • Advanced: Explains clearly how tables are joined. Can discuss related concepts such as indexing and query planning.

Related follow-up questions:

  • If you have a slow database query, what can be done to speed it up?
  • What are the considerations when choosing between a traditional relational database and a schema-less document database?

What is the difference between encryption and hashing?

The question is intended to see how familiar they are in the area of software security.

  • Basic: I don’t necessarily expect junior developers to be able to clearly answer this. But I expect some understanding that they both mean somehow “scrambling” or protecting information.
  • Intermediate: Can provide a basic explanation. Knows that hashing means using a one-way function to generate a fixed-size summary, while encryption is used to secure encoding of information using some kind of key. Probably knows one algorithm of each.
  • Advanced: Can clearly explain the difference. Knows different algorithms and can compare them. Can discuss key lengths and other related topics.

Suggested follow-up questions:

  • How would you secure passwords for a web application?
  • What is the difference between symmetric and asymmetric encryption?

How would you write tests for a critical API endpoint?

This is a rather open question to see how familiar the candidate is with automated tests.

  • Basic: Suggests writing some kind of automated tests. May be familiar with the difference between unit tests and integration tests.
  • Intermediate: Can explain how different types of tests can be used together, such as unit testing, integration testing and end-to-end testing.
  • Advanced: Can expand on what types of tests and static analysis fits different kinds of scenarios. Can discuss CI/CD pipelines.

Possible follow-up questions:

  • How can you effectively test code that needs access to a third-party online service?
  • What approach would you recommend for ensuring quality in a team setting?

Role exploration #

I often use one or two questions to get a sense for how they view work in related roles. They may or may not be relevant, depending on the position. Again, these questions assume a typical backend position.

I won’t provide a basic, intermediate, or advanced levels here, as these questions are more about understanding the candidate. I am more interested in how they will complement the team than in using it as a checklist of what the candidate should know.

If we drop you down in a modern JavaScript-based web application – will you get out alive? πŸ˜‰

I use it as an informal way of gauge their level of “frontend skills”.

If the build process contains many manual steps, would spending time on automating it be a welcome change or a unwanted disruption?

Similarly, this question would be an excuse for discussing (dev)ops related topics.

Bonus: A less technical question #

I’ll end with one question that is not strictly technical.

If you were tasked with building a new product from scratch and were allowed to choose one person to join you, what would their skillset be?

I’ve found this question offers a relaxed way for people to describe what they consider their weaknesses. Most people would look for a person who has the skills they feel they themselves are missing.

What do you think? #

These are some my favorite questions as an interviewer. After going through them with a candidate, I feel I have a pretty good picture of their profile as a software developer.

What do you think about them? How would you feel answering them during an interview? What other questions should I be asking that I am not? And if you are interviewing others, what are your favorite questions?

Juha-Matti Santala at : I've always enjoyed both asking and answering questions that lead to discussions rather than answers. In the best case, I find a job interview to be a passionate discussion between two craftspeople. Out of the questions you listed,Β "You have two systems that need to talk – how would you do it?"Β is my favourite because it's so open ended, allows answers to start from a position of strength and then can be led to different directions during the discussion if there are specific things you need to know.

  1. The set of questions that you choose should be adapted to the context of the job and the candidate. For example, interviewing for a frontend-only position will likely lead to other questions than a database administrator role. ↩︎

  2. The second and third question represent two tenets of functional foundations: immutable data structures, and collection pipelines. ↩︎ ↩︎

  3. Some of these questions are intentionally quite open. That allows the question to be answered in many different ways, depending on the candidate. Sometimes, how the candidate interprets the questions says as much as the answer itself. ↩︎

  4. Being able to explaining something in simple terms is the essence of If you can’t explain it, you don’t understand it↩︎