Mastering Technical Interviews: A Focus on Backend Development

Mastering Technical Interviews: A Focus on Backend Development

Backend developer interview essentials: A step-by-step guide with my personal question collection.

ยท

12 min read

Conducting technical interviews can be stressful, particularly when you are just starting your journey in recruitment. However, don't worry. I will provide you with a few tips on how to excel at it, drawing from my own experience.

I have been interviewed numerous times for various roles, such as backend developer, technical team leader, and staff developer. These interviews primarily involved PHP, NodeJS, Python, or Golang technologies. Additionally, I have experience in conducting technical meetings and this article in a few words describes my experiences and potential questions I've still asked my candidates.

First and foremost, congratulations to you! Self-improvement is one of the most important aspects of your career path. Whether you choose to become a technical reviewer on your own or under pressure, it speaks highly of you!

๐Ÿค” How to start and drive a technical interview

First of all, do not be afraid! I know this is stressful when you have to provide your first interview and want to remember all questions and applicant answers.

Different companies have various approaches to technical interviews. Sometimes, an HR representative begins the meeting by asking about "soft skills." In other cases, you might be the one who initiates the meeting. Regardless of who initiates the interview and how it begins, the most effective way to start is by introducing yourself, the company, and the position for which the applicant is being interviewed. This might be obvious but you have no idea how many technical interviews start like: "Hi, I'm John, and I would ask you about [here you have many different technologies and buzz words], so maybe you can tell me [and here is a list of questions]".

Remember that this interview is a conversation, not a confession!

In my opinion, the most crucial aspect of an interview is to ask questions related to the applicant's experience and the skills required for the role they are being interviewed for. Everyone feels much more comfortable when discussing familiar topics. Of course, you can and should inquire about aspects necessary for the given role, but you can do so in a safe manner:

  • Q: I see you used a queue system, can you tell me more about this? What kind of tools did you use and what kind of problems it solve?

  • R: Sure, I've used RabbitMQ to [...]

  • Q: Cool, we also use RabbitMQ in our projects. Did you ever check how this queue system works inside? Do you know what are queues, exchanges, and routing keys in RabbitMQ? Or maybe you take part in the configuration of this tool?

  • R: Not really, I was an end-user and used Symfony Messenger to handle async messages.

  • Q: Ahh ok, you never had to check this, that's fine.

Remember that people feel much more at ease when discussing topics from their own perspective, based on their knowledge and experience. Try to adapt to their world and experience, and then obtain the answers to the questions you need. It's a simple psychological trick that makes candidates more comfortable and leaves them with the best impressions of the interview process.

I recall being interviewed for a "PHP developer role," during which the technical interviewer asked me about PHP memory allocation at the C language level. I had no idea (and still don't). My experience with C and C++ was very basic, and this knowledge wasn't even required for the role I applied for. However, the technical interviewer had a background in C++ and felt at ease asking questions like that.

Another important aspect is to not ask questions you are not sure about or do not understand! It's sad but common practice that technical interviewers have only a list of questions or problems to solve which are required for a given role and the most basic, expected answer but do not have their own experience to answer these questions! That can be truly funny or pathetic when you ask someone about a technology solution or tool and a candidate deeply answers your question and asks you additionally about your detailed opinion ๐Ÿ˜‰. Be careful!

After each interview, assess the candidate's responses. Review every section you covered and determine which aspects of the company's requirements align with the candidate's knowledge. If a candidate does not meet the requirements, remember to provide a summary note that will be sent back to them, highlighting areas they should improve before attempting to join your company again.

๐Ÿ‘€ Questions set

All of my questions are divided into sections. I aim to start the interview based on the applicant's experience. If someone knows about creating high-quality code, that's the ideal way to begin our interview. If not, you can always start by discussing the pros and cons of solutions they implemented in previous work, and ask them how to improve aspects that make programming challenging.

Example opening questions:

  • One of the most common phrases I hear from programmers is, "I want to create high-quality code." What does high-quality code mean to you?

  • I noticed in your resume that you have experience working with large-scale systems. Can you explain what that entails and describe the biggest challenge you faced?

  • How do you ensure that the software you develop is production-ready and functions properly after deployment?

  • Could you provide more details about your most recent project or work? What technologies did you utilize, and what challenges did you encounter?

General development experience

SOLID

  • What does every letter mean to you?

  • How to achieve dependency inversion?

  • What's the difference between dependency inversion and dependency injection?

KISS, DRY, YAGNI, CRUD

  • What it is and is it useful?

Tests

  • Do you test your code? Why do you do/don't do that?

  • What kind of tests do you know? Do you know the test pyramid?

  • What tools do you use to write/run tests?

  • What is test coverage?

  • TDD - what it is and have you ever tried to use it? What was your experience?

Design Patterns

Design patterns are a giant topic. I always try to focus on two or three of them and ask about real-world implementation. Not only theoretically understand.

  • Why do we use design patterns?

  • What's the difference between creational structural and behavioral design patterns?

  • What is the "Repository Pattern" / "Observer Pattern" and when to use it? How to implement it in the language you use?

  • What are the differences between the "Decorator Pattern" and "Mediator Pattern"? When do we use which?

  • Do you know DDD? When to use it and when you should not?

    • What is aggregate, entity, data transfer object, and value object?

    • What are bounded contexts?

    • How we should communicate in DDD layers?

  • Do you know the Ports and Adapters pattern?

Other basic questions

  • What is Object Oriented Programming / Functional Programming?

  • Do you use any Version Control system? (preferred GIT)

    • Do you know the differences between rebase and merge (in GIT)?

    • Do you know any patterns to work with GIT? Git Flow, GitHub Flow, GitLab Flow, One Flow?

  • What are continuous integration, continuous delivery, and continuous deployment?

  • What does an HTTP/HTTPS request look like?

  • Do you document your code? How and when?

  • Do you use or prepare application changelog or release log?

Technology specific questions

I've recruited programmers to the PHP or NodeJS developers roles that's why my questions are mainly based on these technologies.

PHP

  • What is the difference between self and static?

  • What does Reflection in PHP provide, and when should it be used? Can you mention one of the most basic uses of Reflection in PHP frameworks?

  • Which PHP frameworks are you familiar with and have you used?

  • Is it possible to override PHP native functions like "strlen" or "trim"? If so, how can we do it?

NodeJS

  • How does "this" behave in the JS world?

  • What are JS Promises, and when are they useless?

  • How does the JS event loop work? What are heap, stack, and queue in this context?

  • How do closures and scopes function?

  • Do you use TypeScript? (This is standard in my world).

Databases

  • What kind of databases do you use?

  • What kind of databases do you know? SQL, NoSQL, Column Oriented? What are the differences between them and when used which?

  • What are the differences between InnoDB and MyISAM engines and when will you use which?

  • How do indices in SQL databases work? How do multi-column indices work?

  • Why don't we put indices to the whole SQL tables if it speeds up searching?

  • What is the B-Tree structure?

  • What are the differences between Redis and Mongo DB?

  • What kind of structure can Redis store and is Redis persistent?

Security

  • What kind of web threats do you know?

  • Do you know "OWASP Top Ten" standard?

  • How does an HTTP/HTTPS connection work and is it secure?

  • How to prevent XSS, clickjacking, and SQL injection attacks?

  • What kind of security gives us JWT or OAuth authentication and how safe it is?

  • How to ensure security in microservices architecture?

  • How to secure client data on our servers at communication and infrastructure levels?

  • How to prevent using malicious libraries in our code?

Architecture

Design

  • Do you know the pros and cons of using microservices?

  • Do you know what it is modular monolith architecture?

  • How to safely deploy a new application version on production without SLA breaks?

  • When and how to implement good CI/CD?

Queues

  • What queue systems do you know?

  • What kind of delivery guarantees do we have in queue systems? (at-least-once, at-most-once, and exactly-once semantics).

  • What are the main differences between RabbitMQ and Apache Kafka? How do they work and distribute messages?

  • What are queue, exchange, and routing keys in RabbitMQ, and how we can route messages using them?

  • How to scale RabbitMQ and what will happen when we pass the memory limit or disk space limit?

  • How to deal with message rejections? Re-queue or fail-queue? What are Dead Letter Exchanges in RabbitMQ?

Asynchronous

  • What is the difference between thread and process?

  • What are the differences between parallel and concurrency?

  • How to avoid race-conditions in async programming?

  • How to communicate between processes/threads in async programming?

Scalability

  • What is a master-slave and master-master architecture?

  • What is a quorum in scalability?

  • How to scale web servers? What is horizontal and vertical scale?

  • Do you know any consensus algorithm? The most popular Raft and Paxos.

  • What is and how does DB replication work?

  • Do you know the "fire-and-forget" approach in DB scalability?

Other architecture questions

  • What is the CAP theorem?

  • Do you know the difference between SOAP and REST? Do you know the HATEOS approach?

  • Did you ever work with AWS or Google Cloud? Were you only a consumer of solutions provided by administration teams or maybe you have your own experience in these cloud providers?

    • Do you know Terrafor, Pupper, or Ansible tools?

Open questions

  • How do you ensure after deployment that your changes work well on production?

    • Using this question we can check if the applicant uses any monitoring/log/graph system to monitor production
  • We have a website in React/Vanilla JS + CSS on the frontend and PHP/NodeJS on the backend. One of our customers told us that the specific page works slowly. You open this page and it's really slow. How do you figure out what's going on?

    • This is a truly open question. I love it because I can go from frontend cache mechanism (maybe Varnish) and debugging (via web browser), to backend debugging (Xdebug, NodeJS profiler), to DB layer (indices, scalability, partitioning).
  • We have a simple entity, for instance, a representation of the User in our system. This entity has many attributes, but the most important ones for us are "id" - which is a unique, internal representation of this entity in our system, and "uniqueCountryId" - which could be something like an SSN in the USA or PESEL in Poland. We also have a Service to fetch these entities based on these attributes. The methods are named "getById" and "getByUniqueCountryId," and they fetch data directly from the database. Now, we face a challenge. We want to implement a cache layer to retrieve these objects from the cache (for example, Redis). How should you implement it? What kind of design pattern would you use? How do you optimize the cache to maintain a minimal number of duplicated objects?

    • This question mostly checks how the applicant resolves problems. Does she/he ask about details? Does she/he figure out keeping in redis only one object representation under the main "id" and pointers to this id under other keys like "uniqueCountryId" and ask cache layers two times?
  • Your team has received a new, exciting task from the Product Manager. Prepare a new system in which the primary responsibility will be uploading, scaling, and storing files - specifically, photos. The acceptance criteria are as follows: allow only jpg and png files up to 50 MB in any dimensions; scale them down to full HD and create a thumbnail of 100px x auto if the dimensions are larger than that; save the original file and scaled files in AWS S3 storage; be prepared to handle 10,000 requests per second for uploading files and 100,000 requests per second for fetching and displaying files from S3.

    • In my opinion, this is another great question if you want to check applicant experience with huge-scale systems. You can talk about cache systems, partial upload, CDN's, queues, and many other performance improvements.
  • What was the biggest fuckup you made?

    • That's a nice last question because it clean atmosphere after a hard technical interview :) Of course, you can not ask about this to everyone and in every company. You must feel that it won't be faux pas.

โ˜€๏ธ Conclusions

Mastering technical interviews for backend development requires a combination of understanding the candidate's experience, asking relevant and well-structured questions, and creating a comfortable environment for open discussion. By focusing on the applicant's skills and knowledge, adapting to their perspective, and providing constructive feedback, you can ensure a successful and informative interview process that benefits both the interviewer and the candidate.

Remember:

  • An interview is a conversation, not a confession.

  • Individuals are more comfortable discussing topics from their own perspective, drawing upon their knowledge and experiences.

  • Avoid asking questions that you are unsure of or don't understand.

  • Offer a summary note to be sent to the candidate, highlighting any areas they should improve, if applicable.

Did you find this article valuable?

Support pgrzesiecki by becoming a sponsor. Any amount is appreciated!

ย