This week in Ruby Science: Naming, Decorators, and Mixins, oh my!

March 8, 2013 jferris ruby rails refactoring ruby science Ruby Science: Naming, Decorators, and Mixins We pushed another update to Ruby Science today which includes five brand new chapters. Current readers can grab the update on Learn . 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 a...