BrisRuby / meetups

BrisRuby meetups and talks
http://brisruby.org
33 stars 14 forks source link

Refactoring: Temp to Query and Intention Revealing Selector #34

Closed coop closed 11 years ago

coop commented 11 years ago

Recently I gave a live coding session to my colleagues on refactoring. I took two very well known techniques and applied them to a pull request that included a ~30 line method. That 30 line method ended up being reduced to ~9 lines, became much more understandable and we found a hidden class to extract.

Refactoring is the third step in the red green cycle and is something that we as developers talk about all the time. I want to introduce two very simple refactorings that will greatly enhance the readability of your code not only to yourself but your future self as well.

The refactoring takes about 15 minutes and I found that there were 5 - 10 minutes of questions afterwards.

vlc commented 11 years ago

Is there a +10 button?

This sounds like a great talk - refactoring is a skill that is hard to teach and I think live coding is a great way to expose people to the subtleties of doing it well.

hackling commented 11 years ago

+10

michael-harrison commented 11 years ago

same :100:+

nigelr commented 11 years ago

@coop can you please do this on the 19th?

nigelr commented 11 years ago

@coop added your talk for next Tuesday (19th)

coop commented 11 years ago

Thanks.

Sent from my iPhone

On 12 Nov 2013, at 6:35 am, Nigel Rausch notifications@github.com wrote:

@coop added your talk for next Tuesday (19th)

— Reply to this email directly or view it on GitHub.

nigelr commented 11 years ago

Thanks for the talk @coop - can you add your slides to the repo please