Clean Code : Names

Some rules for name:

  1. Choose your names thoughtfully.
  2. Communicate your intent.
  3. Avoid Disinformation.
  4. Pronounceable Names.
  5. Avoid Encodings (Eg: ucp)
  6. Choose parts of speech well.
  7. The Scope rules. For variable name with larger scope have larger name and variable name with smaller scope have smaller name. With method and class names it is opposite for method/class name with larger scope have smaller names and with smaller scope have larger name.

For detail read Clean Code by Robert Martin.

Advertisement

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: