Mindblown: a blog about philosophy.

  • Intro to web scraping

    In simple words, web scraping is a process of pulling information from a given website when no other way, like API endpoint or export option, is available. This is a very popular method of automating processes typically handled manually by the user performing inside the browser. Ruby is an excellent language for writing scraping bots […]

  • The Sidekiq job flow

    At first sight, it seems that the way Sidekiq jobs work is straightforward, but the truth is that the whole process is more complex. The job can fall into a specific flow depending on the configuration and the job outcome. This article introduces the Sidekiq job’s flow to help you understand what is happening with […]

  • Introduction to Rails transactions

    Transactions are an essential part of the Rails framework. Even if you are not using them directly, Rails is doing it automatically each time you save or destroy the instance of the model. However, while transactions can bring you many benefits, they can also damage your application when used in a not proper way. This […]

  • Under the hood of the includes method in Rails

    The way the includes method work in Active Record is one of the most common questions during interviews, yet many developers are unaware of how that method behaves. Therefore, it’s worth saying that the method’s behavior is interesting as it behaves differently depending on the situation. This article is not a deep dive into ActiveRecord’s […]

  • Enum in Rails explained

    Use Rails magic to speed up developmentEnum is a shortcut for the enumerated term, which means a set of named values in computer programming. When it comes to Rails, we often mean statuses when we are talking about the set of named values. For example, we can have the user in the application that can […]

  • From zero to Sidekiq hero

    Last Saturday, I had the pleasure to join Ruby Conf in Pakistan to tell on the live webinar about Sidekiq. If you want to get started using Sidekiq or are looking for ways to improve your existing knowledge about Sidekiq, this webinar should be interesting for you. Agenda: Short introduction about meWhat is background job […]

  • How to quickly familiarize with any legacy Rails app

    Ruby on Rails is a mature technology, and probably that’s why many people say that it’s a dead technology. But it’s not. Fewer developers start new projects with Rails, but hundreds of thousands of applications are in the maintenance mode. This is the reason why the skill of quickly adapting to the legacy code is […]

  • Sidekiq good practices

    It seems that writing Sidekiq’s workers it’s quite an effortless task. Still, during my eight-year journey with this great library, I experienced too many issues caused by poorly designed background jobs to believe that it’s an easy thing to do. For sure, a badly designed background job can lead to the following issues: and probably […]

  • 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. Let’s assume that we request the API to get the list of the users from which we would like to pull only active users and save some data for later usage: The above […]

  • 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. The main entry point for routes is the instance of ActionDispatch::Routing::RouteSet class […]

Got any book recommendations?