Everything is Enumerated

This post describes how to make enumerable methods that use blocks to iterate over an internal data structures but don't their enumerable properties and why this would be useful.

Ancient City Ruby Snake Case

Comparing mathematical, iterative, and recursive solutions to the Snake Case challenge posed during the Ancient City Ruby Conference

Thread Pool - A Ruby Antihero

A thread pool is an abstraction for re-using a limited number of threads for performing work concurrently to save resources

Clojure's iterate in Ruby

Implementing the Clojure sequence functions, iterate, with Ruby's Enumerator to emulate sequences

Recurring events in Ruby

Montrose is an easy-to-use library for defining recurring events in Ruby. It uses a simple chaining system for building recurrences, inspired heavily by the design principles of HTTP.rb and rule definitions available in the Recurrence gem.

Debugging SystemStackError

Prior to Ruby 2.2, debugging stack overflow errors can be painful because most of the backtrace is swallowed in the output. Learn a quick workaround with Kernel.set_trace_func.

Using RSpec Metadata

Leveraging RSpec metadata to control how specs are run with examples for altering database mode and toggling behavior based on spec directory

Handling Paginated Resources in Ruby

Extracting data from an API can get messy once pagination is involved. We'll look at a few ways of dealing with this complexity, including "recursive each" and Kernel#to_enum method to enumerate paginated resources

Use inverse_of

ActiveRecord will try hard to infer the inverse relation for your associations, but you may benefit from setting the inverse_of option wherever possible

Page 1 of 2 · Next