Systems | Development | Analytics | API | Testing

Latest Posts

Diving into Custom Exceptions in Ruby

Customizing exceptions is usually not a common concern during software development. But if you catch an error in an observability tool and can't correctly and quickly identify the problem, you may need more information and details about an exception. This article will show you how to customize exceptions in Ruby and mitigate potential future problems due to a lack of error information. Let's dive straight in!

Authorization Gems in Ruby: Pundit and CanCanCan

Today, many web applications will feature pages that are publicly available — like a homepage — and more secure ones where a user has to log in to get access. The process of user registration, logging in, and tracking user session state is called "authentication". At the same time, when dealing with logged-in users, it's necessary to separate actions and resources that are available to them depending on their user roles. For example, "admins" generally have more access than normal users.

A Generalized User-local Container for UI State in Kredis

In our last post, we persisted and restored a collapsed/expanded UI state with Kredis. However, the great pain point with this is that we have to invent a lot of Kredis keys. This time, we'll see how we can avoid this by developing a generalized solution for any DOM node whose attribute states we want to track on the server side. Let's dive straight in!

Making the Most of Your Logs in Rails

Most people only realize the necessity of logs when they need them the most. But when your application breaks, user complaints start flooding in, and you have no clue how to fix it, it's too late to add some log messages that might have helped. Good logs pay for themselves tenfold. They make it a breeze to diagnose those tricky bugs, and if you do logs right, they can alert you of issues even before your users notice. But what does it mean to 'do logging right'?

An Introduction to Test Factories and Fixtures for Elixir

Writing tests is an essential part of any Elixir developer's routine. We're constantly chasing knowledge on how to write better tests, improving their speed and readability. In this three-part series, we'll explore test data generation in Elixir. Whether you are a mid-level or senior-level Elixir developer, this series will provide valuable insights to help improve the testing process for your projects.

Storing Ephemeral UI State with Kredis for Rails

Kredis (Keyed Redis) is a recent addition to the Rails developer's toolkit. It strives to simplify storing and accessing structured data on Redis. In this first part of a two-part series, we'll start by going into how Kredis works. We'll then run through an example use case for storing ephemeral UI state using a bespoke Redis key. Let's get started!

What's New in Rails 7.1

Rails 7 was a welcome release that brought a lot of significant features and changes. On the backend, Rails 7 introduced asynchronous query loading and Zeitwerk for autoloading. The frontend saw Hotwire becoming the default solution for new Rails apps. Rails 7.1 will add to these notable features. In this post, we'll discuss some noteworthy additions that are likely to be shipped.