Hiring guide for Idris Engineers

Idris Developer Hiring Guide

Idris is a general-purpose functional programming language with dependent types, which enhances software reliability. Introduced by Edwin Brady at the University of St Andrews in 2007, it emphasizes strong static type checking and correctness. Idris allows for the expression of precise specifications in its code, making it ideal for systems where accuracy is paramount. The language's name comes from a character in Doctor Who, reflecting its creator's interest in science fiction. It has been used as a research tool to investigate programming languages and their design.

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

First 20 minutes

General Idris app knowledge and experience

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

How would you define a data type in Idris?
In Idris, you can define a data type using the 'data' keyword followed by the name of the data type and its parameters. For example, 'data List a = Nil | Cons a (List a)' defines a generic list data type.
What are dependent types in Idris?
Dependent types in Idris are types that depend on values. This means that the type of a function's output can depend on the value of its input. They are used to enforce more specific constraints at compile time.
How would you define a function in Idris?
In Idris, a function is defined by providing its name, arguments, and body. For example, 'add : Nat -> Nat -> Nat; add x y = x + y' defines a function that adds two natural numbers.
Describe the difference between total and partial functions in Idris.
Total functions in Idris are functions that are defined for all possible input values, while partial functions are not. Idris enforces totality by default, which helps prevent runtime errors.
What is the purpose of the 'with' keyword in Idris?
The 'with' keyword in Idris is used for dependent pattern matching. It allows you to pattern match on the result of a function or computation within a function definition.
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 solid understanding of dependent types in Idris?
Has the candidate demonstrated the ability to write and debug Idris code?
Is the candidate familiar with the concept of total functional programming?
Can the candidate effectively use Idris's interactive editing features?

Next 20 minutes

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

How would you use interfaces in Idris?
Interfaces in Idris are similar to type classes in Haskell. They define a set of functions that a type must implement. You can use the 'interface' keyword to define an interface and the 'implementation' keyword to provide an implementation for a specific type.
What are implicit arguments in Idris?
Implicit arguments in Idris are arguments that the compiler can infer from the context. They are denoted by curly braces around the argument's name and type in the function's type signature.
Describe the difference between 'Vect' and 'List' in Idris.
'Vect' and 'List' are both data types in Idris. The difference is that 'Vect' is a dependent type that includes the length of the list in its type, while 'List' does not. This allows for more precise type checking at compile time.
How would you handle errors in Idris?
In Idris, you can handle errors using the 'Either' type, which represents a value that can be one of two possibilities. You can also use dependent types to enforce certain conditions at compile time and prevent errors from occurring.
What is the purpose of the 'proof' keyword in Idris?
The 'proof' keyword in Idris is used to define a proof term, which is a value that demonstrates the truth of a proposition. This is part of Idris's support for theorem proving.
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 Idris engineer at this point.

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

What does the following Idris code do?
double : Int -> Int 
 double x = x * 2
The code defines a function named 'double' that takes an integer as an input and returns the double of that integer.
What will be the output of the following Idris code?
data Shape = Circle Double | Rectangle Double Double 
 area : Shape -> Double 
 area (Circle r) = pi * (r * r) 
 area (Rectangle w h) = w * h
This code defines a data type 'Shape' which can be a 'Circle' or a 'Rectangle'. It also defines a function 'area' which calculates the area of the given shape. For a 'Circle', it calculates the area using the formula 'pi * r^2' and for a 'Rectangle', it calculates the area using the formula 'width * height'.
What does the following Idris code snippet do?
map : (a -> b) -> List a -> List b 
 map f [] = [] 
 map f (x :: xs) = f x :: map f xs
This code defines a 'map' function that applies a function to every element of a list. The function takes a function 'f' and a list as arguments and returns a new list where 'f' has been applied to every element of the original list.
What does the following Idris code snippet do?
MkEff : (prog : EffM m a t ()) -> EffM m a t () 
 MkEff p = p
This code defines a function 'MkEff' that takes a program 'prog' as an argument and returns the same program. The 'EffM' type is used for computations which can have side effects, and in this case, the function simply returns the input program without any modifications.

Wrap-up questions

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

How would you use dependent types to enforce constraints at compile time in Idris?
You can use dependent types in Idris to enforce constraints by making the types depend on values. For example, you can define a 'Vect' type that includes its length in its type, which ensures that operations on vectors of different lengths are not allowed.
What are the benefits of using a language with dependent types like Idris?
Using a language with dependent types like Idris allows for more precise type checking at compile time, which can prevent many types of runtime errors. It also supports theorem proving, which can be used to formally verify the correctness of your code.
Describe the difference between 'public export' and 'private' in Idris.
'public export' and 'private' are visibility modifiers in Idris. 'public export' means that a function or data type is visible outside the module and can be imported by other modules, while 'private' means that it is only visible within the module.

Idris application related

Product Perfect's Idris development capabilities

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