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.