I'm compiling a collection of software engineering principles. The idea is to have them in a document with longer explanations and examples. Other than that, they're meant to be cited as justifications for this or that choice we make and left as comments in code or in conversations. Some are special cases or consequences of more generic principles. Here's what I have so far:
- simplicity
- least surprise
- separation of concerns
- design for the worst-case scenario
- explain the intentions behind any piece of code
- minimize future maintenance efforts
- minimize time to fix future problems
- no code duplication
- fail early
Note that this list is limited to "technical" principles in the sense that they're valid even for a team of one. There are more principles and guidelines for the interactions between team members but here I'm limiting myself to what could be or should be written down as part of a code base.
#programming #engineering #ocaml #bestpractices #work