Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Super classes are classes with the most lines of code in your entire application. They try to do everything for a concept and are extremely hard to support. Any other classes that need these methods can do the same thing.
- 2.
Single Responsibility Principle is a concept that dictates our code should only be responsible for one thing.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Carleton DiLeo
About this chapter
Cite this chapter
DiLeo, C. (2019). Naming Things. In: Clean Ruby. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5546-9_2
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5546-9_2
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5545-2
Online ISBN: 978-1-4842-5546-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books