Module Inheritance vs. Class Inheritance

Developers writing code in object-oriented languages like Ruby and JavaScript have a complicated relationship with inheritance. I have seen opinions stating that class inheritance is absolutely evil and should be »

Weekly Code Puzzle #4 Results: "Dreidel Dreidel"

Happy holidays folks! As mentioned last week, we chose a holiday-themed code challenge, 'Dreidel Dreidel.' The challenge was to implement a gambling game with a four-sided Dreidel using JavaScript. »

Steps to Refactor Fat Models with DCI

Rails developers are familiar with the maxim "fat models, skinny controllers." If logic starts creeping into our controllers, most developers seem content to push that logic into a model. But »

Practical Object-Oriented Refactoring

As code bases grow, the need to refactor grows with it. A couple weeks ago, I saw an opportunity to refactor Bloc's scheduled emails, which we activate in a Rakefile. »