---
title: 'Ruby Science: You Down with OCP?'
teaser:
tags: web,ruby
author: Joe Ferris
published_on: 2013-05-10
---

Yeah, you know me.

We just pushed the latest update to [Ruby Science](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters), including five new chapters.

New chapters this week discuss:

* Using the Single Responsibility Principle to create readable, reusable
  classes.
* Applying the Open/Closed Principle to reduce churn and prevent breakage while
  keeping objects easy to change.
* Applying the Dependency Inversion Principle to create flexible, reusable
  objects.
* Using the Law of Demeter to prevent application dependencies from becoming a
  tangled mess.
* Choosing Composition Over Inheritance to make simpler, more flexible software.

The book is a work in progress, and is currently 230 pages long. Your purchase gets you access to the current release of the book, all future updates, and the companion example application.

[Get your copy of Ruby Science today](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters).
