Articles

Full-length articles about software engineering

Identifying the objects in the Ruby way

Some time ago, I spotted a place for improvement regarding object identification in one of the applications I was working on. To give you the background - the application is a platform for companies, and each company can have its unique flow in the code.

Counting things in Active Record

Seemingly it may seem that counting records in the database with ActiveRecord is straightforward. In reality, it looks more complex .

The art of errors

Not yet another article about errors structure

Building DSL with Ruby

The DSL shortcut stands for Domain Specific Language. At first glance, it might sound a little bit mysterious, but the truth is you use it daily as a Ruby developer.

Enum in Rails explained

This article is a perfect starting point for someone unfamiliar with Rails enums yet and a perfect checklist for developers who work with such structures daily.

Five things you did not know about Rails transactions

Transactions in Rails are an integral part of the framework, even if you don’t use them explicitly. Sometimes the way they work may be surprising, especially if you are not experienced in this topic.

Handle API response with value objects

This article is a quick tip for anyone working with APIs in a Rails application and parsing the data without modeling it.

Under the hood of the includes method in Rails

This article is not a deep dive into ActiveRecord’s internals, but a meaningful and straightforward explanation of how includes works and in which case we should be using it.

Intro to web scraping

This article introduces web scraping with Ruby, based on my ten years of experience in writing automation scripts. But it’s just a beginning; there is a lot more to discover later.

Your first A/B test with Rails

While unit, integration, or acceptance tests ensure that your application behaves as you expect it, A/B tests help you to choose which version of the element in your application works better.

Rails design patterns

This article is a high-level overview of design patterns that are commonly used in Ruby on Rails applications. I will also mention the advantages and disadvantages of using design patterns as, in some cases, we can harm the architecture instead of making it better.

Rails enum under the hood

Have you ever wondered how the enum is working under the hood and how it’s possible that we get access to more valuable methods that we don’t define directly with the enum definition? It’s pretty simple but interesting how Rails is handling enums as it involves some metaprogramming.

Rails under the hood: Routes

Routes engine is the core part of every Rails application. Thanks to the config/routes.rb file, we can easily define the application’s routes using special DSL. Let’s take a closer look at the coder under the hood to understand a bit of Rails’ magic.

Command line application with Ruby

Create your command line application using the Ruby programming language and make it available via Homebrew

Common issues with CSV parsing and solutions to them

Although CSV is a straightforward way of formatting the data that later can be used for import/export actions, you may sometimes run into parsing issues. This article is a handy first aid kit when it comes to Ruby and CSV.

Extending Ruby classes

This article is a dive into the include, extend and prepend syntax that helps us organize our code and don’t repeat ourselves.

SOLID principles

This article is a quick summary easy to memorize, so you will never wonder again what this SOLID term is all about.

Ruby Struct

Exploring Ruby Struct in depth

Sidekiq good practices

This article is my list of good practices that help me write better classes and design more reliable systems that heavily depend on the background job processing.

The Sidekiq job flow

This article introduces the Sidekiq job’s flow to help you understand what is happening with the job you queue when it’s successfully performed, or an error is raised during execution. Such knowledge will help you to design your systems better and use all features that Sidekiq offers.

Exploring the super keyword in Ruby

This article is not a long one, but I provide the essential information about the super keyword, including more advanced tips that may surprise you.

The family of anonymous functions

Anonymous functions are an integral part of Rubys identity and provide flexibility. This article is a deep dive into blocks, procs, and lambdas.

Explaining magic behind popular Ruby on Rails code

This article is a continuation of a popular article about the magic behind the popular Ruby code. This time, I will explain the logic behind popular Ruby on Rails code used by thousands of developers worldwide but not available out of the box in pure Ruby.

How Sidekiq really works

Exploring how Sidekiq works to see how it connects to Redis and provides useful features for background job processing.