| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
| |
What's in a Name? | |
| |
| |
Introduction | |
| |
| |
General Naming Guidelines | |
| |
| |
Upper and Lower Case Letters | |
| |
| |
Class Names | |
| |
| |
Variable Names: Semantic or Typed? | |
| |
| |
Semantic Variables | |
| |
| |
Typed Variables | |
| |
| |
Mixing Typed and Semantic Variables | |
| |
| |
State Variable Names | |
| |
| |
Method Names | |
| |
| |
Accessor Method Names | |
| |
| |
Method Parameters Names | |
| |
| |
Method Temporary Variable Names | |
| |
| |
Numbers | |
| |
| |
Abbreviations | |
| |
| |
| |
Comments | |
| |
| |
Introduction | |
| |
| |
Code Comments | |
| |
| |
Component Comments | |
| |
| |
Applications | |
| |
| |
Classes | |
| |
| |
Methods | |
| |
| |
Comments within Source Code | |
| |
| |
| |
Code Formatting | |
| |
| |
Introduction | |
| |
| |
Method Template | |
| |
| |
Horizontal Spacing | |
| |
| |
Indentation and Alignment | |
| |
| |
Cascaded Message Protocols | |
| |
| |
Number of Statements per Line | |
| |
| |
Blank Lines | |
| |
| |
Source Code Line Length | |
| |
| |
Parentheses | |
| |
| |
| |
Can Your Software Be Reused? | |
| |
| |
Introduction | |
| |
| |
Common Protocols | |
| |
| |
Consistent Messages | |
| |
| |
Messages to Start, Initialize, and End | |
| |
| |
Values Returned by Methods | |
| |
| |
Behavior of Well-Known Messages | |
| |
| |
Public Versus Private Messages | |
| |
| |
Limit Scope of Message Sends | |
| |
| |
Method Size | |
| |
| |
Misplaced Methods | |
| |
| |
Accessor Methods - Variable-Free Programming | |
| |
| |
Public Versus Private Accessor Methods | |
| |
| |
Class Evolution and Refactoring | |
| |
| |
Abstract Versus Concrete Classes | |
| |
| |
Refactoring the Class Hierarchy - Abstract Classes | |
| |
| |
Inheritance of Behavior Versus State | |
| |
| |
Subclasses Versus Subtypes | |
| |
| |
Parts Versus Inheritance: Part-of Versus Is-a | |
| |
| |
Class Names and Pool Dictionaries | |
| |
| |
| |
Tips, Tricks, and Traps | |
| |
| |
Introduction | |
| |
| |
Common Syntactic Mistakes | |
| |
| |
Control Structures | |
| |
| |
Assumption of Return Values | |
| |
| |
"Cut and Paste" Reuse | |
| |
| |
Common Yet Confusing Error Messages | |
| |
| |
Equality, Identity, and Equivalence | |
| |
| |
Collections | |
| |
| |
Creating Example Code | |
| |
| |
Testing | |
| |
| |
Testing in Smalltalk | |
| |
| |
Reporting Test Results | |
| |
| |
Unit and Component Testing Approach | |
| |
| |
User Interface Testing | |
| |
| |
Client-Server Testing | |
| |
| |
Component Regression Testing | |
| |
| |
System Testing | |
| |
| |
Potential Sources of Abuse and Misuse | |
| |
| |
Global, Class, and Pool Variables | |
| |
| |
Class Names Considered Harmful | |
| |
| |
Reduce the Use of Explicit Class Names | |
| |
| |
Gratuitous New Classes | |
| |
| |
Use of become: | |
| |
| |
Unwanted Instances | |
| |
| |
Lazy Initialization | |
| |
| |
Modifying the Base System Classes | |
| |
| |
Case Analysis and Nested Conditions | |
| |
| |
Avoid the Use of Systems Programming Methods | |
| |
| |
Abuse of Blocks | |
| |
| |
Collection Operations Versus Counter-Controlled Loops | |
| |
| |
Summary of Guidelines | |
| |
| |
Glossary | |
| |
| |
References | |
| |
| |
Index | |