The Daily Refactoring

for Friday, October 24, 2008


Last update: 12:02 PM EDT
HOME PAGE

Consolidate Duplicate Delegation (new)

Published: 03:01 PM EDT
By: COREY GRUSDEN, SANDRO TURRIATE

In Rails there are a lot of things that can work. Sometimes, we all need some of the little idioms pointed out.

Pull Up Method

Published: 03:45 PM EDT
By: COREY GRUSDEN, SANDRO TURRIATE

Fat models with leftovers that could be trimmed a bit more!

Consolidate Conditional Expression

Published: 05:14 PM EDT
By: COREY GRUSDEN, SANDRO TURRIATE

Came across a method that had 3 different paths in it's conditional statement. In one of those paths was a conditional expression checking 6 values. Had to fix that

Replace Loop with Closure Collection Method

Published: 02:30 PM EDT
By: COREY GRUSDEN, SANDRO TURRIATE, and ZACH INGLIS

Reducing a previously extracted method never felt so good, until now. Walk through of refactoring a previously extracted method today.

Extract Method

Published: 10:28 AM EDT
By: COREY GRUSDEN, SANDRO TURRIATE

Extracting highly reused code out of a view and putting it into a module for reuse and further refactoring.