Recent Posts

Case Statement Magic - 01/11/18

Earlier this week, a conversation on the Seattle.rb Slack reminded me of one of my favorite hidden Gems in Ruby, the case statement. Most languages have syntax for multiway branching. Java calls it switch. Lisp uses cond. Ruby calls it case which relates back to the mathematical roots of this construct. Ruby’s implementation of this feature is particularly flexible, and many folks don’t realize all the things you can do with it. read more »

GCP Audit Logs - 12/27/17

Audit logs are boring. At least we hope they’re boring. If your audit logs are exciting, you are likely having a bad day. But audit logging of some sort is often a good idea, and many of us forget to set it up and verify that we understand the data on a regular basis. This post walks through setting up and using the audit logging capabilities of GCP. read more »

Metaprogramming and Currying - 12/19/17

This year there have been many problems that require writing an interpreter for a simple language. My favorite of these has been day 16 which had you execute some dance moves that modify an array. One of the dance moves is ‘spin’ which involves rotating the array by a constant. Another is ‘exchange X Y’ where the elements in the array at X and Y change places. The moves themselves aren’t complicated. The parsing of the input file isn’t complicated either. The problem gets hard though when you are asked to execute the entire sequence of dance moves 999,999,999 times. read more »

more blog posts

Recent Talks

ConFoo Vancouver 2017 - 12/03/17

Syntax Isn’t Everything: NLP For Rubyists

Ruby Conf 2017 - 11/14/17

4 Programming Paradigms in 45 Minutes

Rails Conf 2017 - 04/26/17

Syntax Isn’t Everything: NLP For Rubyists

more talks