Book Review: “Refactoring in Ruby”

January 4th, 2010 by comment Nola

“Refactoring in Ruby” written by William C. Wake and Kevin Rutherford.
Published by Addison-Wesley

This is more like a “workbook” then a “how to write awesome code” book. You can download the code from github http://github.com/kevinrutherford/rrwb-code and you will find tests/specs for the exercises.

The book is arranged in three parts, The Art of Refactoring, Code Smells, and Programs to Refactor.

There are explanations of “code smells” which are one characteristic of code that could be improved. Some of them are long parameter lists, unnecessarily complex, global variable, feature envy sections, etc. One thing I find interesting is the “How did it get this way?” section. It gives some insight into the thought process and reasoning behind the smell. I think this is good, as programmers our ego may be rather miffed to hear “This code stinks” but with some reasoning, it makes the pain less and I think firms up in our minds when this happens again, to do it this other way. I always want to know why when someone says I could do such and such thing better.

In addition to the code smell examples there are three programs to refactor in the end of the book. In a conversational tone, it walks through and gives some hints on what needs refactoring. Its almost as if you had a pair programming buddy working with you and identifying in small chunks what can be improved. This is definitely something I want to work through more carefully.

What I find odd, is that not all the code smells have code examples. The inspiration for the book I think is the Martin Fowler book “Refactoring Improving the design of Existing Code” which has examples for every code smell. Maybe Ruby smells less than Java? Or those fixes are really trivial? I don’t know. Overall, this is a great book and is certainly worth the price and investment and you will be a better programmer because of it!

ˆ Back to top

She’s Geeky 2010 Bay Area, Jan 29-31

December 15th, 2009 by comment gloriajw

She’s Geeky is my favorite stateside women’s tech event. It is a great opportunity to network, learn about other women’s projects and ideas, and test the viability of some of these ideas against receptive VCs. It’s also a great un-conference environment. It is low-key, entirely attendee-drivien, and will be whatever you all make it. I was thoroughly impressed with this conference, now hosted multiple times a year throughout the country, each with it’s own regional twist. It can be a great place to find your next job, start your next dream project, or simply be inspired by others who are doing so.

Early registration ends Friday. Go here for details.

Gloria

ˆ Back to top