How to use sort_by to sort by multiple parameters in Ruby

Ruby's #sort_by method is powerful, but it can be difficult to figure out how it works at first, especially when you want to sort by »

How Ruby's Or-Equals Operator (||=) Actually Works

Ruby's or-equals operator, ||=, is deceptive. It has a common idiomatic use case in Ruby: setting defaults, but comes with some nasty suprises up its sleeve. Let's »