Naming conventions in code


My notes on Code naming conventions

Assertitional (to compare)

  • assert (state a fact or belief confidently)
  • check
  • evaluate (form an idea of the amount, number, or value of)
  • checkBoundaries
  • compare
  • determine
  • validate
  • restrict

Media

  • assert
  • load
  • seekTo
  • start
  • stop
  • unLoad

Connectivity

  • connect
  • disconnect

Creational

  • create
  • generate

Processional (state)

  • activate
  • close
  • cycle
  • deActivate
  • describe
  • exit
  • goto
  • initiate
  • initialize
  • intro
  • outro
  • open
  • transitionTo
  • tweenTo
  • trigger
  • update
  • restore
  • quite
  • shutdown
  • terminate

Operational

  • amend (make minor changes in order to make it fairer, more accurate, or more up-to-date)
  • assign
  • allocate (distribute resources or assignment to for a particular purpose)
  • aggregate (structure formed from a loosely compacted mass of fragments or particles)
  • configure
  • compute
  • collate (collect and combine (texts, information, or sets of figures) in proper order.)
  • create
  • calculate
  • declare
  • define
  • dispose(get rid of by throwing)
  • distribute (give shares of (something); deal out )
  • destroy
  • execute
  • processSale
  • force
  • setup
  • resolve
  • trigger
  • process
  • prepare
  • rollback
  • update
  • initialize

Modificational

  • apply
  • alter (change or cause to change in character or composition, typically in a comparatively small but significant way)
  • edit
  • modulate (bring influence on)
  • toggle (use instead of setEmbedfonts toggleEmbedFonts) or no?
  • offset
  • order
  • preserve
  • reconfigure
  • truncate (shorten (something) by cutting off the top or the end)
    trim (make (something) neat or of the required size or form by cutting away irregular or unwanted - parts)
  • write

Services (parsing)

  • find
  • parse
  • output
  • print
  • read
  • search
  • sequence (arrange in a particular order)
  • sum (summeries)
  • translate
  • view

Variable naming conventions

Time

  • ElapsedTimeInDays
  • daysSinceCreaton
  • daysSinceModification
  • fileAgeInDays

Propotioonal and orientational

  • dimension (width, height)
  • directional (x,y)

Amount

  • someValue
  • peppleAmount
  • listLength
  • isBlue
  • hasBeenLoaded