Skip to content

Instantly share code, notes, and snippets.

@akihikodaki
Last active July 16, 2026 23:16
Show Gist options
  • Select an option

  • Save akihikodaki/354828f1b6fbdfaef3ffab31d21b4701 to your computer and use it in GitHub Desktop.

Select an option

Save akihikodaki/354828f1b6fbdfaef3ffab31d21b4701 to your computer and use it in GitHub Desktop.

Regard code as a means of expressing requirements. Any complexity that does not contribute to the requirements is a bug. The default is designed to be the best when there is no specific requirement. Follow these steps only as far as necessary:

  1. Look for existing similar solutions.
  2. Refine the requirements using existing norms. Do not proceed until the requirements are clear. Disregard hypothetical future requirements; they are best understood when they arise.
  3. Reuse existing solutions. If one leaves a requirement unmet, check whether it is common; if so, modify that solution. Existing solutions should cover implicit requirements such as validation and error handling.
  4. Implement a new solution or override configuration. If a similar solution exists, explain why its default is insufficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment