Skip to content

Commit 3830de1

Browse files
hobertorgoLeaVerouplinss
authored
Incorporate Alan Kay's maxim into 'Prefer simple solutions'. (#306)
* Incorporate Alan Kay's maxim into 'Prefer simple solutions'. * Update index.bs as discussed today in teleconf Co-authored-by: Lea Verou <[email protected]> * Update index.bs Co-authored-by: Lea Verou <[email protected]> * Update index.bs Co-authored-by: Peter Linss <[email protected]> * Update index.bs * Update index.bs Co-authored-by: Daniel Appelquist <[email protected]> Co-authored-by: Daniel Appelquist <[email protected]> Co-authored-by: Lea Verou <[email protected]> Co-authored-by: Peter Linss <[email protected]>
1 parent 0e85cd4 commit 3830de1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

index.bs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,28 @@ although they may be harder to find.
277277
Simpler features are easier for user agents to implement and test,
278278
more likely to be interoperable,
279279
and easier for authors to understand.
280+
It is especially important to design your feature so that
281+
the most common use cases are easy to accomplish.
280282

281283
Make sure that your <a href="#priority-of-constituencies">user needs</a>
282284
are well-defined.
283285
This allows you to avoid scope creep,
284286
and make sure that your API does actually meet the needs of all users.
287+
Of course,
288+
complex or rare use cases are also worth solving,
289+
though their solutions may be more complicated to use.
290+
As Alan Kay said,
291+
"simple things should be simple, complex things should be possible."
292+
293+
Do note however that while common cases are often simple,
294+
commonality and complexity are not always correlated.
295+
296+
<div class=example>
297+
Sanitizing HTML to prevent XSS attacks is a complex process
298+
that requires extensive security knowledge,
299+
however the [Sanitizer API](https://wicg.github.io/sanitizer-api/) provides a shortcut for this common use case.
300+
It also permits simpler types of filtering, but with more configuration.
301+
</div>
285302

286303
See also:
287304

0 commit comments

Comments
 (0)