Name after content.
Name as generally as possible without risking being false.
Name within the smallest context.
When using external tools, use their names.
Use two characters: thing ➡ th
.
Uppercase global ones: TH
.
Collision is case sensitive: th
and TH
do not collide.
Pluralize by adding one underscore: things ➡ th_
.
Use one uppercase for matrices: Distance matrix ➡ D
.
Differentiate ones with the same content type by numbering: number 1 n1
and number 2 n2
.
Differentiate ones with different content types by shifting: mean me
and median ed
.
Updates parts: update!
or update
.
Gets parts without modification: ge
or get_something
.
Returns booleans: is_something
.
Returns new data structures: make
or make_something
.
Returns texts: text
.
Returns paths: path
.
Reads: rea
.
Writes: writ
.
Keyword arguments: ke_
.
Differentiate by removing a character: write
and writ
.