25.18 Style: Making functions readable

Be consistent in your naming and coding of functions


  • Functions should be verbs (action, state, or occurrence), arguments should be nouns (people places or things).

  • Be consistent in using snake_case or camelCase.

  • For sets of functions, use a common prefix

  • Don’t overwrite existing function


  • Use comments to explain the ‘why’ of the code

  • Use lines of - or = to break up code into sections