Home » Ruby

Ruby

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 »

Microservice Communication with Queues

Microservices are small programs that handle one task. A microservice that is never used is useless though — it’s the system on the whole that provides value to the user. Microservices work together by communicating messages back and forth so that they can accomplish the larger task. Communication is key, but there are a variety of ways this can be ...

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 »

Building a Well-Polished Ruby Gem

A gem is a package for Ruby to distribute code in a maintained unit. But that’s not all there is to it. A Ruby gem can also contain full documentation and testing. And gems can be further configured for external services for quality, test suite, and documentation verification. When you’re publishing code for other people to use, you’re also presenting ...

Read More »

When To Be Concerned About Concerns

When I wrote about good modules and bad modules, I mentioned that an indication of a “bad” module was when it was used to extract code for the sake of code extraction. This usually results in a module that is only being mixed into one class. When I published the article, I had lots of support from people intimately familiar ...

Read More »

Learning Ruby on Rails with Nitrous.io

I’ve been programming a long time. I’ve written professional applications in Java, PHP, C#,ASP.NET, C++, and Silverlight. I’ve seen a lot of fads, and I’ve seen a lot of tools for programming come and go. My point is I think I know a pretty good thing when I see it, and Nitrous is definitely one of those things. I get ...

Read More »

Want to take your WEB dev skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • PHP Programming Cookbook
  • jQuery Programming Cookbook
  • Bootstrap Programming Cookbook
  • Building WEB Apps with Node.js
  • CSS Programming Cookbook
  • HTML5 Programming Cookbook
  • AngularJS Programming Cookbook