Agda Developer Hiring Guide

Hiring Guide for Agda Engineers

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

Agda is a dependently typed functional programming language, originally developed by Ulf Norell at Chalmers University of Technology, Sweden. It is designed to be a platform for research in type theory, dependent types, and interactive theorem proving. Agda is named after Agda Åman, the first woman to receive a Ph.D. in computer science in Sweden. The language is influenced by other functional programming languages such as Haskell and ML. It is open-source and its development is hosted on GitHub.

First 20 minutes

General Agda 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 inductive and coinductive types in Agda?

Inductive types in Agda are types that are defined by a finite set of constructors. Coinductive types, on the other hand, are types that are defined by a potentially infinite set of observations.

How would you define a dependent type in Agda?

A dependent type in Agda is a type that depends on a value. This allows for more expressive types and more powerful type checking.

Describe the difference between Agda and other functional programming languages.

The main difference is that Agda is a dependently typed language, which means that types can depend on values. This allows for more expressive types and more powerful type checking. Agda also supports interactive theorem proving, which is not common in other functional programming languages.

What are the main features of Agda?

Agda is a dependently typed language, which means that types can depend on values. It also supports interactive theorem proving, inductive and coinductive types, and has a module system.

How would you define Agda?

Agda is a dependently typed functional programming language that has been designed to be a language for mathematics, software verification, and general-purpose programming.

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

Does the candidate show a willingness to learn and adapt?

The field of programming is constantly evolving, so it's important for the candidate to be willing to learn and adapt to new technologies and methodologies.

Is the candidate able to work well in a team?

Teamwork is important in a programming role as projects often require collaboration with others.

Does the candidate have experience with other functional programming languages?

Experience with other functional programming languages can be beneficial as it can provide a broader perspective and understanding of programming concepts.

Is the candidate able to communicate effectively?

Good communication skills are important in any job, but especially in programming where the candidate will need to explain complex concepts and solutions.

Can the candidate demonstrate problem-solving skills?

This is crucial because programming involves a lot of problem-solving and the candidate should be able to demonstrate this skill.

Does the candidate have a strong understanding of Agda?

This is important because Agda is a dependently typed functional programming language and it is crucial for the candidate to have a deep understanding of it.

Next 20 minutes

Specific Agda 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 use coinductive types in Agda?

Coinductive types in Agda are used to represent potentially infinite data structures. They are defined by a potentially infinite set of observations, and can be used to model things like streams and infinite lists.

What are the benefits of using Agda for software verification?

The main benefit of using Agda for software verification is that it allows for formal verification of the correctness of the software. This is done by writing a program that represents the proof of the correctness of the software, which is then verified by the Agda type checker.

How would you define a module in Agda?

A module in Agda is a way to group related definitions. It can contain types, functions, and other modules.

Describe the difference between dependent types and regular types in Agda.

The main difference is that dependent types can depend on values, while regular types cannot. This allows for more expressive types and more powerful type checking in Agda.

How would you use interactive theorem proving in Agda?

Interactive theorem proving in Agda is done by writing a program that represents the proof of the theorem. The Agda type checker then verifies the correctness of the proof.

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

A skilled Agda engineer should demonstrate proficiency in functional programming, a deep understanding of type theory, and problem-solving skills. Red flags include lack of experience with formal verification tools, inability to explain complex concepts, and poor problem-solving abilities.

Digging deeper

Code questions

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

What does this simple Agda function do?

id : ? {A : Set} ? A ? A
id x = x

This is an identity function. It takes an argument of any type A and returns the same value.

What does the following Agda code do?

_+_ : N ? N ? N
zero + n = n
(suc m) + n = suc (m + n)

This code defines a function for addition on natural numbers. It is defined recursively: the sum of zero and any number n is n, and the sum of the successor of m (suc m) and n is the successor of the sum of m and n.

What does this Agda code do?

filter : ? {A : Set} ? (A ? Bool) ? List A ? List A
filter p [] = []
filter p (x ? xs) with p x
... | true = x ? filter p xs
... | false = filter p xs

This code defines a filter function for lists. The function takes a predicate and a list, and returns a new list containing only the elements of the original list that satisfy the predicate.

What does this Agda code do?

mutual
data _|_ (m n : N) : Set where
  zero|n : zero | n
  suc|n : ? {m'} ? suc m' | n ? m | suc n

_/_ : N ? N ? N
m / n with m |? n
... | yes p = zero
... | no ¬p with suc (m / n)
... | q = suc q

This code defines a division function for natural numbers. It uses a mutual block to define both a relation that represents divisibility and the division function itself. The division function uses the divisibility relation to decide whether to return zero or the successor of the result of a recursive call.

What does this Agda code do?

record Point (A : Set) : Set where
  constructor mkPoint
  field
    x : A
    y : A

This code defines a record type named Point. A record in Agda is similar to a class in object-oriented languages. This record has two fields, x and y, both of the same type A. The mkPoint is a constructor for creating instances of the Point record.

What does this Agda code do?

record _˜_ {A : Set} (x : A) : A ? Set where
  constructor refl
  field
    proof : x = x

This code defines a record type for equivalence relations. The record has a single constructor refl, and a single field proof, which is a proof that x is equivalent to itself. This is a common pattern in Agda for defining custom equivalence relations.

Wrap-up questions

Final candidate for Agda role questions

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

Describe the difference between using Agda for software verification and using it for general-purpose programming.

The main difference is that when using Agda for software verification, the focus is on proving properties about the software, while when using it for general-purpose programming, the focus is on writing programs that perform computations. However, in both cases, the Agda type checker is used to ensure the correctness of the software or proofs.

How would you use Agda for mathematics?

Agda can be used for mathematics by encoding mathematical concepts and proofs in the language. The Agda type checker then verifies the correctness of the proofs.

What are the challenges of using Agda for general-purpose programming?

One of the main challenges of using Agda for general-purpose programming is that it requires a different mindset compared to traditional programming languages. In particular, programming in Agda often involves proving properties about the program, which can be more time-consuming and difficult than traditional programming.

How would you use dependent types for software verification in Agda?

Dependent types can be used for software verification in Agda by encoding the properties of the software in the types. The Agda type checker then verifies that the software satisfies these properties.

Describe the difference between inductive and coinductive types in Agda.

The main difference is that inductive types are defined by a finite set of constructors, while coinductive types are defined by a potentially infinite set of observations. This makes inductive types suitable for representing finite data structures, and coinductive types suitable for representing potentially infinite data structures.

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

Agda application related

Product Perfect's Agda development capabilities

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