Naming Variables & Functions

Posted on 24 Jun, 2019

  1. The name of a variable, function, or class should answer all the big questions. It should tell you why it exists, what it does, and how it is used.

  2. Classes & Objects should have noun or noun phrase names like Student,Account etc. A class name should not be a verb.

  3. Methods should have verb or verb phrase names like getCategories(), saveTutorial().


PS : I have been reading CleanCode for a while & logging what I learn here.

Last updated