Naming Things
摘要
Coming up with names for 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 more bad names, and those bad names promote even more bad names. Progress crawls to a halt because these bad names make our code impossible to understand.