© Carleton DiLeo 2019
C. DiLeoClean Rubyhttps://doi.org/10.1007/978-1-4842-5546-9_2

2. Naming Things

Carleton DiLeo1 
(1)
Boulder, CO, USA
 

Coming up with names for the variables, classes, and methods in a program is not an easy task. We must be gurus to think of a name at a moment’s notice. It’s part of our everyday coding lives, and we can’t let down our guard. Choosing the wrong name has significant implications and can determine whether code is easy to read or confusing and cryptic. It doesn’t end there, because poor-quality names have a compounding effect. One bad name encourages creating more bad names; those bad names promote even more bad names. Progress crawls to a halt because these bad names make our code impossible to understand.

Why create ...

Get Clean Ruby: A Guide to Crafting Better Code for Rubyists now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.