Just when you thought you couldn't refactor anymore…

0722f1ff8d0a69bce57ebdb93dafc395?s=47 Claudio B.
November 16, 2017

Just when you thought you couldn't refactor anymore…

Presented at RubyConf, November 2017

Ruby's philosophy is to provide more than one way to do the same thing. Faced with choice, we are left wondering which methods to use.

In this talk, we will travel together on a refactoring journey. We will start from code that is easy to write but hard to read, and gradually advance to a level where the 4 C's of good code are satisfied: Correctness, Completeness, Clearness, and Compactness.

On the way, we will learn new Ruby 2.4 methods (String#match?, MatchData#named_captures) and review old methods (Enumerable#find, Regexp#===) that are more powerful than they seem at a first glance.


Claudio B.

November 16, 2017