Erlang Developer Hiring Guide

Hiring Guide for Erlang Engineers

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

Erlang is a concurrent, general-purpose programming language and runtime system developed by Ericsson in the late 1980s to build robust telecommunication systems. Named after the Danish mathematician Agner Krarup Erlang, it was designed to handle distributed, fault-tolerant, soft-real-time, non-stop applications with hot swapping capabilities. Open-sourced in 1998, Erlang's key strengths are its support for concurrency, distribution and fault tolerance. It is widely used in telecommunications, banking, e-commerce, computer telephony and instant messaging systems. Today, it serves as the backbone of several high-profile production systems such as WhatsApp and T-Mobile’s SMS infrastructure.

First 20 minutes

General Erlang knowledge and experience

The next 20 minutes of the interview should attempt to focus more specifically on the development questions used, and the level of depth and skill the engineer possesses.

Describe the difference between lists and tuples in Erlang.

In Erlang, lists are used when the number of elements is variable, while tuples are used when the number of elements is fixed. Lists are denoted by square brackets, while tuples are denoted by curly brackets.

What is the role of OTP in Erlang?

OTP (Open Telecom Platform) is a set of Erlang libraries, which consists of 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 create a process in Erlang?

In Erlang, a process is created using the spawn function. For example, spawn(Module, Function, Args) would create a new process.

What are the main features of Erlang?

Erlang has several key features including concurrency, distribution, fault-tolerance, hot code swapping, and real-time garbage collection.

How would you define Erlang?

Erlang is a functional, concurrent, general-purpose programming language and runtime environment developed by Ericsson. It's used for creating distributed, fault-tolerant systems.

The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

What youre looking for early-on

Can the candidate write efficient, readable, and maintainable code?

Writing efficient, readable, and maintainable code is a key skill for any developer. It ensures the codebase remains manageable and reduces the likelihood of bugs.

How well does the candidate understand distributed systems?

Erlang is often used to build distributed systems, so a good understanding of these systems is crucial.

Does the candidate have experience with OTP (Open Telecom Platform)?

OTP is a set of Erlang libraries and design principles providing middle-ware to develop systems. It's widely used in Erlang development.

Can the candidate effectively debug Erlang code?

Debugging is a critical skill for any developer. The candidate should be able to identify, locate, and fix bugs in Erlang code.

How well does the candidate understand concurrent programming?

Erlang is a concurrent programming language. A good understanding of concurrent programming principles is necessary to write efficient Erlang code.

Does the candidate have a solid understanding of Erlang's syntax and semantics?

This is important because Erlang has a unique syntax and semantics that a developer must be familiar with to write efficient and effective code.

Next 20 minutes

Specific Erlang development questions

The next 20 minutes of the interview should attempt to focus more specifically on the development questions used, and the level of depth and skill the engineer possesses.

What is pattern matching in Erlang?

Pattern matching in Erlang is a powerful feature that allows a function to execute different code paths depending on the shape and value of the input parameters. It's used extensively in function clauses, case expressions, and for assignment of variables.

Describe the difference between synchronous and asynchronous message passing in Erlang.

In Erlang, synchronous message passing means the sender waits for the receiver to process the message and send a response. Asynchronous message passing means the sender sends a message and continues its own processing without waiting for a response.

How would you implement recursion in Erlang?

Recursion in Erlang can be implemented by having a function call itself. For example, a factorial function can be implemented as 'factorial(0) -> 1; factorial(N) -> N * factorial(N-1).'

What are ETS tables in Erlang?

ETS (Erlang Term Storage) tables are in-memory databases with constant time data access. They provide the ability to store large amounts of data in Erlang's terms and allow constant time access.

How would you handle errors in Erlang?

Erlang follows the 'Let it crash' philosophy for error handling. It's designed to handle errors in a different process than the one where the error occurred. The common approach is to use 'link' and 'monitor' functions to get notifications about errors.

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 engineer at this point.

A skilled Erlang engineer should demonstrate proficiency in concurrent programming, understanding of fault tolerance and distributed systems, and expertise in functional programming paradigms. Red flags include inability to explain concepts clearly or lack of practical experience in handling real-world problems with Erlang.

Digging deeper

Code questions

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

What does this simple Erlang code do?

-module(hello).
-export([start/0]).
start() -> io:fwrite("Hello, World!\n").

This code defines a module named 'hello' and exports a function named 'start' with zero arguments. The 'start' function prints 'Hello, World!' to the console.

What will be the output of this Erlang code?

-module(test).
-export([start/0]).
start() -> io:fwrite("~p~n", [1+2*3]).

The output of this code will be '7'. The 'start' function prints the result of the expression '1+2*3', which is '7' due to operator precedence.

What does this Erlang code do with a list?

-module(test).
-export([sum/1]).
sum(List) -> lists:foldl(fun(X, Sum) -> X + Sum end, 0, List).

This code defines a function 'sum' that takes a list as an argument and returns the sum of all elements in the list. It uses the 'foldl' function from the 'lists' module to accumulate the sum.

What does this Erlang code do related to concurrency?

-module(test).
-export([start/0]).
start() -> spawn(fun() -> io:fwrite("Hello, World!\n") end).

This code spawns a new process that executes the anonymous function, which prints 'Hello, World!' to the console. The 'spawn' function is used for creating new concurrent processes in Erlang.

What does this Erlang code do related to class object?

-module(test).
-record(person, {name, age}).
-export([new/2]).
new(Name, Age) -> #person{name = Name, age = Age}.

This code defines a record 'person' with fields 'name' and 'age'. It also defines a function 'new' that takes two arguments and returns a new 'person' record with the given 'name' and 'age'. Records in Erlang are used to group related data together, similar to classes in object-oriented languages.

What will be the output of this advanced Erlang code?

-module(test).
-export([start/0]).
start() -> F = fun(N) when N > 0 -> N * F(N-1); (0) -> 1 end, io:fwrite("~p~n", [F(5)]).

The output of this code will be '120'. The 'start' function defines a recursive anonymous function 'F' that calculates the factorial of a number. It then prints the factorial of '5', which is '120'.

Wrap-up questions

Final candidate for Erlang role questions

The final few interview questions for a Erlang candidate should typically focus on a combination of technical skills, personal goals, growth potential, team dynamics, and company culture.

How would you design a distributed system in Erlang?

Designing a distributed system in Erlang involves using Erlang's built-in support for distribution. This includes using the spawn function to create processes on different nodes, using message passing for communication between processes, and using OTP behaviours like gen_server and supervisor for structure and fault-tolerance.

Describe the difference between spawn and spawn_link in Erlang.

Both spawn and spawn_link create a new process in Erlang. The difference is that spawn_link links the new process to the current process, so if either process terminates, the other process will also be terminated.

How would you optimize performance in Erlang?

Performance in Erlang can be optimized by using built-in profiling tools to identify bottlenecks, optimizing data structures, avoiding unnecessary list operations, and making use of Erlang's concurrency features.

What are the limitations of Erlang?

Some limitations of Erlang include lack of support for imperative programming, difficulty in interfacing with hardware and other low-level operations, and a smaller community and ecosystem compared to other languages.

How would you perform hot code swapping in Erlang?

Hot code swapping in Erlang can be performed using the module system. By loading a new version of a module into a running system, the next call to any of its functions will use the new code.

The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

Erlang application related

Product Perfect's Erlang development capabilities

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