Trey Connell


Posts tagged with "ruby"

Mar 9

giant robots smashing into other giant robots: 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:…
Mar 5

Demeter : It's not just a good idea it's the law by Avdi Grimm


Found this post regarding Law of Demeter (LoD) after using Rails Best Practice to evaluate a Rails app I’m working on.

The post is very Rails oriented.

Note to self, LoD is not an end itself.

It’s important to understand that the Law of Demeter is a heuristic, not an end in and of itself. It is not a law in the sense that you “must” write your code in a certain way. Rather, it is a law in the sense that it has been consistently observed that if code complies with the Law of Demeter, it almost certainly has a number of the qualities—encapsulation, loose coupling, etc.—desirable in an OO system.

Mustache: Logic-less Ruby Templates

Mustache is a templating system that removes all logic from the display. The only thing you can do is display the values of variables which are methods on the view class. This looks really, really intriguing but I don’t know if anyone is really using it out there. Any experience?

Bundler 1.1 is going to be much faster

Ruby Regular Expression Testing

Test your regular expressions using Rubular.