---
title: 'Ruby Science: Naming, Decorators, and Mixins'
teaser:
tags: web,ruby
author: Joe Ferris
published_on: 2013-03-08
---

We pushed another update to [Ruby Science](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters)
today which includes five brand new chapters. Current readers can grab the
update [on Learn](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters).

This week's updates dive into three important topics. New chapters:

* Smell: Uncommunicative Name
* Solution: Rename Method
* Solution: Extract Decorator
* Smell: Mixin
* Solution: Replace mixin with composition

The first two chapters discuss the importance of naming methods and classes. We
discuss how to use class and method names to improve readability and discover
classes and methods that need refactoring.

Another chapter demonstrates how to extract concerns in a repeatable, combinable
way using the Decorator pattern.

The last two chapters provide tips for identifying and fixing mixin abuse.

The book is a work in progress, and currently contains around 145 pages of
content. A $49 purchase gets you access to the current release of the book, all
future updates, and the companion example application. In addition, purchasers
can send thoughtbot their toughest Ruby, Rails, and refactoring questions.

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