Hiring guide for Hy Engineers

Hy Developer Hiring Guide

Hy is a programming language that's a dialect of Lisp and is designed to interact seamlessly with Python. It allows developers to use Lisp-style syntax and macros in their Python programs, providing the expressiveness of Lisp with the extensive libraries and ecosystem of Python. Hy converts its Lisp code into Python's abstract syntax tree (AST), enabling it to run on any platform that Python runs on. It can import any Python library and use Python's data structures. Hy is dynamically typed, supports functional programming, and its compiler emits Python bytecode.

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

First 20 minutes

General Hy app knowledge and experience

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

How would you define Hy?
Hy is a dialect of Lisp that's embedded in Python. It converts its Lisp code into Python's abstract syntax tree to provide direct access to Python's libraries.
What are the key features of Hy?
Key features include: Lisp and Python interoperability, powerful metaprogramming abilities, and access to Python's ecosystem.
How would you install Hy?
Hy can be installed using pip with the command 'pip install hy'.
How would you define a function in Hy?
In Hy, you can define a function using the 'defn' keyword. For example, '(defn hello-world [] (print "Hello, World!"))'.
What is the role of macros in Hy?
Macros in Hy allow you to create new syntax or language constructs. They are functions that are run at compile time, which manipulate code as data.
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 Hy language?
Has the candidate demonstrated problem-solving skills?
Is the candidate able to communicate effectively?
Does the candidate have experience with other Lisp dialects?

Next 20 minutes

Specific Hy 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 write a macro in Hy?
A macro in Hy can be defined using the 'defmacro' keyword. For example, '(defmacro m [] `(print "Hello, World!"))'.
Describe the difference between a macro and a function in Hy.
In Hy, a function is a piece of code that performs a specific task and can be called multiple times, while a macro is a way to define reusable chunks of code that can manipulate other pieces of code at compile time.
How would you handle exceptions in Hy?
In Hy, exceptions can be handled using the 'try'/'except' blocks. For example, '(try (foo) (except [e Exception] (print "Exception occurred:" e)))'.
What are the data types available in Hy?
Hy supports all Python data types, including but not limited to: integers, floats, strings, lists, dictionaries, and sets.
How would you implement a loop in Hy?
In Hy, you can implement a loop using the 'for' keyword. For example, '(for [i (range 10)] (print i))'.
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 Hy engineer at this point.

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

What does the following Hy code do?
(print "Hello, World!")
This code prints the string 'Hello, World!' to the console.
What does the following Hy code do?
(defn square [x] (* x x))
This code defines a function named 'square' that takes one argument 'x' and returns the square of 'x'.
What will be the output of the following Hy code?
(setv my-list [1 2 3 4 5])
(map inc my-list)
This code will output a list with each element incremented by one, i.e., [2, 3, 4, 5, 6].
What does the following Hy code do?
(import [threading [Thread]])
(defn my-func [] (print "Hello, World!"))
(setv my-thread (Thread :target my-func))
(.start my-thread)
This code creates a new thread and runs the function 'my-func' in that thread, which prints 'Hello, World!' to the console.

Wrap-up questions

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

How would you import modules in Hy?
In Hy, you can import modules using the 'import' keyword. For example, '(import os)'.
Describe the difference between 'let' and 'setv' in Hy.
'let' is used to bind variables to values in a local scope, while 'setv' is used to bind variables to values in the current scope.
How would you write a recursive function in Hy?
A recursive function in Hy can be written using the 'defn' keyword and by calling the function within its own definition. For example, '(defn factorial [n] (if (<= n 1) 1 (* n (factorial (- n 1)))))'.

Hy application related

Product Perfect's Hy development capabilities

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