Falcon Developer Hiring Guide

Hiring Guide for Falcon Engineers

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

The Falcon programming language is a multi-paradigm scripting language developed by Giancarlo Niccolai in 2003. It is a high-level, interpreted language that is dynamically typed and supports both procedural and object-oriented programming. Falcon aims to provide a simple, fast, and flexible platform for scripting and development tasks, with a syntax designed for readability and expressiveness. The language is noted for its lightweight runtime system and extensive standard library. It is an open-source project, with its source code available on GitHub.

First 20 minutes

General Falcon 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.

How would you handle exceptions in Falcon?

In Falcon, you can handle exceptions by defining an error handler using the add_error_handler() method of the API class.

What are hooks in Falcon and how are they used?

Hooks in Falcon are functions that get called before or after each request to a resource or a collection of resources. They are used for performing actions like authorization or parameter validation.

How would you define a route in Falcon?

You can define a route in Falcon using the add_route() method on an instance of the API class.

What is the HTTP method used in Falcon to read a resource?

The HTTP method used in Falcon to read a resource is GET.

How would you install Falcon?

You would typically install Falcon using pip. The command is: pip install falcon

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 have a good understanding of software development principles?

This is essential because it underpins all the work they will be doing.

Has the candidate shown a willingness to learn and adapt?

This is important because technology is constantly evolving and they will need to keep their skills up to date.

Does the candidate have experience with other relevant technologies?

This is beneficial because it shows they have a broad skill set and can adapt to different tools and environments.

Is the candidate able to communicate effectively?

This is crucial because they will need to collaborate with team members and potentially explain technical concepts to non-technical stakeholders.

Has the candidate demonstrated problem-solving skills?

This is important because developers often need to troubleshoot and solve complex problems.

Does the candidate have a strong understanding of Falcon?

This is essential because Falcon is the main tool they will be using in their role.

Next 20 minutes

Specific Falcon 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 implement authentication in Falcon?

Authentication in Falcon can be implemented using hooks or middleware. The hook or middleware would check for the presence and validity of authentication credentials in the request.

What is the purpose of the process_response method in Falcon middleware?

The process_response method in Falcon middleware is used to post-process the response before it is sent back to the client.

How would you implement CORS in Falcon?

CORS can be implemented in Falcon by using the falcon-cors library or by manually setting the Access-Control-Allow-Origin header in the response.

What are middleware components in Falcon?

Middleware components in Falcon are hooks that get called on every request-response cycle, regardless of the route or resource. They are typically used for tasks like logging, request pre-processing, or response post-processing.

Describe the difference between on_get and on_post methods in Falcon.

on_get is used to handle GET requests and is used to retrieve data. On the other hand, on_post is used to handle POST requests and is typically used to send or create new data.

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

At this point, a skilled Falcon engineer should demonstrate strong technical aptitude, problem-solving skills, and effective communication. Red flags include lack of detail in discussing projects or inability to explain complex concepts clearly.

Digging deeper

Code questions

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

What does this simple Falcon code do?

import falcon

api = application = falcon.API()

class HelloWorld:
    def on_get(self, req, resp):
        resp.body = 'Hello, world!'

api.add_route('/', HelloWorld())

This code creates a basic Falcon application with one route ('/'). When a GET request is made to this route, it will return the string 'Hello, world!'.

What will be the output of this Falcon code snippet?

import falcon

class ThingsResource:
    def on_get(self, req, resp):
        resp.media = {'message': 'Hello, Things!'}

api = falcon.API()
api.add_route('/things', ThingsResource())

This code creates a Falcon application with a route '/things'. When a GET request is made to this route, it will return a JSON response with the key 'message' and the value 'Hello, Things!'.

What does this Falcon code do related to array manipulation?

import falcon

class ItemsResource:
    def on_get(self, req, resp):
        items = ['item1', 'item2', 'item3']
        resp.media = {'items': items}

api = falcon.API()
api.add_route('/items', ItemsResource())

This code creates a Falcon application with a route '/items'. When a GET request is made to this route, it will return a JSON response with the key 'items' and the values as an array of strings ['item1', 'item2', 'item3'].

What does this Falcon code do related to threading?

import falcon
from concurrent.futures import ThreadPoolExecutor

executor = ThreadPoolExecutor(max_workers=2)

class ThreadResource:
    def on_get(self, req, resp):
        future = executor.submit(self.long_running_task)
        resp.media = {'status': 'Task started'}

    def long_running_task(self):
        # Long running task here
        pass

api = falcon.API()
api.add_route('/thread', ThreadResource())

This code creates a Falcon application with a route '/thread'. When a GET request is made to this route, it will start a long running task in a separate thread and immediately return a JSON response with the key 'status' and the value 'Task started'.

What does this Falcon code do related to class design?

import falcon

class Employee:
    def __init__(self, name, position):
        self.name = name
        self.position = position

class EmployeeResource:
    def on_get(self, req, resp):
        employee = Employee('John Doe', 'Developer')
        resp.media = {'employee': employee.__dict__}

api = falcon.API()
api.add_route('/employee', EmployeeResource())

This code creates a Falcon application with a route '/employee'. When a GET request is made to this route, it will create an instance of the Employee class and return a JSON response with the key 'employee' and the values as the properties of the Employee instance.

What will be the output of this advanced Falcon code snippet?

import falcon

class AdvancedResource:
    def on_get(self, req, resp, name):
        resp.media = {'message': f'Hello, {name}!'}

api = falcon.API()
api.add_route('/hello/{name}', AdvancedResource())

This code creates a Falcon application with a route '/hello/{name}'. When a GET request is made to this route with a parameter (for example, '/hello/John'), it will return a JSON response with the key 'message' and the value 'Hello, {name}!', where {name} is replaced with the provided parameter (in this case, 'Hello, John!').

Wrap-up questions

Final candidate for Falcon role questions

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

How would you design a RESTful API with versioning in Falcon?

API versioning in Falcon can be implemented by including the version number in the URL or as a header in the request. The routing or resource on_* method would then use this version number to determine how to process the request.

How would you implement rate limiting in Falcon?

Rate limiting in Falcon can be implemented using a middleware that counts the number of requests from a client in a certain time period and raises an exception if the limit is exceeded.

Describe the difference between process_request, process_resource, and process_response in Falcon middleware.

process_request is called before routing, process_resource is called after routing but before the resource on_* method, and process_response is called after the response has been generated but before it is sent back to the client.

How would you handle file uploads in Falcon?

File uploads in Falcon can be handled by reading the file data from the request.stream object inside an on_post method.

What is the role of the process_resource method in Falcon middleware?

The process_resource method in Falcon middleware is called after routing but before the resource on_* method is called. It can be used for tasks like request validation or data pre-processing.

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

Falcon application related

Product Perfect's Falcon development capabilities

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