The Rules

Items reflecting my opinion of the world and how to be in it

On code organization and management

NOTE: Needed means the cognitive load to comprehend content is improved by violating the rule.

  • code and configuration go into a single
    • file until a new file is needed
    • directory until a new directory is needed
  • use a Makefile
    • use a bash script located in ./scripts/ when needed
    • call that script from the make task
    • make scripts executable
    • use the hash-bang #!/bin/bash
    • do not us a .sh extension for scripts. e.g. ./scripts/scriptname
  • use CI/CD configuration for items specific to CI/CD
    • invoke make tasks from the CI/CD configuration
  • on working toward a pull request
    • use small, single-purpose commits during construction of a change
    • consider interactive rebasing before submitting a pull request
    • reorganize commits into single-subject sets of related changes to aid in code review
    • provide a description of the change
    • start with “Why”
    • provide an example when updating user interfaces
    • squash commits before merging/rebasing the pull request onto master