Chapter 11. The Power of Variable Names

 < Free Open Study > 

cc2e.com/1184

Contents

  • Considerations in Choosing Good Names page 259

  • Naming Specific Types of Data page 264

  • The Power of Naming Conventions page 270

  • Informal Naming Conventions page 272

  • Standardized Prefixes page 279

  • Creating Short Names That Are Readable page 282

  • Kinds of Names to Avoid page 285

Related Topics

  • Routine names: Section 7.3

  • Class names: Section 6.2

  • General issues in using variables: Chapter 10

  • Formatting data declarations: "Laying Out Data Declarations" in Section 31.5

  • Documenting variables: "Commenting Data Declarations" in Section 32.5

As important as the topic of good names is to effective programming, I have never read a discussion that covered more than a handful of the dozens of considerations that go into creating good names. Many programming texts devote a few paragraphs to choosing abbreviations, spout a few platitudes, and expect you to fend for yourself. I intend to be guilty of the opposite: to inundate you with more information about good names than you will ever be able to use!

This chapter's guidelines apply primarily to naming variables objects and primitive data. But they also apply to naming classes, packages, files, and other programming entities. For details on naming routines, see Section 7.3, "Good Routine Names."

 < Free Open Study > 


Code Complete
Code Complete: A Practical Handbook of Software Construction, Second Edition
ISBN: 0735619670
EAN: 2147483647
Year: 2003
Pages: 334

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net