Software

algorithms

  • distributed
    • paxos
      • multiple roles
      • TLA+ checked
    • raft
      • single role
  • hashing
    • mapembed hashing is perfect hashing that supports dynamic updates; still with O(1) lookup time
  • SIEVE
    • Generalized Merge-FIFO(segcache) Queue that can outpreform LRU
      • variant ARC-SIEVE replaces ARC with own queue

Proverbs

  • Murphy's law - If something can go wrong, it will.
  • Goodhart's Law - When a measure becomes a target, it ceases to be a good measure
  • Conway's law - Any piece of software reflects the organizational structure that produced it.
  • Pareto principle - For many phenomena, 80% of consequences stem from 20% of the causes.
  • Peter principle - In a hierarchy, every employee tends to rise to his level of incompetence.
  • Moore's law - The power of computers per unit cost doubles every 24 month.
  • Aumann's agreement theorem - There is no agreeing to disagree
  • Law of Large Numbers - large results over time trend toward the average
    • ex. more code, more bugs

Common

  • Birthday Problem - 50% chance for 23 random people to share a birthday
  • release cadence schedule sets expectations
    • large breaking changes fracture and stagnate
      • python2 to python3
      • perl 5 to perl 6
      • scala 2 to scala 3
    • incremental changes are incorporated into ecosystem over time
      • rust editions
      • jdk releases
      • c++14/17/20/23
      • objective C to swift

Code review

  • Humility should be paramount when submitting code to a location you do not OWN
  • Code is meant to be updated by humans but ran by processors
    • machine semantics
      • iterator vectorization of loops (can allow simd)
    • stylistic clarity/future updates
      • linters/formatters
  • Version control hygiene
    • messages should have a semi standardized format (like gnu changelog messages)
      • write in present tense
    • useful for developers for bug bisection and release changelog generation