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

How rails has changed how I seek for a job

December 10th, 2009 by comment narwen

For nine years, I have developed for the web. Over the years I’ve programmed in C, C++, Python, Java, ASP, PHP, Perl, and most recently, Ruby.
Since my first job as a developer, I’ve never looked for a new job: all of my job transitions have come through friends or co-workers.

In mid 2007 I was happy working with Perl. One day a friend told me about a Ruby on Rails job. Back in 2007, Rails developers in Brazil were rare. Because of that, the employer was seeking someone who fit the company instead of someone with Rails experience. That was great for me!

After a pleasant summer, the new job’s charm wore off and I decided that I wanted to move on but continue to program with Rails. Finally, I left my job.

When I started to send out resumes I soon realized that Rails’ culture fundamentally changed the way that a Rails job search functioned. In addition to the traditional resume or CV, Rails jobs demanded to know about Working With Rails, LinkedIn, GitHub, Twitter, personal blogs and sites, discussion forum posts, participation in open source projects, and a multitude of other online presences. These new demands made me realize that I hadn’t been cultivating a comprehensive web presence, which is not uncommon for female programmers, in my experience.

At first, this realization was disturbing. Though it’s still possible to get a Rails job without a vast web presence, I was upset to realize that I hadn’t been adhering to this best practice. It was particularly jarring the first time I was unable to answer these questions to potential employer.
The practice of software development as a craft is constantly reinventing itself and this includes the processes around job seeking and reputation building. Despite all of the hours, projects, languages, and jobs I’ve previously invested in, I now realize that I need to adapt to this new developer reality of being social and visible with my work in order to win back my standing as a desirable developer and potential candidate for a Rails position. The details of how I’ll implement that strategy will be the subject of an upcoming post, but I look forward to the possibilities ahead.

To read in portuguese.

ˆ Back to top