17 Sep '12, 4pm

60% of the time, I replace conditionals with polymorphism every time:

Maintainability: we now had two ways of looking for error messages: from the errors collection, and from an exception raised during validation. This commit makes it clear that at least six places need to change if we add any more. Maintainability: this commit revealed that AllowValueMatcher had too many concerns: it both finds error messages to check, and parses the options and errors to determine whether or not the errors were expected. Readability: AllowValueMatcher is now too large to understand at a glance, weighing in at 26 methods. Readability: having two logical paths for every method resulted in a lot of long method names. In addition, having so many methods makes it more difficult to reduce the vertical distance between a method and the methods that reference it. Testability: making sure that the various forks work as expected requires testing everything in AllowV...

Full article: http://robots.thoughtbot.com/post/31728620503/refactoring...

Tweets

How To Go Picasso On Your Data With Conditional Formatting

How To Go Picasso On Your Data With Conditional...

searchengineland.com 14 Sep '12, 4pm

I also use the duplicate values a lot when I download a Screaming Frog report to highlight duplicate content. Just apply t...

10 Top Reasons Why First-Time Entrepreneurs Fail: Number of View: 5 “For entrepreneurs —

10 Top Reasons Why First-Time Entrepreneurs Fai...

transitioning.org 18 Sep '12, 12am

“For entrepreneurs — especially those just starting out — businesses succeed as much as they fail. I’ve seen this time and...