Learn

Tips on Building Your Own SaaS

Practical insights, lessons learned, and actionable advice for SaaS developers

Oct 7, 2022

How to Send Tailwindcss-Styled Emails With Ruby on Rails 7

Let me show you how I create beautiful email templates in just a few minutes and how I use them in my Rails projects.

More Articles

Sep 27, 2022

How to Install Bootstrap in Rails 7

With the introduction of the Ruby on Rails 7 asset pipeline, there are a lot of new tools available for you to use. But ...

Sep 12, 2022

A Quick and Easy Guide to the Asset Pipeline in Rails 7

Rails 7 ships with a new way of handling assets, which seems so confusing that you might wonder if it's a feature....

Aug 19, 2022

Is ViewComponent the Future of Rails?

What is a Ruby on Rails Component, and how is it different than a React Component...

Jul 20, 2022

Turbo Frames Vs. Turbo Streams

Let's go over the differences between Turbo Frames and Turbo Streams....

Feb 10, 2022

The Factory Method Pattern in Ruby

The Factory Method allows you to isolate conditional instantiations so that when you do need to change them, you'll make...

Feb 10, 2022

The Builder Pattern in Ruby

The Builder pattern allows you to hide the configuration of complex objects in a separate class....

Feb 10, 2022

The Abstract Factory Pattern in Ruby

The Abstract Factory pattern allows you to isolate conditional instantiations of related objects so that your client cod...

Jan 10, 2022

The Decorator Pattern in Ruby

The Decorator pattern allows you to attach new behavior to individual objects dynamically without affecting their classe...

Jan 6, 2022

The Adapter Pattern in Ruby

The Adapter pattern allows you to make incompatible objects work well together by using an adapter object....

Jan 4, 2022

The Strategy Pattern in Ruby

In this post we're going to take a look at how the Strategy Pattern works in Ruby....

Aug 29, 2021

Symbols vs. Strings in Ruby

If you're curious, as I was, about which one to choose, or why there are both available, or which one is better, then ke...

Aug 5, 2021

Hash vs. Dictionary

The Ruby Hash is an implementation of the dictionary concept, where the keys (in the key, value pair) are unique numbers...

Feb 5, 2021

What is Type-Driven Design/Development in Ruby

Type Driven Development and Ruby might sound like apples and oranges but it's actually very useful....

Jul 29, 2020

How to Use Strings in Ruby

I remember when I first heard about strings. I wanted to create a command line application that would ask the user for h...

Jul 29, 2020

How to Use the Ruby Map Method

I think it’s so cool that the Ruby map method exists. It means that Ruby has support for higher-order functions, and fun...

Jul 20, 2018

How to Test Ruby Modules With Rspec

When you have a module that you include in other classes, the way you test it might not be obvious. This is what I'm goi...

Jul 19, 2018

Let vs. Let! vs. Instance Variables in RSpec

A common source of confusion when using RSpec is whether to use let, let!, or an instance variable, for storing state. I...

Jul 9, 2018

If vs. Unless in Ruby

Do you find unless to be confusing? I know I do. Especially if it’s combined with one or more boolean operators....

Jul 8, 2018

Ruby's Sort and Sort_by

The Ruby sort method works by comparing elements of a collection through the spaceship operator, and using the quicksort...

Jul 8, 2018

Why You Too Should Learn Elixir

Learn Elixir not because you will get a better job out of it, but because learning functional programming will make you ...

Jul 7, 2018

What Is a Ruby Reducer?

The term comes from the world of functional programming, and it’s often paired with map. You’ve probably heard the term ...

Jul 3, 2018

Learn How to Use Ruby Arrays in Less Than 10 Minutes

Arrays are probably the most popular data structure you’re going to use in Ruby. Learn what you can do with them and how...

Jul 2, 2018

How to Use the Each Method in Ruby

When it comes to doing the same thing over and over again, Ruby has a few methods you can choose from. But in this artic...

Jul 1, 2018

What Is Ruby Used For?

If you hang out in any of the web development communities, there’s no way you don’t hear about the Ruby programming lang...

Jun 30, 2018

Understanding Boolean Operator Precedence in Ruby (&&, and, ||, or)

Operator precedence might be one of the most confusing parts of the Ruby language. Even the docs recommend you just use ...

Jun 29, 2018

How To Learn Ruby

I first stumbled upon Ruby in 2007. All I wanted back then, was a language that I can build something cool with. I was g...

Jun 28, 2018

How to Write a Case Expression in Ruby

Ruby uses the case for writing switch statements. Learn how case works and how you can use it....

Jun 27, 2018

Ruby’s attr_accessor, attr_reader and attr_writer

A Ruby object has its methods public by default, but its data is private. So if you need to access the data, for either ...

Jun 26, 2018

Is Ruby pass-by-reference or pass-by-value?

As you learn your way through Ruby's OOP, you will eventually stumble upon the concept of object passing. It might not b...

Jun 19, 2018

Object-Oriented Programming (OOP) with Ruby

Learn about Object-Oriented Programming (OOP) with Ruby, and become a better Ruby developer....

May 31, 2018

What Is a Ruby Enumerable and Why Would You Use It?

The Ruby Enumerable module deserves the top spot in the popularity contest. It packs so many great methods that it’s har...

May 24, 2018

Feature Tests vs. Integration Tests vs. Unit Tests

Learn the difference about the many different types of tests in Ruby on Rails and when to use each one....

May 16, 2018

How To Remove Argument Order Dependency In Ruby

Removing dependencies leads to code that is easier to extend. In this article you're going to learn about removing argum...

May 8, 2018

How To Avoid The Ruby Class Variable Problem

The way Ruby resolves class variables is not very intuitive and in my opinion, it's one of the few areas where it breaks...

Jun 1, 2016

Writing a Chrome extension with Elm

In my quest for learning a new language I've picked Elm and Elixir, I think both are great languages to learn but for th...

Apr 26, 2016

How to test a function that yields a block with Minitest and Rspec

Have you ever tried writing a test for a function that takes a block and does something to that block? I recently had to...

Nov 3, 2015

How to write a Cucumber test for Google Maps

Trying to write a Cucumer test for a Google Maps related feature is a bit trickier than you might expect. It involves tw...

Oct 6, 2015

Understanding and extending Rails form helpers

Helpers in rails are meant to clean up view code by allowing you to extract data processing logic from your markup code....

Jul 29, 2015

Nested trees with Ruby on Rails

Did you ever needed to get the children's children of a newsted tree like structure? Well it turns out, in Rails, that s...

Jun 9, 2015

Decoupling CSS Selectors From Your Tests

For a long time, I've been bothered by the problem of using CSS selectors to target DOM elements in my tests (with Capyb...

Apr 7, 2015

7 Steps To Better Cucumber Tests

When you are starting out with rails testing there are so many things you need to learn about and thus it’s very hard to...

Feb 24, 2015

What You Need to Know When Working With External APIs in Rails

Accessing APIs seems to be pretty straight forward, until you actually do it. There are a few gotchas that I'd like to t...

Feb 10, 2015

The Beginner’s Guide to Rails Helpers

Helpers in Rails are used to extract complex logic out of the view so that you can organize our code better....

Jan 20, 2015

Mastering Ruby Blocks in Less Than 5 Minutes

Ruby blocks are one of the most powerful but confusing topics when it comes to learning how to code with ruby. Let's put...

Jan 6, 2015

How to Use link_to in Rails

Even after 7 years of using Ruby on Rails I still have trouble remembering how to properly use all those options availab...

Dec 23, 2014

3 Ways of Testing Private Methods In Rails

Here's a topic that pops up often especially when faced with the common task of testing controllers in Rails. We have so...

Dec 9, 2014

How to Test Controllers in Rails

These days it seems like everyone is looking for faster tests and for good reason since loading the entire Rails framewo...

Nov 11, 2014

How I Create a New Ruby on Rails Project

This is the process I use to create a new Ruby on Rails project. I usually use the latest stable version of Ruby/Rails a...