code

The Active Record Pattern

The Active Record Pattern 150 150 Clark

This post is meant as a ‘high-level’ survey of the Active Record Pattern, Object-Relational Mapping (ORM), and the Ruby on Rails’ implementation of the Active Record Pattern — the ActiveRecord gem.

read more

Shakin’ Class: Pianos in Different Area Codes

Shakin’ Class: Pianos in Different Area Codes 150 150 Clark

There are a lot of ways to model objects in our world – a globe to represent earth, a popsicle-stick art project to model a real building, a drawing to represent statue, a mathematical equation to model a beehive, a Minkowski spacetime diagram to model space and time, ad infinitum.…

read more

Enumerable#cycle from Ruby

Enumerable#cycle from Ruby 150 150 Clark

Enumerable#cycle(n = nil) { |obj| block } -> nil Ruby Documentation of Enumerable#cycle Calls block for each element of enum repeatedly n times or forever if none or nil is given. If a non-positive number is given or the collection is empty, #cycle does nothing. #cycle returns nil if the…

read more