Systems | Development | Analytics | API | Testing

Ruby

Ruby Flip Flop: What It Is and When to Use It

Apart from being a synonym to a sandal, a ruby flip-flop refers to a system that comprises two alternating (on/off) states that one can switch between. This can be pretty helpful when you want to loop through arrays and capture contiguous subsets that lie between specific bounds (you’ll understand more of what I mean as you read along). However, not many programming languages have leveraged a mechanism like this.

How to Use Ruby BEGIN and END Blocks

There are two types of Ruby Begin and End blocks. A simple Google search of “Ruby begin end blocks” will lead you to either of these two kinds of articles – the ones in all caps (BEGIN and END) and the ones usually separated by a slash (begin/end). Both of these are different things but confused with the same name. In this post, we will dive into both. Here’s an outline of what we’ll be covering so you can easily navigate or skip ahead in the guide –

How to Reduce Memory Bloat in Ruby

The issue of memory bloat in Ruby applications is a topic of frequent discussion. In this post, we will look at how Ruby memory management can go wrong, and what you can do to prevent your Ruby application from blowing up. First, we need to understand what bloat means in the context of an application’s memory. Let’s dive in!

Build an Uptime Monitoring System in Ruby with GCE, Cloud Storage, and PubSub

Google Cloud Platform provides developers with many tools to build scalable apps in a way friendlier than AWS. In this article, Olasubomi Oluwalana shows us how we can use the Google Cloud Engine, Storage, and PubSub offerings to build an uptime monitoring system in Ruby.

Responsible Monkeypatching in Ruby

When I first started writing Ruby code professionally back in 2011, one of the things that impressed me the most about the language was its flexibility. It felt as though with Ruby, everything was possible. Compared to the rigidity of languages like C# and Java, Ruby programs almost seemed like they were alive. Consider how many incredible things you can do in a Ruby program. You can define and delete methods at will. You can call methods that don’t exist.

The Easiest Way to Monitor Ruby: Automatic Instrumentation

Setting up a proper monitoring overview over your application’s performance is a complex task. Normally, you’d first need to figure out what you need to monitor, then instrument your code, and finally make sense of all the data that has been emitted. However, with a few things set in place, and an APM that natively supports Ruby, it’s easier than ever to take this step. In this post, we’ll show you how you can do it too.

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.