Home » Rails » Page 3

Tag Archives: Rails

Writing Efficient Queries

Writing efficient queries that balance performance and memory footprint is the most crucial part of writing good software. Doing this is not super easy, but keeping an eye on logs and how your queries are executed under the hood will definitely help you a lot. But you know the situation: requirements keep changing, new useless features on top of changed ...

Read More »

ActionCable: The Missing Guide

ActionCable was introduced to Rails as of version 5. It allows you to create pub/sub WebSocket connections in your Rails application, which brings live updates to your user experience. ActionCable upgrades an HTTP connection between the server and client to a WebSocket. Some of the benefits of a WebSocket is that the amount of data transferred per transmission is considerably ...

Read More »

Working with the Evernote API in Rails

Many people find Evernote to be an invaluable tool for organizing their life. The Evernote API provides has some really great features to take advantage of, including document download and OCR (optical character recognition). Whichever features you choose to investigate, be sure to read their terms of service so that you are within the guidelines of API usage. So much ...

Read More »

Creating Advanced Active Record DB Queries with Arel

If you’ve used Rails, you’ve likely used Active Record as a way to access and record database transactions in a more Ruby-like manner. Active Record goes a long way in simplifying the use of a database. But more then that, it’s designed in such a way that we don’t have to worry about the particulars for working with specific databases. ...

Read More »

Writing a Rails Feature – Blow by Blow

My favorite part of seeing someone live code is all the mistakes they make, but not because I’m a mean awful person who likes to see others fail. Watching others recover from mistakes helps me recover from my mistakes. It also makes me feel better when I see that they mess up the same ways that I do. Too often, ...

Read More »

Replacing Sinatra with Rack in Sidekiq

Sidekiq is one of the first gems that I install when doing a significant Rails project. If you plan to or already have Redis running, it provides an almost effortless ability to process background jobs. Aside from that, I’ve always thought that one of the most powerful components of Sidekiq was the web UI that it ships with. Prior to ...

Read More »

Refactoring Legacy Rails Controllers

Ruby on Rails controllers are like the bouncers of a nightclub. No identification at a club? You aren’t getting in. Without the proper clothes, you can expect to be turned away. Oh, you wanna say something slick? You’re definitely not getting in, and you might be getting a beatdown on your way out. Controllers are the bouncers of the Rails ...

Read More »

Decomposing Monolithic View Systems

When we break down a monolithic app into microservices, we go through a process known as decomposition. Simply put: This process can be a bit overwhelming. After all, if you have a really large monolith, you have a ton of code to organize and decompose! Because of this, I believe decomposition is best implemented as a slow and gradual process. ...

Read More »

Five Practices for Robust Ruby on Rails Applications

Whenever I come across a Rails application with inconsistent data or bugs that are hard to nail down, I tell myself: “They (the developers) were just a couple of keystrokes away from preventing those issues from happening.” At Brewhouse, we follow five simple practices to make our Rails applications robust. It all comes down to failing early, loudly, and often. ...

Read More »