solnic.eu
Articles tagged with  oop

Ditch Your ORM

September 18, 2015 by Piotr Solnica

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...


Subclassing Module For Fun and Profit

August 13, 2012 by Piotr Solnica

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...


Single Responsibility Principle on Rails Explained

July 09, 2012 by Piotr Solnica

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...


Get Rid of That Code Smell - Attributes

April 04, 2012 by Piotr Solnica

In this post I will show you why using attribute accessors is a code smell in most of the cases. This is a very convenient feature of Ruby but you should only consider using it if you’re implementing a data-like objects which expose, well, data to...