Have you got the ExFactor? Writing a refactor helper

Product information




Beginner, Intermediate


Christian has been a software engineer for over 10 years and a tech person for more than 20. He is an occasional triathlete and avid cyclist. He lives & works in Chicago with a wife, son, and 3 cats.

Talk Description

If you’ve ever used IntelliJ, you may appreciate how nice the “refactor function” command can be. Is it possible to write an elixir library that can help with refactoring all the function calls in a given app?

The answer is yes (mostly).

We will discuss techniques for turning written elixir code into the parsed representation and how we can use that to find all the references to our function. We will investigate using the Abstract Syntax Trees (AST) representation to move the code and the shortcomings of this technique.

Abstract Syntax Trees are an intermediate transformation of elixir code on the way to Beam byte code. The AST representation is a useful tool for structuring arbitrary elixir code. Can it be helpful in manipulating the underlying (*.ex) files? This talk will describe the challenges of implementing this library and explain the challenges of working with ASTs.