Erlang 19 Developer Hiring Guide

Hiring Guide for Erlang 19 Engineers

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

Erlang 19 is an open-source, concurrent programming language and runtime system initially developed by Ericsson in 1986 for telecommunication systems. It was designed to handle large-scale, real-time, distributed applications with high availability and fault tolerance. The language's key features include hot swapping – the ability to change code without stopping a system – and support for concurrency, distribution, and fault tolerance. Its robustness has led it to be used in banking, e-commerce sectors as well as online gaming platforms. Sources of information are derived from the official Erlang website (www.erlang.org) and its documentation.

First 20 minutes

General Erlang 19 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.

What are the advantages of using Erlang for distributed systems?

Erlang was designed for building distributed, fault-tolerant systems. It provides lightweight processes, message passing concurrency, hot code swapping, and built-in support for distribution.

How would you handle errors in Erlang?

Erlang follows a 'let it crash' philosophy for error handling. Instead of trying to catch every possible error, Erlang encourages developers to focus on correct programming and let processes that encounter errors crash and restart from a known good state.

Describe the difference between spawn and spawn_link in Erlang.

Both spawn and spawn_link are used to create a new process in Erlang. The difference is that spawn_link links the new process to the current one. If either of the linked processes terminates, the other one will also be terminated.

What are the key features of Erlang?

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

How would you explain the concept of immutability in Erlang?

In Erlang, once a variable is bound to a value, it cannot be changed. This concept is known as immutability. It helps to avoid side effects and makes code easier to follow and debug.

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 clean, efficient, and maintainable code?

Regardless of language, good coding practices are important for long-term project success and collaborative work.

Is the candidate familiar with error handling in Erlang?

Error handling is a critical aspect of developing robust Erlang applications, so familiarity with it is important.

Has the candidate worked with real-time systems?

Erlang is often used for real-time systems, so experience in this area is a good sign.

Can the candidate demonstrate their experience with OTP (Open Telecom Platform)?

OTP is a set of Erlang libraries and design principles providing middle-ware to develop these systems. It's crucial for an Erlang developer to have experience with it.

How well does the candidate know concurrency and distributed systems?

Erlang is known for its strength in building concurrent and distributed systems, so this knowledge is important.

Does the candidate show a good understanding of functional programming?

Since Erlang is a functional programming language, a good understanding of functional programming concepts is crucial.

Next 20 minutes

Specific Erlang 19 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.

How would you handle state in Erlang processes?

State in Erlang processes is usually handled by passing the state as an argument to the recursive function that represents the process loop. The function then passes the updated state to itself in the recursive call.

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

In synchronous message passing, the sender waits for the receiver to process the message and send a response. In asynchronous message passing, the sender does not wait and can continue with other tasks.

What are the uses of ETS tables in Erlang?

ETS (Erlang Term Storage) tables are in-memory storage that can be used to store large amounts of data. They can be accessed by multiple processes and support constant time insertions, deletions, and lookups.

How would you implement recursion in Erlang?

In Erlang, recursion is often used instead of loops. A recursive function calls itself with a modified argument until a base case is reached.

Describe the difference between lists and tuples in Erlang.

In Erlang, lists are used when the number of elements is unknown or can change, while tuples are used when the number of elements is known and fixed. Lists are stored as linked lists and tuples as contiguous blocks of memory.

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

A skilled Erlang 19 engineer should demonstrate strong proficiency in concurrent programming, fault tolerance and real-time systems. They should also be familiar with OTP design principles. Red flags include lack of experience with distributed systems and inability to solve complex problems using Erlang.

Digging deeper

Code questions

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

What does this simple Erlang function do?

sum(0) -> 0;
sum(N) when N > 0 -> N + sum(N-1).

This is a recursive function that calculates the sum of all numbers from N down to 0.

What does this Erlang code do?

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

This code defines a module named 'hello' with a single function 'world'. The function 'world' prints 'Hello, world' to the standard output.

What does this Erlang code do?

lists:map(fun(X) -> X*X end, [1,2,3,4,5]).

This code squares each element in the list [1,2,3,4,5]. The result is a new list with the squared values.

What does this Erlang code do?

spawn(fun() -> timer:sleep(1000), io:fwrite('Hello from another process\n') end).

This code creates a new process that sleeps for 1000 milliseconds and then prints 'Hello from another process'.

What does this Erlang code do?

-record(person, {name, age}).
John = #person{name="John", age=23}.

This code defines a record type named 'person' with two fields: 'name' and 'age'. Then it creates an instance of 'person' named 'John' with 'name' set to "John" and 'age' set to 23.

What will be the output of this Erlang code?

-module(factorial).
-export([factorial/1]).
factorial(0) -> 1;
factorial(N) when N > 0 -> N * factorial(N-1).

factorial:factorial(5).

This code defines a module named 'factorial' with a function 'factorial'. The function calculates the factorial of a number using recursion. Calling 'factorial:factorial(5)' will return 120 which is the factorial of 5.

Wrap-up questions

Final candidate for Erlang 19 role questions

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

How would you optimize performance in Erlang?

Performance in Erlang can be optimized by using appropriate data structures, avoiding unnecessary copying of data, using native implemented functions (NIFs) for computation-intensive tasks, and tuning the Erlang runtime system.

What are the limitations of Erlang?

Erlang is not well-suited for computation-intensive tasks, it lacks support for popular data formats like JSON and XML, and its syntax is quite different from most other programming languages, which can make it harder to learn.

How would you implement a distributed system in Erlang?

Erlang provides built-in support for distributed systems. You can spawn processes on remote nodes, send messages to processes on remote nodes, and use distributed data structures like ETS tables and Mnesia databases.

Describe the difference between gen_server and gen_fsm in Erlang.

gen_server is a generic server behavior used for implementing server processes, while gen_fsm is a generic finite state machine behavior used for implementing processes that can be in one of a finite number of states.

What are the benefits of hot code swapping in Erlang?

Hot code swapping allows you to upgrade a running system without stopping it. This is crucial for systems that require high availability and can't afford downtime.

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

Erlang 19 application related

Product Perfect's Erlang 19 development capabilities

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