This post originated from an RSS feed registered with Ruby Buzz
by Dave Hoover.
Original Post: Thinking about Portland; Refactoring in Wheaton
Feed Title: Red Squirrel Reflections
Feed URL: http://redsquirrel.com/cgi-bin/dave/index.rss
Feed Description: Dave Hoover explores the psychology of software development
I just caught up on a bunch of the blogging from RailsConf. It sounds like it was an excellent time. But I'm surprised that I didn't hear about anything controversial or earth-shattering. Perhaps Rails is stabilizing? Anyway, while part of me yearned to be there, the end of my week in Wheaton turned out to be an excellent experience in its own right (on a smaller scale).
Victoria and Brian are working their way through Refactoring and we are meeting weekly to discuss what they're learning. One of the first questions from the first few chapters was "What is an Abstract Class?" This important and fundamental question launched us into a contrast of Java's Interfaces, Abstract Classes, and Packages with Ruby's Module. I have always said in our Rails course that Ruby's Modules play double-duty (namespaces + mixin), but this was the first time I had illustrated that point to people who know Ruby better than Java. It was a good discussion and I feel privileged to be able to guide Victoria and Brian along their path toward mastery and seed a culture of learning at Obtiva.
I then shared some of my reflections on reading through the Code Smells with my Ruby hat on. The ones that stuck out most to me where Feature Envy and Incomplete Library Class. What struck me about these is how much more freedom Ruby gives you (than Java) to eradicate these smells from your code-base. Specifically, the Move Method refactoring can, in Ruby, move code all the way into the class where it belongs, regardless of whether you wrote that class or not. For example.