Just when you thought you couldn't refactor anymore…

4dea5cf83d2d6c1228750b76e579b38d?s=47 Claudio B.
November 16, 2017

Just when you thought you couldn't refactor anymore…

Presented at RubyConf, November 2017
http://rubyconf.com/program#session-218

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.

4dea5cf83d2d6c1228750b76e579b38d?s=128

Claudio B.

November 16, 2017
Tweet