We've all worked with tightly-coupled code. If a butterfly flaps its wings in China, the unit tests break. Maintaining a system like this is...unpleasant. In this article, Jonathan Miles dives into the origins of tight-coupling. He demonstrates how you can use dependency injection (DI) to decouple code. Then he introduces a novel decoupling technique based on delegation that can be useful when DI is not an option.
As a Ruby developer you probably use tools like Sidekiq that rely on concurrency. But would you know how to *build* your own sidekiq, or add concurrency to an existing app? This article will open Ruby's concurrency toolbox and show you how each tool works. It shows you how to solve the same problem in multiple ways, so you can compare tools. And it looks at new tools that might possibly ship with future versions of ruby.
You know Big-O is important - not only for acing your next job interview but for knowing how code works at scale. But have you ever taken the time to go beyond a superficial understanding of the subject? In this article, Julie Kent uses equal parts math and Ruby to reveal the beating heart of Big-O and show us how it ticks.
Have you ever dealt with a unicode bug? Where plain text — the substance you work with all day — can no longer be trusted? It can be disorienting to say the least! This article will help prepare you so that the next time that happens you’ll be able to spend less time hyperventilating and more time troubleshooting.
Introducing the pg_partition_manager gem: It helps you easily maintain PostgreSQL partitioned tables that need to be created and dropped over time as you add and expire time-based data in your application.
We added a useful debugging tool called Breadcrumbs. Check them out, and perhaps you will never need a random debug log in production ever again.
Alongside introducing new security features like Two-Factor Authentication (2FA) and integration with haveibeenpwned.com, we also take a quick look into the inner workings of Two-Factor Authentication.
A chance conversation let me to the realization that the world of unique identifiers is larger and more wondrous than I ever could have imagined. In this post we discuss five types of UUIDs and their upstart cousin, the ULID. We explore what makes each of them special and when they may be particularly useful.
Because Ruby is an object-oriented language, we tend to model the world as a set of objects. We say that two integers (x and y) are a Point, and a Line has two of them. While this approach is often useful, it has one big problem...
If you love Ruby and Lambda like we do, then re:Invent 2018 was like Christmas arriving early. Here's how you can get up to speed quickly with running Ruby code on Lambda.
Last week we released version 4.0.0 of the `honeybadger` Ruby gem. This release includes a long-awaited feature which makes it even easier to customize your error reports before they are sent to Honeybadger. We also did some much-needed refactoring, and made a few removals and deprecations for good measure. Don't worry, though—most of the API remains unchanged, so upgrading should be a relatively painless process for most users.
In this story, Jason Swett of The Ruby Testing Podcast discusses the pitfalls of external dependencies in your test suites, and how to avoid them.
Ad-hoc nil usage causes a lot of problems in Ruby. In this post we explore a more explicit way to handle nil conditions, inspired by Rust.
We recently shipped version 3.2 of the honeybadger Ruby Gem, which includes a new feature to make it easier to add context to your error reports.
When your autoscaling group terminates instances running Sidekiq, you should finish the Sidekiq jobs before the instance gets terminated. This is how we do that at Honeybadger.
When we have to work with text, we often reach for regular expressions. But they're not the easiest solution to every problem. Recently I was struggling with a large regexp, when I realized it'd be less work to write a parser. This article explains the process.
This article covers one of my favorite techniques for improving performance: memoization. It's a source of easy little performance wins that eventually add up and only occasionally reduce your application to a heap of smoldering rubble. Only very occasionally.
If you want Ruby's string methods to play nicely with Unicode, it's a good idea to normalize them. This article is a brief introduction to Unicode normalization for Rubyists.
The latest version of the honeybadger Ruby gem includes a lot of improvements and new features. Check it out!