Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate Alan Kay's maxim into 'Prefer simple solutions'. #306

Merged
merged 6 commits into from
Jan 10, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,28 @@ although they may be harder to find.
Simpler features are easier for user agents to implement and test,
more likely to be interoperable,
and easier for authors to understand.
It is especially important to design your feature so that
the most common use cases are easy to accomplish.

Make sure that your <a href="#priority-of-constituencies">user needs</a>
are well-defined.
This allows you to avoid scope creep,
and make sure that your API does actually meet the needs of all users.
Of course,
complex or rare use cases are also worth solving,
though their solutions may be more complicated to use.
As Alan Kay said,
"simple things should be simple, complex things should be possible."
LeaVerou marked this conversation as resolved.
Show resolved Hide resolved
torgo marked this conversation as resolved.
Show resolved Hide resolved

Do note however that while common cases are often simple,
commonality and complexity are not always correlated.

<div class=example>
The Sanitizer API provides a shortcut for the common case of preventing XSS,
even though the rules necessary for that are not simple at all
and requires extensive security knowledge.
torgo marked this conversation as resolved.
Show resolved Hide resolved
It also permits simpler types of filtering, but with more configuration.
</div>

See also:

Expand Down