When designing APIs or interfaces, prioritize using existing standard fields and patterns from established APIs rather than creating custom implementations. This ensures consistency across tools and reduces cognitive load for users.
When designing APIs or interfaces, prioritize using existing standard fields and patterns from established APIs rather than creating custom implementations. This ensures consistency across tools and reduces cognitive load for users.
Key principles:
Example from Docker Compose:
# Instead of creating custom status formatting
container.human_readable_state
# Use the standard Status field from Docker API
container.status # Returns "Up 5 minutes" format used by docker CLI
This approach improves user experience through familiarity, reduces maintenance burden by leveraging tested implementations, and ensures compatibility with existing tooling and documentation.
Enter the URL of a public GitHub repository