Honeybadger Developer Blog

Tutorials, product info, and good advice from the Honeybadger crew.

Which is fastest? ERB vs. HAML vs. Slim

A fast app means happy users. The speed that your pages render depends on which templating system you use. In this article, Diogo Souza puts the three most popular Ruby templating engines to the test to see which is fastest. In the process, he shows us how to construct benchmarks and do our own investigations into performance.

SOLID Design Principles in Ruby

As developers, we spend way more time maintaining and changing code than we do writing it. By optimizing for change through SOLID design principles, we can avoid a lot of pain. In this article, Milap Neupane introduces us to SOLID, explains each principle in-depth, and shows us how to apply them in Ruby.

Logging in Ruby with Logger and Lograge

Logging is tricky. You want logs to include enough detail to be useful, but not so much that you're drowning in noise - or violating regulations like GDPR. In this article, Diogo Souza introduces us to Ruby's logging system and the LogRage gem. He shows us how to create custom logs, output the logs in formats like JSON, and reduce the verbosity of default Rails logs.

How Elixir Lays Out Your Data in Memory

Elixir makes it easy to work with sophisticated data structures. We've come a long way C, where you had to manage every detail of your data's representation in memory. Even so, the way Elixir lays out your data in memory can have real implications on your app's performance. In this article, Sasha Fonseca gives us a tour through Elixir's internal data structures and shows us how they can affect application performance.

Code Loaders in Ruby: Understanding Zeitwerk

What makes Rails magical? It just might be its code loader. Put a few files in the right places, and - presto! - you have a web app. When you use a class, Rails handles the include so you can stay focused on your code. But this magic isn't just for Rails! You can add thread-safe code loading to your own apps via the Zeitwerk gem. In this article, Olasubomi introduces us to Zeitwerk and shows us how to integrate it with our own projects.