I took a look at the Hexagonal Repository Pattern for Rails last time, added some code to make it more Rails-like, and built some tests to determine if it’s worth the effort. Generally, when people talk about “The Hexagonal Repository,” they
Rails Hexagonal Architecture – Repository Pattern
Rails Hexagonal Architecture – Repository Pattern Let me preface this article with a couple of things. Firstly, I strongly disagree that Hexagonal Architecture is particularly useful, relevant or close to achieving the goals ascribed to it when combined with Rails. Secondly, I have an
How to use Rails ActiveModel – Part 2
If you’re arriving without reading part 1 no problem, this article will focus on ActiveModel. If you want background and more detail on what the sample application is doing you can read part 1 here, its a much shorter read
Rails ActiveModel – objects without persistence
I can’t think of any other language or framework where plain object use is in any way mysterious, but the number of questions on Stack Overflow about Rails is quite shocking. It’s as though the framework does so much, when
The Monty Hall Interview Problem Part 2
Implementing The Simulation To re-cap part 1, having been interested in a forum post, I decided to test out writing a simulator for the Monty Hall problem for use as an interview exercise. We need to give the user a
The Monty Hall Interview Problem Part 1
Inspiration from the web As will sometimes happen, on a forum I frequent, an old thread from 2006 surfaced where a heated discussion about probability had raged. This was a 1000+ post monster on a modified Boy Girl Paradox. One of