Ruby/Rails
: I've always said that if you don't have some serious gripes with a programming language or framework, then you don't know it well enough yet. Over more than a decade of using them, I've found plenty of issues with both Ruby and Rails. That I keep using them either says something about their merits or my character flaws. (It's the former.)Articles
Blog Posts
What if service objects were just Procs?
Service objects, a popular design pattern in the Ruby on Rails community, are analogous to higher-order functions, and we can demonstrate that more clearly by refactoring one into a Proc without changing its API.
August 03, 2023
Adding Parameterized Layouts to phlex-rails
Out of the box, phlex-rails currently doesn't support parameterized layouts. I found a quick way to hack support in.
April 16, 2023
I just learned two interesting Ruby edge-case behaviours
Kevin Newton's explanations of how YARV works alerted me to a couple of edge cases in Ruby that I'd never thought about.
December 07, 2022
Here are my TDD on the Shoulders of Giants talk slides
RubyConf Mini is over and my talk went well. Once the videos are posted, I'll do a quick write up about the talk, but for now here are the slides.
November 19, 2022
There's a trick to using Hash.new
Ruby's Hash class supports default values, but there's an edge case where using this feature produces some unexpected results. Python developers should know what I'm talking about.
April 29, 2020
Recapping the first day of RubyConf 2019
Alistair, Amy and I were in Nashville for RubyConf to hear about what's next for the Ruby community.
November 18, 2019
How to use Hash.new with a block
The default values of Ruby's hashes can be made completely dynamic. Let's look at some dogs (to understand how we can use this feature.)
October 03, 2019
A whole world of Ruby code
Exposing yourself to more code is one of the most important things you can do to improve your development skills.
August 19, 2019