Hiring guide for Erlang OTP Engineers

Erlang OTP Developer Hiring Guide

Erlang OTP (Open Telecom Platform) is a programming language developed by Ericsson in the late 1980s to address the needs of telecommunication systems. It is a concurrent, functional language designed for building scalable, fault-tolerant applications. The language's key features include hot swapping, where code can be changed without stopping the system, and its ability to handle large numbers of lightweight processes. Erlang OTP has been used in various sectors beyond telecoms, such as banking, e-commerce and computer telephony. Its robustness and efficiency have made it a popular choice for high-availability systems (source: "Erlang Programming" by Francesco Cesarini and Simon Thompson).

Ask the right questions secure the right Erlang OTP talent among an increasingly shrinking pool of talent.

First 20 minutes

General Erlang OTP app knowledge and experience

The first 20 minutes of the interview should seek to understand the candidate's general background in Erlang OTP application development, including their experience with various programming languages, databases, and their approach to designing scalable and maintainable systems.

What are the main components of OTP?
The main components of OTP are the Erlang runtime system, a number of ready-to-use components mainly written in Erlang, and a set of design principles for Erlang programs.
How would you explain the concept of supervision trees in Erlang OTP?
Supervision trees are a fault-tolerance mechanism in Erlang OTP. They are a hierarchical arrangement of processes where parent processes, known as supervisors, monitor the behavior of their child processes and take appropriate action if they fail.
What are some of the design principles of OTP?
Some of the design principles of OTP include behaviors, which are formalized design patterns; supervision trees, which provide fault-tolerance; and applications, which are a packaging mechanism that allows developers to bundle related components together.
Describe the difference between gen_server and gen_event behavior.
gen_server is a behavior module for implementing the server of a client-server relation. gen_event is a behavior module for implementing event handling functionality. The main difference is that gen_server is used for handling requests and sending responses, while gen_event is used for handling events.
How would you handle state in a gen_server?
State in a gen_server is handled using its callback functions. The state is passed as an argument to the callback functions and can be updated and returned from these functions to maintain state across different function calls.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

What you’re looking for early on

Does the candidate demonstrate a solid understanding of Erlang OTP?
Has the candidate worked on any projects involving concurrent programming?
Can the candidate effectively debug Erlang code?
How well does the candidate understand distributed systems?

Next 20 minutes

Specific Erlang OTP development questions

The next 20 minutes of the interview should focus on the candidate's expertise with specific backend frameworks, their understanding of RESTful APIs, and their experience in handling data storage and retrieval efficiently.

What is the role of the init function in a gen_server?
The init function is called when the gen_server is started. It initializes the server's state and can also set options for the server.
What are the different types of process links in Erlang OTP?
There are two types of process links in Erlang OTP: one-to-one links and one-to-many links. One-to-one links are created with the link function, while one-to-many links are created with the group_leader function.
How would you handle errors in a supervision tree?
Errors in a supervision tree are handled by the supervisor process. When a child process fails, the supervisor can choose to restart the child process, restart all child processes, or terminate all child processes and itself.
What is the purpose of the handle_call function in a gen_server?
The handle_call function is used to handle synchronous requests to the gen_server. It takes three arguments: the request, the client's process ID, and the server's current state. It returns a tuple that includes the reply to the client and the updated state.
Describe the difference between synchronous and asynchronous communication in Erlang OTP.
Synchronous communication in Erlang OTP is when a process sends a message to another process and waits for a reply before continuing. Asynchronous communication is when a process sends a message to another process and continues without waiting for a reply.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

The ideal back-end app developer

What you’re looking to see on the Erlang OTP engineer at this point.

At this point, a skilled Erlang OTP engineer should demonstrate strong problem-solving abilities, proficiency in Erlang OTP programming language, and knowledge of software development methodologies. Red flags include lack of hands-on experience, inability to articulate complex concepts, or unfamiliarity with standard coding practices.

Digging deeper

Code questions

These will help you see the candidate's real-world development capabilities with Erlang OTP.

What does this simple Erlang function do?
add(X, Y) -> X + Y.
This function adds two numbers. It takes two parameters X and Y, and returns their sum.
What does this Erlang syntax do?
{ok, {Year, Month, Day}} = erlang:localtime().
This syntax is used for pattern matching. It matches the result of the erlang:localtime() function, which returns the current local time, with the tuple {ok, {Year, Month, Day}}. If they match, it binds the variables Year, Month, and Day to the respective values.
What does this Erlang list comprehension do?
[X || X <- [1,2,3,4,5,6,7,8,9,10], X rem 2 == 0].
This list comprehension generates a new list that contains only the even numbers from the original list [1,2,3,4,5,6,7,8,9,10]. The 'rem' operator is used to get the remainder of the division of X by 2. If the remainder is 0, it means the number is even.
What does this Erlang concurrency code do?
spawn(fun() -> io:format('Hello from another process~n') end).
This code spawns a new Erlang process that executes the function provided. The function prints 'Hello from another process' to the standard output. The spawn function is used for creating concurrent processes in Erlang.

Wrap-up questions

Final candidate for Erlang OTP Developer role questions

The final few questions should evaluate the candidate's teamwork, communication, and problem-solving skills. Additionally, assess their knowledge of microservices architecture, serverless computing, and how they handle Erlang OTP application deployments. Inquire about their experience in handling system failures and their approach to debugging and troubleshooting.

How would you implement a finite state machine in Erlang OTP?
A finite state machine can be implemented in Erlang OTP using the gen_statem behavior. This involves defining the states and transitions of the machine in the callback functions of a gen_statem module.
What is the role of the handle_info function in a gen_server?
The handle_info function is used to handle all messages sent to the gen_server that are not requests or responses. It takes two arguments: the message and the server's current state. It returns a tuple that includes the updated state.
How would you handle a situation where a process in a supervision tree is frequently crashing?
If a process in a supervision tree is frequently crashing, it may be necessary to adjust the supervisor's restart strategy or the maximum restart intensity. If the problem persists, it may be necessary to investigate the cause of the crashes and fix the underlying issue.

Erlang OTP application related

Product Perfect's Erlang OTP development capabilities

Beyond hiring for your Erlang OTP engineering team, you may be in the market for additional help. Product Perfect provides seasoned expertise in Erlang OTP projects, and can engage in multiple capacities.