We've covered three SOLID principles so far. But this one is going to be special. Interface Segregation Principle refers to Interfaces, but we don't have it in Ruby. Should we omit this part? I don't think so, we can still learn something from it.

Hi guys, let's continue learning SOLID principles. Today we will talk about Liskov Substitution principle. The principle, that Barbara Liskov defined in 1987 in her conference keynote named "Data abstraction and hierarchy".

In my previous article I covered Single Responsibility Principle. Today I'm going to write about the "O" in SOLID - Open/Closed Principle.

I write a lot about patterns and Object-Oriented Design, so I couldn't miss opportunity to write about SOLID principles of Object-Oriented Design. I'm going to show by example how we can use these principles in Ruby.

Hi guys. I'm so glad to announce that article about Specification Pattern was picked for RubyWeekly #341. Also article Decoupling From Rails [Part 1] started just awesome discussion on Reddit. It means that we're moving to the right direction. I'm going to finish my series of articles about Decoupling From Rails soon, but today would like to talk about modules. How to add class methods and instance methods by including one module into class.

Uncle Bob (Robert C Martin) said:

Date frameworks, but not to marry them.

Many Ruby/Rails developers married to Rails. This article will show how to start dating with Rails.

Hi guys! I've been digging into ideas of Domain-Driven Design for a while and decided to share one cool pattern that I found in book: "Domain-Driven Design: Tackling Complexity in the Heart of Software" by Eric Evans (The Blue Book). If you haven't read this book yet - do that. Twice. Because it's so hard to get all concepts first time :) In this book Eric Evans describes Specification pattern which can make application more flexible. Today we're going to learn how to implement it.

Let's take a break from long reads and discuss something that Ruby-developers use every day. We're going to discuss exceptions. At first sight exceptions in Ruby look as relatively simple concept. But there are couple caveats.

Hi. Today we're going to learn about UnboundMethod in Ruby and create Sinatra-like DSL. Ruby is so powerful that allows us to unbound method from class or module and bind it to existing object. I know that might sound a bit complicated, but it allows to create incredibly powerful features.

If you use Rails you could see and use class macros many times. For example we use it for defining associations in ActiveRecord models:

class User
  has_many :posts
end

has_many it's a class macro.