News for hackers. Stuff that matters.
Re:How A Pull Request Rocked My World by guylhem on Saturday February 02, 2013 @04:31PM (#5157411)
On the first glance it seems great, but much more complex to understand and debug.

The if tree was certainly not pretty, but straightforward - it did its thing. It was something that could be given to an average developer to work on and improve.

The refactored code will require someone that's not just an average developer - if only because you need to read the article to understand it if you're not familiar with javascript, while the initial code needed only a glance to understand what it did.

IMHO, that's just complexity for complexity sake - unless you have plans to take advantage of the new flexibility it provides.

(and if you have to find, hire and pay that 'better than average' person, it might not be such a good thing.)

Re:How A Pull Request Rocked My World by hnewser1 on Saturday February 02, 2013 @04:59PM (#5157532)
This is not written in javascript, it is ruby. And I think your developer is way below average if he can't understand the pattern used in the refactored code.
Re:How A Pull Request Rocked My World by dubcanada on Sunday February 03, 2013 @12:00AM (#5158699)
If you have a ruby programmer who can't understand this, fire them. And get a new one. This type of stuff is all over ruby code.