ActiveRecord has become practically synonymous with SQL database access in Ruby, but it's not the only way to talk to SQL stores. Today we'll explore Sequel, a wonderfully rich tool …
Category: Episodes
Episode #178: Identity Map
In the last episode we looked at the problem of "aliasing", here there are multiple objects representing a single row in a database. Today, we'll look at one possible solution …
Episode #177: Aliasing
Today we look at a perncious problem that sometimes plagues code which uses an Object-Relational Mapper (ORM). Documentation of the ActiveRecord inverse_of option mentioned in the episode can be found …
Episode #176: Dotenv
In this episode we look at a tool that I've found invaluable for managing configuration in my applications.
Episode #175: REPL-Driven Development
In today's episode I cover a classic development technique that doesn't get enough press these days. Interactive, exploratory development was and is common in the Lisp world, and Ruby's dynamic …
Episode #174: Multiple Assignment
Today's special is a note on style with a side order of opinion. Enjoy! (Note: I made a mistake in the visualization of which variables correspond to which on either …
Episode #173: For
Newer arrivals to Ruby sometimes wonder when to use #each, and when to use 'for'. Today, a detailed explanation of how they differ, and an opinion on when to use …
Episode #172: Registry
Today's dish is another one from one of my favorite cookbooks: Martin Fowler's Patterns of Enterprise Application Development. This time, we'll use the Registry pattern to make it easy for …
Episode #171: puts
Even the most basic of Ruby methods sometimes have hidden depth. Today we'll take a look at some advanced uses of the puts method.