: Assume that users will provide bad data and that code will fail; write routines that protect themselves from invalid inputs. 3. Effective System Design
: Keep the "live time" of variables (the time between declaration and use) as short as possible to minimize mental load.
: Variable names should ideally be 10–16 characters long to be descriptive without being unwieldy. Code Complete: A Practical Handbook of Software...
: Techniques like inheritance should be used cautiously, as they can add significant complexity.
: Testing with null, too much, or unsanitized data. : Assume that users will provide bad data
: Every line of code should be tested and reviewed. Focus on:
: High-quality code is organized into small, cohesive routines and well-defined classes. : Variable names should ideally be 10–16 characters
: Use consistent layout and style to make the program's structure visible to other developers. 4. Quality Assurance and Testing