Simple Rules For Easy To Understand Code

Title. Stolen from someone on hacker news.

  • Always aim for declarative programming (abstract out the how it does it),
  • limit the depth of the function calls (rabbit hole developers…),
  • separate business logic from framework internals and
  • choose composition over inheritance.
  • Also avoid traits and mixins (run from the dark magic)
  • don’t over document the language or framework, only the eyebrow raising lines, the performance sensitive stuff and the context surrounding the file if it isn’t obvious.
  • name stuff to be easily grepable
Last modified: September 01, 2022
© 2023