The visitor design pattern separates the operation to be performed from the object structure. We look at a concrete implementation in Rubocop, a Ruby linting and formatting library.
Overspecification is when a test unintentionally tests more than it should. Why is this bad? Let's walk through a short kata that brings this to life.
Coupling is usually described as something intrinsic: code is either coupled or not. But Kent Beck argues that it is always with respect to a particular change. What does that mean for us?
A review and summary of 'How to take Smart Notes' and the Zettelkasten process described within. I think of it as purposeful note-taking, used to generate ideas for writing or content creation.
Polymorphism in Object-Oriented Programming, while abstract, is still somewhat easy to understand. Why we should use it, though, is less obvious. Let's investigate polymorphism's benefits!
While trying to explain the Single Responsibility Principle, it's originator calls attention to the paper 'On the Criteria To Be Used in Decomposing Systems into Modules'. Why was this paper so significant? Let's find out!
Steps to try when investigating a gem's implementation in VSCode, using mocha's any_instance as an example.
minitest/mock is a tiny library that nevertheless provides a wealth of examples for metaprogramming in Ruby - let's take a look!
A cheatsheet for those who started off with RSpec expectations and mocks, and now need to translate that to Minitest.
A walk through my current learning workflow before diving into the thinking and frameworks behind it.
a.k.a. well duh, of course a Struct returns a class.
TIL about information_schema and system catalogs that you can use to query the structure of the database itself.
Most devs quickly stop using Rail's built-in generators. This is a pity, as generators can help improve team productivity - we just need to tweak them. In this post, we'll explore customising the rake task generator.
A tiny excursion into the world of ActiveRecord, prompted by trying to debug an UnknownPrimaryKey error.
Picturing the differences between row_number, rank, dense_rank and percent_rank.
What is a Window Function Calls? The why and the how, explained with pictures for maximum grok-ability.
My reflections on side projects and indie hacking attempts this year.
Overriding the default templates in Rails and gems is simple and impactful early on in a project. Find out how.
Charting my first few open source contributions. If you're looking to contribute, I hope this helps!