Ditch Your ORM

I’ve been promoting a functional approach in Ruby for a while now and even though it includes many different techniques and patterns, there’s this one idea, one fundamental idea that changes everything - immutability. But what does it even mean in Ruby? To freeze everything? That would be too slow, so no. Immutability-oriented design means... Continue Reading →

Subclassing Module For Fun and Profit

You think you’ve done everything with Ruby? How about subclassing Module? It’s an interesting technique that I’ve been experimenting with lately. One of the downsides of using modules in Ruby is that a module doesn’t have a state. When you mix it into another class you’re basically copying methods from one place to another. What... Continue Reading →

Single Responsibility Principle on Rails Explained

A few weeks back we had a small drama about SRP. There were some smart comments, some stupid ones and a few funny jokes even, like that for example: https://twitter.com/porras/status/220456288017059840 If I remember correctly it all started with this post. I’ve seen criticism on twitter saying that the post shows shitty code, that it’s more... Continue Reading →

Up ↑