Systems | Development | Analytics | API | Testing

Elixir

appsignal

Debugging in Elixir and Erlang: An Introduction

Welcome to part one of this two-part series on debugging in Elixir and Erlang. In this post, we'll use several different tools and techniques to debug Elixir code. First, we'll get to know the demo project I created to showcase certain tools: dist_messenger. It's an Elixir project of a distributed messaging system that can be used directly on IEx. It allows users in different nodes to send and receive messages to each other.

appsignal

Parser Combinators in Elixir: A Deeper Dive

In our last post, we wrote a basic parser for phone numbers using Elixir. It was a bit simplistic since it didn't really respect the format phone numbers are expected to have, but it was a great start. We'll now improve the parser to ensure we only accept phone numbers that fit the spec and make our return type an instance of structured data. Let's dive straight in!

appsignal

Parser Combinators in Elixir: Taming Semi-Structured Text

The need to manipulate strings comes up quite often, whether it's to validate user-provided values or transform text into structured data that can be used programmatically. Most often, we'll reach for regular expressions to accomplish this task, but sometimes there's a better solution to the problem: parser combinators. In this two-part article, we'll explore how they work. Before moving on, let's define what 'parsing' is: Source: Wikipedia.

appsignal

Phoenix LiveView 0.18: New Special HTML Attributes

Phoenix LiveView 0.18 just shipped, with lots of new goodies to make developing LiveView an even better experience. In this post, I'll take you through a lesser-known new feature - LiveView's new special HTML attributes - and show you how to write cleaner HTML with :if, :for, and :let. When we're done, you'll have an eloquent, ergonomic, and dynamic function component you can use to render a list anywhere in your LiveView app. Let's dive in!

appsignal

Faster XML Parsing with Elixir

The XML data format has been around since 1996. It was first envisioned as a lingua franca (bridging language) for data to be serialized and read into completely disparate systems (with different programming languages, operating systems, and even hardware). It has been wildly successful in that goal. In software, though, 26 years is like a lifetime — and in hardware, it's an eternity.

appsignal

Fix Process Bottlenecks with Elixir 1.14's Partition Supervisor

Elixir v1.14 shipped earlier this month with a bunch of new goodies. In this post, we'll explore Elixir's new PartitionSupervisor. We'll take a look at some code that suffers from the exact bottleneck issue that partitions supervisors are designed to solve. Then, we'll fix that bottleneck. Along the way, you'll learn how partition supervisors work under the hood to prevent process bottlenecks. Let's get started!

appsignal

Elixir 1.14: Better Debugging with dbg/2 and More

The latest Elixir release introduces new features to improve your developer and debugging experience. In this post, we'll take a look at the new dbg() functionality, along with some improvements to Inspect and binary evaluation error messaging. All these changes come together to make you an even more productive Elixirist. Let's get started!

appsignal

Benchmark Your Elixir App's Performance with Benchee

At some point, every software engineer will find themselves in a situation where they need to benchmark system performance and test the limits of what a given system can handle. This is a common problem in software engineering, and even more so in the applications that are well suited for Elixir. Finding bottlenecks early on in an application can save a lot of time, money, and effort in the long run, and give developers confidence in the upper limit of a system.

appsignal

Predictable Code in Elixir: Expressions as Reducers and Macros

In the first part of this series on maintainable Elixir code, we started by applying rules for code predictability in our code design. We immediately saw an emerging pattern: a series of transformations on state. In this part, we'll explore this pattern further. We'll first learn how to write expressions as reducers. Then we'll use metaprogramming to make use of reducers and enforce code style seamlessly. Finishing up, we'll see an example where all the pieces fit together. Let's get going!