Hiring guide for Ballerina Engineers

Ballerina Developer Hiring Guide

The Ballerina programming language, introduced by Sanjiva Weerawarana and his team at WSO2 in 2017, is a cloud-native programming language designed for integration. It simplifies the task of writing resilient, secure, and scalable code for network-distributed applications. Ballerina's unique feature is its sequence diagram-based graphical view, which allows developers to visualize their coding logic. The language supports both text and graphical syntaxes making it user-friendly for developers of all skill levels. Sources of this information include WSO2's official website and various tech publications like InfoWorld and TechCrunch.

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

First 20 minutes

General Ballerina app knowledge and experience

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

How would you define Ballerina?
Ballerina is a statically typed, concurrent programming language, specifically designed for integration. It is simple, easy to write, understand, and has a clean syntax which minimizes the possibility of errors. It is designed to write microservices that integrate APIs.
What are the key features of Ballerina?
Some of the key features of Ballerina include: built-in support for JSON and XML, built-in support for services and resource functions, support for streams and tables, and the ability to write concurrent programs with lock-free programming.
How would you create a service in Ballerina?
In Ballerina, a service can be created using the service keyword followed by a block of code that contains a set of resource functions. Each resource function represents a method of the service.
What are the different types of variables in Ballerina?
Ballerina has several types of variables including: int for integers, float for floating point numbers, string for sequences of characters, boolean for true or false values, and json for JSON values.
How would you use a function in Ballerina?
In Ballerina, a function can be defined using the function keyword followed by a block of code. The function can then be called by its name, followed by parentheses with any required parameters inside.
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 have a strong understanding of Ballerina language?
Has the candidate demonstrated problem-solving skills?
Is the candidate familiar with the tools commonly used with Ballerina?
Can the candidate effectively communicate their thought process and solutions?

Next 20 minutes

Specific Ballerina 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.

Describe the difference between services and functions in Ballerina.
In Ballerina, a service is a collection of network accessible entry points, represented by resource functions. A function, on the other hand, is a reusable piece of code that can be called from anywhere within the program.
What are the control flow statements in Ballerina?
Ballerina has several control flow statements including: if, else, while, break, continue, and foreach. These can be used to control the flow of execution in a Ballerina program.
How would you handle errors in Ballerina?
Errors in Ballerina can be handled using the error type and the check and checkpanic expressions. The error type represents a union of a message string and a map of detail values. The check expression can be used to handle errors at runtime, while the checkpanic expression can be used when we want to panic if an error occurs.
What is the use of the main function in Ballerina?
The main function in Ballerina serves as the entry point of the program. It is the first function that gets executed when a Ballerina program is run.
How would you use loops in Ballerina?
Loops in Ballerina can be created using the while and foreach statements. The while statement repeatedly executes a block of code as long as a given condition is true, while the foreach statement executes a block of code for each item in a list.
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 Ballerina engineer at this point.

At this point, a skilled Ballerina engineer should demonstrate strong problem-solving abilities, proficiency in Ballerina 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 Ballerina.

What does the following Ballerina code do?
import ballerina/io;

public function main() {
    io:println("Hello, World!");
}
This code prints 'Hello, World!' to the standard output.
What will be the output of the following Ballerina code snippet?
import ballerina/io;

public function main() {
    int a = 10;
    int b = 20;
    io:println(a + b);
}
The output of this code will be '30'. The code adds two integers, 10 and 20, and prints the result.
What does the following Ballerina code do?
import ballerina/io;

public function main() {
    int[] arr = [1, 2, 3, 4, 5];
    arr[2] = 10;
    io:println(arr);
}
This code initializes an integer array with five elements, changes the third element to 10, and then prints the array.
What will be the output of the following Ballerina code snippet?
import ballerina/io;

public function main() {
    worker w1 {
        io:println("Worker 1");
    }
    worker w2 {
        io:println("Worker 2");
    }
}
The output of this code will be 'Worker 1' and 'Worker 2'. However, the order of the output may vary because the two workers run concurrently.

Wrap-up questions

Final candidate for Ballerina 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 Ballerina application deployments. Inquire about their experience in handling system failures and their approach to debugging and troubleshooting.

Describe the difference between synchronous and asynchronous communication in Ballerina.
In Ballerina, synchronous communication means that the caller waits for the callee to finish processing before it can continue, while asynchronous communication means that the caller can continue processing other tasks without waiting for the callee to finish.
What are the concurrency constructs in Ballerina?
Ballerina has several concurrency constructs including: workers, futures, and strands. Workers are used for concurrent execution, futures represent a single asynchronous computation, and strands are lightweight threads of execution.
How would you use a worker in Ballerina?
In Ballerina, a worker can be used to create a concurrent execution unit. The worker keyword is followed by a block of code that represents the task to be executed concurrently.

Ballerina application related

Product Perfect's Ballerina development capabilities

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