General standards

Don’t duplicate code! This can lead to bugs because the code can diverge over time as one changes. Better to extract duplicate code into a function.

See also