Executable Elixir: Working with Escripts

In my previous post, we built an Elixir OTP application that implemented a supervisor tree to clone down repositories and check them for code quality with the help of Credo. Now, we'll build a command line interface for our application and make it executable with the help of Elixir's escripts.… »

Elixir Linter: Building an OTP Elixir Code Quality Engine with Credo

While learning Elixir, I've found that it's often-times similar feel to Ruby can be both a blessing and a curse. One the one hand, its semantic and eloquent style makes it feel familiar and manageable. On the other hand, being a part of the well-established Ruby community has spoiled me… »

Elixir Tricks: Building a Recursive List#delete_all Function

Elixir's List module provides us with a number of handy functions for operating on lists, including a delete function that works like this: List.delete([1, 2, 3], 1) => [2, 3] But what if we want to remove all occurrences of a particular element from our list? The List… »

Elixir Tricks: Building a Recursive Function to List All Files in a Directory

Let's use Elixir to build a simple function to list out all of the files in a directory with subdirectories. We'll need to list out all of the files and folders in the top-level directory and iterate over them. If the item we are iterating over is a file, we'll… »

Rails API Painless Error Handling and Rendering

Are you sick and tired of handling endless exceptions, writing custom logic to handle bad API requests and serializing the same errors over and over? What if I told you there was a way to abstract away messy and repetitive error raising and response rendering in your Rails API? A… »