Louis Pilfold

Louis Pilfold
Tank top enthusiast, incidental programmer

Getting Pretty Serious

Code is read many more times than it is written. The harder our code is to read the more time we're stealing from our future selves when we come back to squeeze in another feature, or track down that pesky bug your boss has been complaining about. A consistent and clear code style is one way to reduce the time cost, but attaining it has its own problems. Team members squabble about exactly where that curly brace is supposed to be placed, and the style guide is long and hard to remember. A code style linter helps with those problems but now the debate is around linter configuration, and every commit is followed by another, in which you fix the linter telling you off. How can we make reading code less expensive without making writing code more expensive? Languages such as Elm, Rust, and Go have automated this problem away using tools that reformat the code for you, making style someone else's problem; a problem that is resolved in milliseconds without manual intervention. Let's explore the technology used in these formatters, and how we might benefit from these ideas in the Elixir community.

Talk objectives:

  • Provide a friendly introduction to algebra based pretty printing (as found in Elixir.Inspect.Algebra)
  • Take a look at how this algorithm can be used to automate away code style nit-picks and tedious linter fixes.

Target audience:

  • Elixir developers of all skill levels.

Louis is  a software engineer and minister for functional programming propaganda at Honeycomb TV. He divides his free time evenly between collecting terrible dance music, building programming languages, and working on open source tooling and libraries for Elixir.

Back to conference page